lkml.org 
[lkml]   [2004]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: dentry bloat.
On Sat, May 08, 2004 at 12:13:09PM -0700, Linus Torvalds wrote:
> On Sat, 8 May 2004, Andrew Morton wrote:
> >
> > I think we can simply take ->d_lock a bit earlier in __d_lookup. That will
> > serialise against d_move(), fixing the problem which you mention, and also
> > makes d_movecount go away.
>
> If you do that, RCU basically loses most of it's meaning.
>
> You'll be taking a lock for - and dirtying in the cache - every single
> dentry on the hash chain, which is pretty much guaranteed to be slower
> than just taking the dcache_lock _once_, even if that one jumps across
> CPU's a lot.
>
> In other words, no, I don't think that's a good idea. We really want to
> take the dentry lock only after we're pretty sure we have the right
> dentry. Otherwise the dentry chains will be bouncing from CPU to CPU all
> the time.

Exactly. Taking ->d_lock for every dentry while traversing the hash
chain should be avoided. As such, atomic operations on that path
are getting costly.

Thanks
Dipankar
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.157 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site