lkml.org 
[lkml]   [2008]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpuset: rcu_read_lock() to protect task_cs() even we don't dereference to task_cs()'s return value
Paul Menage wrote:
> On Fri, Nov 21, 2008 at 11:05 AM, Paul Menage <menage@google.com> wrote:
>> Wouldn't this be fixed by your patch that adds an rcu_read_lock() to
>> task_subsys_state() ?
>>
>
> Sorry, your other patch actually adds the rcu_read_lock() to
> task_cgroup(). But adding an rcu_read_lock() to task_subsys_state()
> would also help here.

Adding an rcu_read_lock() to task_subsys_state() also help here.
But task_subsys_state() is used in fast path.

If we add an implicit rcu_read_lock() in task_subsys_state(),
we still need rcu_read_lock()/task_lock() for using it,
so it's redundant rcu_read_lock(), and slower the fast path a little.

Lai.



\
 
 \ /
  Last update: 2008-11-22 04:07    [W:0.020 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site