lkml.org 
[lkml]   [2002]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: negative dentries wasting ram


On Fri, 24 May 2002, Linus Torvalds wrote:

>
> On Fri, 24 May 2002, Alexander Viro wrote:
> >
> > On Fri, 24 May 2002, Linus Torvalds wrote:
> >
> > > However, you're right that it probably doesn't help to do this after
> > > "unlink()" - it's probably only worth doing when actually doing a
> > > "lookup()" that fails.
> >
> > Depends on many things, including the amount of userland code that does
> > unlink(name);
> > open(name, O_CREAT|O_EXCL..., ...);
>
> Note that this will have to touch the FS anyway, since the O_CREAT thing
> forces a call down to the FS to actually create the file.

> The only think we save is a dentry kfree/kmalloc in this case, nbot a FS
> downcall. And I think Andrea is right that it can waste memory for the
> likely much more common case where the file just stays removed.

???
It's lookup + unlink + lookup + create vs. lookup + unlink + create.

-
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 13:26    [W:1.511 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site