linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Takashi Nishiie" <t-nishiie@np.css.fujitsu.com>
To: <linux-fsdevel@vger.kernel.org>
Subject: RE: [RFC] possible badness in prune_dcache()
Date: Mon, 7 Apr 2008 15:40:53 +0900	[thread overview]
Message-ID: <000501c8987a$539eb080$fadc1180$@css.fujitsu.com> (raw)
In-Reply-To: <20080404191343.GI22429@unused.rdu.redhat.com>


On Fri, Apr 04, 2008 at 09:01:26PM +0200, Miklos Szeredi wrote:
> > > > > probably worth looking at doing something different in the case of
> > > > > shrinking the dcache on the parent, and leaving prune_dcache to
> > > > > only be called in the case of trying to free up dcache under
> > > > > memory pressure, where the superblock doesn't actually matter.
> > > > > For the RHEL3 issue you are reffering to I fixed it by creating a
> > > > > private list when we shrunk the parent, and submitting that list
> > > > > to prune_dcache that way we didn't spend all this time looping.  I
> > > > > will see what can be done for upstream.
> > > 
> > > Which sounds racy with umount.  A hashed dentry must either have a
> > > refcount greater than one, or be on dentry_unused list.  This patch
> > > breaks that assumption.
> > >
> > 
> > It should be racy with umount, if we notice that we're being
> > unmounted we just break, as the unmount will free the dentry's
> > itself through another means.
> 
> But unmount could have already finished by then.  And now you are
> dereferencing a super block, that no longer exists.  Not good.
> 
> This separate list thing can't work, unfortunately.  On the other hand
> we should probably split prune_dcache() into two separate functions:
> the garbage collector one (with sb == NULL argument) and the sb
> specific shrinker.  It should I think be possible to share the second
> one with shrink_dcache_sb().
>

Hi.

As another reply, there is a patch David Chinner you list below.

Per-superblock unused dentry LRU
http://lwn.net/Articles/185465/

There is an article below as the recent argument which it is related.
http://lkml.org/lkml/2008/3/5/590

I think that the idea of per superblock unusued LRUs is rational.

Thanks




  parent reply	other threads:[~2008-04-07  6:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04 11:40 [RFC] possible badness in prune_dcache() Alex Lyashkov
2008-04-04 12:42 ` Miklos Szeredi
2008-04-04 15:28   ` Alex Lyashkov
2008-04-04 15:29     ` Josef Bacik
2008-04-04 15:57       ` Josef Bacik
2008-04-04 18:38         ` Miklos Szeredi
2008-04-04 18:44           ` Josef Bacik
2008-04-04 18:49             ` Josef Bacik
2008-04-04 19:01             ` Miklos Szeredi
2008-04-04 19:13               ` Josef Bacik
2008-04-04 19:32                 ` Miklos Szeredi
2008-04-07  6:40                 ` Takashi Nishiie [this message]
2008-04-07 10:49   ` David Howells

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='000501c8987a$539eb080$fadc1180$@css.fujitsu.com' \
    --to=t-nishiie@np.css.fujitsu.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /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).