linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: David Chinner <dgc@sgi.com>
Cc: Jan Blunck <jblunck@suse.de>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	akpm@osdl.org, viro@zeniv.linux.org.uk, balbir@in.ibm.com
Subject: Re: [patch 0/5] [PATCH,RFC] vfs: per-superblock unused dentries list (2nd version)
Date: Mon, 19 Jun 2006 10:27:39 +1000	[thread overview]
Message-ID: <17557.61307.364404.640539@cse.unsw.edu.au> (raw)
In-Reply-To: message from David Chinner on Monday June 19

On Monday June 19, dgc@sgi.com wrote:
> 
> > I can see that shrink_dcache_sb could take a long time and should be
> > fixed, which should be as simple as replacing it with
> > shrink_dcache_parent; shrink_dcache_anon.
> 
> But these are not guaranteed to reclaim all the dentries from a given
> superblock. Yes, they move the dentries to the LRU, but other activity in the
> system means that they may not get reclaimed during the subsequent calls
> to prune_dcache() and hence they may live beyond the unmount....
> 

My proposed patch earlier in this thread (I can post it again if you
like) addresses exactly this issue.  Instead of moving dentries to the
global LRU, it moves them to a private LRU, and the calls prune_dcache
on that.  So there is no room for other activity to get in the way of
prune_dcache doing what needs to be done.

I agree that using a single big LRU for everything doesn't work.  I
just don't think we need (or want) separate LRUs for each superblock.
Rather we want separate temporary LRUs just for use when unmounting.


> > But I'm still puzzled as to why a long dcache LRU slows down
> > unmounting. 
> > 
> > Can you give more details?
> 
> It's not the unmount that slows down - it's the fact that the dcache lock
> is held for so long that rest of the system halts for time it takes
> to run shrink_dcache_sb(). We've seen up to 50s to do a (touch fred; rm fred)
> when the LRU has grown to several million dentries and shrink_dcache_sb()
> is running. When this happens, it's not uncommon to see every CPU in the
> machine spinning on the dcache_lock...

Definitely a problem.
Maybe it was hoped that the call to cond_resched_lock(&dcache_lock)
would avoid this, but apparently not.
I still maintain that we should replace shrink_dcache_sb with calls to
shrink_dcache_anon and shrink_dcache_parent.  That, together with my
previous patch, should fix this problem quite cleanly.  If I send you
a combined patch against the latest -mm can you test?

Thanks,
NeilBrown

  reply	other threads:[~2006-06-19  0:27 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-01  9:51 [patch 0/5] [PATCH,RFC] vfs: per-superblock unused dentries list (2nd version) jblunck
2006-06-01  9:51 ` [patch 1/5] vfs: remove whitespace noise from fs/dcache.c jblunck
2006-06-01  9:51 ` [patch 2/5] vfs: d_genocide() doesnt add dentries to unused list jblunck
2006-06-01  9:51 ` [patch 3/5] vfs: remove shrink_dcache_anon() jblunck
2006-06-01  9:51 ` [patch 4/5] vfs: per superblock dentry stats jblunck
2006-06-01  9:51 ` [patch 5/5] vfs: per superblock dentry unused list jblunck
2006-06-02  1:06 ` [patch 0/5] [PATCH,RFC] vfs: per-superblock unused dentries list (2nd version) Andrew Morton
2006-06-02  2:23   ` David Chinner
2006-06-02  2:49     ` Andrew Morton
2006-06-02  4:17       ` David Chinner
2006-06-02 15:33       ` Jan Blunck
2006-06-05  1:30 ` Neil Brown
2006-06-16 15:51   ` Jan Blunck
2006-06-16 22:25     ` Neil Brown
2006-06-18 23:56       ` David Chinner
2006-06-19  0:27         ` Neil Brown [this message]
2006-06-19  1:00           ` David Chinner
2006-06-19  1:21             ` Neil Brown
2006-06-19  2:04               ` Andrew Morton
2006-06-19  2:25                 ` Neil Brown
2006-06-19  5:55               ` David Chinner
2006-06-19  6:33                 ` Andrew Morton
2006-06-19  8:30                   ` David Chinner
2006-06-19 10:48                   ` Thomas Gleixner
2006-06-19 11:01                     ` Andrew Morton
2006-06-19 17:34                       ` Ravinandan Arakali
2006-06-20  0:37                         ` Andrew Morton
2006-06-20 21:34                           ` Ravinandan Arakali
2006-06-20 22:10                             ` Andrew Morton
2006-06-20 23:56                               ` Ravinandan Arakali
2006-06-21  0:18                                 ` Andrew Morton
2006-06-21  0:31                                   ` Ravinandan Arakali
2006-06-19  9:34       ` Jan Blunck

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=17557.61307.364404.640539@cse.unsw.edu.au \
    --to=neilb@suse.de \
    --cc=akpm@osdl.org \
    --cc=balbir@in.ibm.com \
    --cc=dgc@sgi.com \
    --cc=jblunck@suse.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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).