[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 08 Oct 2008 09:20:35 +0900
From: Tejun Heo <tj@...nel.org>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
CC: Al Viro <viro@...IV.linux.org.uk>,
Benjamin Thery <benjamin.thery@...l.net>,
Greg KH <greg@...ah.com>, linux-kernel@...r.kernel.org,
"Serge E. Hallyn" <serue@...ibm.com>,
Al Viro <viro@....linux.org.uk>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: sysfs: tagged directories not merged completely yet
Hello,
Eric W. Biederman wrote:
> Tejun Heo <tj@...nel.org> writes:
>
>> Hello, a bit of additions after some sleep.
>
>> Heh... it did sound like a plan but I don't think the plan would solve
>> the problem. filldir can't be put in rcu read critical section. :-p
>
> There is srcu and there is the trick of grabbing the reference count
> on the current sysfs_dirent over the filldir and dropping the rcu
> lock (which works for proc).
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?
> To cut down on lock overhead from user space accesses that works.
>
>>>> The revalidate on access model doesn't appear to have a way to track
>>>> remote renames. Something sysfs supports.
>>> Yeap, IIRC, one of the reasons why sysfs wasn't converted over to
>>> sysfs was because sysfs guarantees inode doesn't change over rename or
>>> move so that notifications keep working over renames.
>> s/over to sysfs/over to revalidation/ and s/inode/dentry/. Maybe we can
>> just ignore dnotify? :-(
>
> Well there are more cases than dnotify, there is the renaming of directories
> in sysfs, although rare that I think get awkward if we use revalidation.
>
> 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. :-)
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists