[lkml]   [2012]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: nfsd changes for 3.5
On Thu, May 31, 2012 at 1:53 PM, J. Bruce Fields <> wrote:
> On Thu, May 31, 2012 at 01:17:26PM -0700, Linus Torvalds wrote:
> Uh, that means ditching some work in my public git tree.  Which I
> haven't rebased in years.  So, a stupid process question; would you
> rather I:
>        - continue to be strict about rebasing and apply a bunch of
>          reverts?
>        - ditch it and start over?

I think in this case rebasing is the right thing to do.

I hate rebasing, but what I hate about it is how people who use it as
a development model cause problems for anybody else. I don't think it
will cause problems in this particular case, but if somebody hollers,
let me know.

>> Making
>> it an rwsem might help readdir a tiny amount, but I suspect people
>> actually depend on the mutex in readdir right now.
> Al called this all "highly non-trivial":
> I don't know who'd have the cycles.

I agree, it's a rats nest.

Doing lookups in particular is ridiculously single-threaded for almost
no good reason, though (and create is just a special case of that). It
*should* be possible that push the i_mutex down into the filesystem,
if we just created some fake dentry (with the appropriate support for
lookup to stall on it) to make sure that lookups of the same *name*
are serialized.

At that point, each filesystem could decide that they don't need the
i_mutex for the whole thing.


And readdir() could be done mostly mechanically by changing i_mutex
into an rwsem, making all lockers use a write lock, and pushing the
locking down from the caller into the filesystem for ->readdir().
Again, at that point, I suspect many filesystems could do with much
less locking.

But yeah, it's all nasty. Even the purely mechanical part of changing
i_mutex to an rwsem would not only be a *huge* and painful patch, it
would hit things like lockdep issues too (we don't support the nesting
thing for rwsem annotations, afaik).

So nobody has really done it, and it's so painful that maybe nobody
will. There are loads that hit this serialization point, but they are
*fairly* rare and specialized.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2012-06-01 00:41    [W:0.064 / U:7.716 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site