linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Zheng Liu <gnehzuil.liu@gmail.com>
Cc: linux-ext4@vger.kernel.org, Zheng Liu <wenqing.lz@taobao.com>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Jan Kara <jack@suse.cz>
Subject: Re: [RFC PATCH v2 0/4] ext4: extents status tree shrinker improvement
Date: Wed, 16 Apr 2014 11:42:09 -0400	[thread overview]
Message-ID: <20140416154209.GB17208@thunk.org> (raw)
In-Reply-To: <20140416151938.GA17208@thunk.org>

On Wed, Apr 16, 2014 at 11:19:38AM -0400, Theodore Ts'o wrote:
> 
> 1) We should first fix __ext4_es_shrink so that we interpret
> nr_to_scan correctly --- it's the number of objects to scan, not the
> number of objects that we need to shirnk.  That should significantly
> reduce the number of scans that we do, and fixing this could
> potentially influence the metrics that we measure.

I've been looking at this more closely, and what we're doing isn't as
bad as I thought.  We only return the number of extents that are not
subject delayed allocation, and the number of items we shrink is equal
to the number of objects that we scan.

It may be, however, that the better way to do this is to return the
number of items in the extent status cache (i.e., including the
delalloc extents), and then skip the delalloc extents.  That way the
VM knows how much work we are doing, and it is balancing the amount of
work that our shrinker is doing against the other shrinkers.  If there
are no cache entries that can be freed (because they are all delalloc
entries), we could then return SHRINK_STOP.

That should help in particular with the really pathalogical workloads
where we have a large number of delalloc extents.

							- Ted

  reply	other threads:[~2014-04-16 15:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 11:30 [RFC PATCH v2 0/4] ext4: extents status tree shrinker improvement Zheng Liu
2014-04-16 11:30 ` [RFC PATCH v2 1/4] ext4: improve extents status tree trace point Zheng Liu
2014-04-16 11:30 ` [RFC PATCH v2 2/4] ext4: track extent status tree shrinker delay statictics Zheng Liu
2014-04-16 11:30 ` [RFC PATCH v2 3/4] ext4: improve extents status tree shrinker lru algorithm Zheng Liu
2014-04-16 11:30 ` [RFC PATCH v2 4/4] ext4: use a round-robin algorithm to shrink extent cache Zheng Liu
2014-04-16 15:19 ` [RFC PATCH v2 0/4] ext4: extents status tree shrinker improvement Theodore Ts'o
2014-04-16 15:42   ` Theodore Ts'o [this message]
2014-04-17 15:35     ` Theodore Ts'o
2014-04-21 13:50       ` Zheng Liu
2014-04-21 14:05         ` Theodore Ts'o
2014-04-21 14:46           ` Zheng Liu
2014-04-21 14:54             ` Theodore Ts'o
2014-04-21 23:10       ` Dave Chinner
2014-04-23  5:35         ` Zheng Liu
2014-04-24  1:46           ` Dave Chinner

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=20140416154209.GB17208@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=gnehzuil.liu@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=wenqing.lz@taobao.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;
as well as URLs for NNTP newsgroup(s).