On Wed, Sep 04, 2019 at 11:20:03AM -0700, Linus Torvalds wrote:
> On Wed, Sep 4, 2019 at 9:33 AM Frederic Weisbecker
> wrote:
> >
> > I thought the point of these rcu_users was to be able to do:
> >
> > rcu_read_lock()
> > p = rcu_dereference(task)
> > if (!refcount_inc_not_zero(p->rcu_users)) {
On Wed, Sep 4, 2019 at 9:33 AM Frederic Weisbecker wrote:
>
> I thought the point of these rcu_users was to be able to do:
>
> rcu_read_lock()
> p = rcu_dereference(task)
> if (!refcount_inc_not_zero(p->rcu_users)) {
No. Because of the shared state, you can't do that from RCU context.
But you
On Wed, Sep 04, 2019 at 05:32:46PM +0200, Oleg Nesterov wrote:
> On 09/04, Frederic Weisbecker wrote:
> >
> > So what happens if, say:
> >
> >
> >CPU 1 CPU 2
> >--
> >rcu_read_lock()
> >p =
On 09/04, Frederic Weisbecker wrote:
>
> So what happens if, say:
>
>
>CPU 1 CPU 2
>--
>rcu_read_lock()
>p = rcu_dereference(rq->task)
>if (refcount_inc_not_zero(p->rcu_users)) {
>
On Mon, Sep 02, 2019 at 11:51:34PM -0500, Eric W. Biederman wrote:
>
> Add a count of the number of rcu users (currently 1) of the task
> struct so that we can later add the scheduler case and get rid of the
> very subtle task_rcu_dereference, and just use rcu_dereference.
>
> As suggested by
On 09/02, Eric W. Biederman wrote:
>
> @@ -900,10 +900,9 @@ static struct task_struct *dup_task_struct(struct
> task_struct *orig, int node)
> - /*
> - * One for us, one for whoever does the "release_task()" (usually
> - * parent)
> - */
> + /* One for the user space
Add a count of the number of rcu users (currently 1) of the task
struct so that we can later add the scheduler case and get rid of the
very subtle task_rcu_dereference, and just use rcu_dereference.
As suggested by Oleg have the count overlap rcu_head so that no
additional space in task_struct
7 matches
Mail list logo