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 22:36:30 +0200 [thread overview]
Message-ID: <20020524203630.GJ15703@dualathlon.random> (raw)
In-Reply-To: <20020524194344.GH15703@dualathlon.random> <Pine.GSO.4.21.0205241549520.9792-100000@weyl.math.psu.edu>
On Fri, May 24, 2002 at 03:55:45PM -0400, Alexander Viro wrote:
>
>
> On Fri, 24 May 2002, Andrea Arcangeli wrote:
>
> > and they provide useful cache, they remebers the i_size and everything
> > else that you need to read from disk the next time a lookup that ends in
> > such inode happens. It's not a "this dentry doesn't exist" kind of
> > info after an unlink, so very very unlikely to be ever needed
> > information. Furthmore there cannot be an huge grow of those inodes see
> > below.
>
> That's crap, since there _IS_ such a grow. Again, they easily sit around
> for 5-7 minutes without a single attempt to access them, while the system
> is swapping like hell.
no-way, that's because your vm is broken then, apply vm-35 and it
shouldn't really happen, if the system swaps inodes will be pruned
correcty too, an inode will never stay around for minutes while the
system is swapping. Actually really you may want to apply also my last
fix for the inode highmem balance to be sure to rotate the list, maybe
that could make the difference for this case, but again, if something goes
wrong in this sense it's a prune_icache bug, not a design bug in iput.
>
> > It's a "I know everything about this valid inode" that is been used in
> > the past and that may be used in the future, so I feel it's an order of
> > magnitude more useful information.
>
> It's "I hadn't touched that inode in quite a while, but I'll retain it
> in-core almost indefinitely".
disagree, you can apply the same argument to the whole dcache in the
first place (not even the negative one!).
>
> > means there's mem pressure, so the inode as well will be collected soon,
> > prune_icache is run right after prune_dcache. So only the very last
> > inodes will be left there for minutes, and they will belong to the most
> > hot dentries, so very likely to be required again by a later iget as
> > soon as the dentry is re-created. It don't see any similarity to the
> > unlink-dentry-negative issue.
>
> Again, inodes are in that state only if there is no dentry pointing to
> them. And in _that_ state (== no references from the rest of kernel)
> they happily sit around for minutes.
there is no difference at all from the inode side prospective if there's
a dentry or not, nothing guarantees that the dentry will be used soon.
As said unless your vm is broken, freeing the inode at the last iput, so
to have it allocated only when some dentry is pointing to it, shouldn't
nearly make any difference in practice, if it makes big difference that's
a vm problem.
>
> > But if you want to change the iput so that the inode is discared at the
> > last iput that probably won't make much differnce, but I don't see any
> > benefit. As said until the last prune_icache, most of the inodes are
> > released anyways after they become unused. But I just don't see a
> > problem there, because those inodes won't stays there for minutes
> > prune_icache will collect them, and if the last one stays for minute
> > it's fine, the dcache aging made sure that if that was the last inode
> > left hanging around it is more likely to be reused next and if it's
> > reused we avoid a lowlevel ->read_inode. In short the part about the
> > inodes destroy procedure looks all right to me.
>
> It's always a pity when trivial testing spoils a beautiful theory, isn't it?
well, try 2.4.19pre8aa3 + the inode fix I posted this morning, and then
try to spol the theory with the trivial testing again :) I think you
won't spoil it, but I'd like to know if you can reproduce the problem
such way too.
Andrea
next prev parent reply other threads:[~2002-05-24 20:37 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-24 7:16 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
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 [this message]
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=20020524203630.GJ15703@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
all inboxes | Powered by JetHome®