Messages in this thread | | | From | (Eric W. Biederman) | Date | Tue, 07 Oct 2008 17:58:34 -0700 | Subject | Re: 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
| |