lkml.org 
[lkml]   [2008]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: sysfs: tagged directories not merged completely yet
Tejun Heo <tj@kernel.org> writes:

> Hmmm... I'm probably missing something (and being lazy) but how does it
> guarantee the validity of the next pointer after dropping the rcu lock?

So in next_tid which is essentially what we would be doing.
I grab the rcu_lock. Check something to see if the task I have
is still on the list, if it is then I know the next is valid until
the end of the rcu grace period. Then I follow the next pointer,
and grab the lock again.

rcu is pain to get right but at least it is localized pain.

>> I'm still not certain how we can get the lock ordering so it doesn't
>> cause us problems. I will look at revalidation and what the other
>> distributed filesystems are doing and see if that might work. If it
>> doesn't we need refactor the VFS locking.
>
> Yeah, if we can make sysfs behave like other distributed filesystems, it
> would be great. :-)

I don't think we can make it work but I think we need to exhaust that
avenue before saying that the VFS has to change.

Eric


\
 
 \ /
  Last update: 2008-10-08 03:09    [W:0.104 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site