public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Alexander Viro <viro@math.psu.edu>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: negative dentries wasting ram
Date: Fri, 24 May 2002 19:55:22 +0200	[thread overview]
Message-ID: <20020524175522.GD15703@dualathlon.random> (raw)
In-Reply-To: <20020524163942.GB15703@dualathlon.random> <Pine.GSO.4.21.0205241300480.9792-100000@weyl.math.psu.edu>

On Fri, May 24, 2002 at 01:04:33PM -0400, Alexander Viro wrote:
> 
> 
> On Fri, 24 May 2002, Andrea Arcangeli wrote:
> 
> > > 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.
> > 
> > yep. the only case where it could provide some in-core "caching"
> > positive effect is:
> > 
> > 	unlink
> > 	open(w/o creat)
> > 
> > but I don't see it as a common case.
> 
> 	Guys, how about tracing the damn thing and checking what actually
> happens?  Or, at least, checking the prototypes and noticing that ->create()
> takes (hashed) dentry as an argument, so if unlinked on had been freed we _must_
> call ->lookup().

so why don't you also left a negative directory floating around, so you
know if you creat a file with such name you don't need to ->loopup the
lowlevel fs but you only need to destroy the negative directory and all
its leafs in-core-dcache? If you did the negative effect would become
more obvious, the d_unhash hides it except for the spooling workloads.

Avoiding a lowlevel lookup operation for an unlink/open cycle, looks a
minor optimization compared to a massive dcache ""leak"" under certain
common spooling workloads IMHO.

Anyways in 2.5 we could still take advantage of the negative dentries as
much as possible (also after unlink) by moving the negative dentries
into a separate list and by putting the shrinkage of this list in front
of kmem_cache_reap, so we are as efficient as possible, but we don't
risk throwing away very useful cache, for more dubious caching effects
after an unlink/create-failure that currently have the side effect of
throwing away tons of worthwhile positive pagecache (and even triggering
swap false positives) in some workloads.

Andrea

  parent reply	other threads:[~2002-05-24 17:56 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-24  7:16 negative dentries wasting ram Andrea Arcangeli
2002-05-24  8:10 ` Andreas Dilger
2002-05-24 15:36   ` Andrea Arcangeli
2002-05-24 16:12     ` Alexander Viro
2002-05-24 16:21       ` Andrea Arcangeli
2002-05-24 16:24         ` Alexander Viro
2002-05-24 14:43 ` Linus Torvalds
2002-05-24 14:51   ` David S. Miller
2002-05-24 14:53   ` Jakub Jelinek
2002-05-24 20:44     ` David Schwartz
2002-05-25 17:33     ` Florian Weimer
2002-05-24 15:54   ` Andrea Arcangeli
2002-05-24 16:22   ` Alexander Viro
2002-05-24 16:29     ` Linus Torvalds
2002-05-24 16:39       ` Andrea Arcangeli
2002-05-24 17:04         ` Alexander Viro
2002-05-24 17:06           ` Alexander Viro
2002-05-24 17:55           ` Andrea Arcangeli [this message]
2002-05-24 18:00             ` Alexander Viro
2002-05-24 18:58               ` Andrea Arcangeli
2002-05-24 19:04                 ` Alexander Viro
2002-05-24 19:43                   ` Andrea Arcangeli
2002-05-24 19:55                     ` Alexander Viro
2002-05-24 20:36                       ` Andrea Arcangeli
2002-05-24 22:14                         ` Jan Harkes
2002-05-24 22:31                           ` Andrea Arcangeli
2002-05-26  8:06             ` Eric W. Biederman
2002-05-24 17:00       ` Alexander Viro
2002-05-24 18:36         ` Mark Mielke
2002-05-31  8:34 ` Oliver Neukum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020524175522.GD15703@dualathlon.random \
    --to=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox