Re: sysfs: tagged directories not merged completely yet

From: Eric W. Biederman
Date: Tue Oct 07 2008 - 21:08:17 EST


Tejun Heo <tj@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/