lkml.org 
[lkml]   [2008]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sysfs: tagged directories not merged completely yet
Hello,

Eric W. Biederman wrote:
> Tejun Heo <tj@kernel.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


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