From: Dave Chinner <david@fromorbit.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Josef Bacik <josef@redhat.com>,
Andreas Dilger <adilger@dilger.ca>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"viro@ZenIV.linux.org.uk" <viro@ZenIV.linux.org.uk>,
"hch@lst.de" <hch@lst.de>,
"aarcange@redhat.com" <aarcange@redhat.com>
Subject: Re: [PATCH 1/2] fs: add a DCACHE_NEED_LOOKUP flag for d_flags
Date: Sat, 21 May 2011 14:11:15 +1000 [thread overview]
Message-ID: <20110521041114.GX32466@dastard> (raw)
In-Reply-To: <20110521030050.GT12317@one.firstfloor.org>
On Sat, May 21, 2011 at 05:00:50AM +0200, Andi Kleen wrote:
> On Fri, May 20, 2011 at 08:30:19PM -0400, Josef Bacik wrote:
> > On 05/20/2011 05:31 PM, Andi Kleen wrote:
> > >> Putting them at the end of the cache LRU instead of the head would allow them to be dropped quickly under memory pressure.
> > >
> > > This still would fill up your memory for find /, potentially pushing
> > > out other stuff.
> > >
> > > -Andi
> >
> > So these things are just hashed on dput, so they don't have any
> > references to them and they are automatically put on the LRU list, so if
> > we get under memory pressure they will be easily discarded, especially
> > if nobody is actually stating them. Thanks,
>
> They are allocated. The allocation will push out other things too.
> There's no mechanism to only push dentries when allocating other dentries,
> or limit the total consumption from the dcache.
FWIW, I'm in the process of resurrecting my per-superblock VFS cache
shrinker patch which would make doing such limiting easier. That
is, the fake dentries could be accounted and tracked on their own
per-sb LRU and when over a threshold (global and/or per-sb) the
per-sb shrinker could be called directly to free a number of fake
dentries. That way the sb generating them all would self-limit
without greatly affecting the working set of dentries on other
filesystems...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2011-05-21 4:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-19 17:58 [PATCH 1/2] fs: add a DCACHE_NEED_LOOKUP flag for d_flags Josef Bacik
2011-05-19 17:58 ` [PATCH 2/2] Btrfs: load the key from the dir item in readdir into a fake dentry Josef Bacik
2011-05-19 19:03 ` [PATCH 1/2] fs: add a DCACHE_NEED_LOOKUP flag for d_flags Andreas Dilger
2011-05-19 19:43 ` Josef Bacik
2011-05-20 20:07 ` Andi Kleen
2011-05-20 20:51 ` Andreas Dilger
2011-05-20 21:31 ` Andi Kleen
2011-05-21 0:30 ` Josef Bacik
2011-05-21 3:00 ` Andi Kleen
2011-05-21 4:11 ` Dave Chinner [this message]
[not found] <adilger@dilger.ca, hch@lst.de>
2011-05-26 14:48 ` Josef Bacik
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=20110521041114.GX32466@dastard \
--to=david@fromorbit.com \
--cc=aarcange@redhat.com \
--cc=adilger@dilger.ca \
--cc=andi@firstfloor.org \
--cc=hch@lst.de \
--cc=josef@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).