public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, hch@infradead.org,
	lnxninja@linux.vnet.ibm.com, axboe@kernel.dk, pbadari@us.ibm.com
Subject: Re: [RFC][PATCH] try not to let dirty inodes fester
Date: Sat, 2 Oct 2010 21:32:38 +1000	[thread overview]
Message-ID: <20101002113238.GF4681@dastard> (raw)
In-Reply-To: <20101001191449.0AA0E233@kernel.beaverton.ibm.com>

On Fri, Oct 01, 2010 at 12:14:49PM -0700, Dave Hansen wrote:
> 
> I've got a bug that I've been investigating.  The inode cache for a
> certain fs grows and grows, desptite running
> 
> 	echo 2 > /proc/sys/vm/drop_caches
> 
> all the time.  Not that running drop_caches is a good idea, but it
> _should_ force things to stay under control.  That is, unless the
> inodes are dirty.

What's the filesystem, and what's the test case?

> I think I'm seeing a case where the inode's dentry goes away, it
> hits iput_final().  It is dirty, so it stays off the inode_unused
> list waiting around for writeback.

Right - it should be on the bdi->wb->b_dirty list waiting to be
expired and written back or already of the expired writeback queueѕ
and waiting to be written again.

> Then, the periodic writeback happens, and we end up in
> wb_writeback().  One of the first things we do in the loop (before
> writing out inodes) is this:
> 
> 	if (work->for_background && !over_bground_thresh())
> 		break;

Sure, but the periodic ->for_kupdate flushing should be writing
any inode older than 30s and should be running every 5s. hence the
background writeback aborting should not be affecting the cleaning
of dirty inodes. Hence I don't think this is the problem your are
looking for.

Without knowing what filesystem or what you are doing to grow the
inode cache, it's pretty hard to say much more than this....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2010-10-02 11:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-01 19:14 [RFC][PATCH] try not to let dirty inodes fester Dave Hansen
2010-10-02 11:32 ` Dave Chinner [this message]
2010-10-05 15:25   ` Dave Hansen
2010-10-05 15:36     ` Christoph Hellwig
2010-10-11 22:01       ` Dave Hansen

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=20101002113238.GF4681@dastard \
    --to=david@fromorbit.com \
    --cc=axboe@kernel.dk \
    --cc=dave@linux.vnet.ibm.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lnxninja@linux.vnet.ibm.com \
    --cc=pbadari@us.ibm.com \
    /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