linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zheng Liu <gnehzuil.liu@gmail.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: linux-ext4@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Theodore Ts'o <tytso@mit.edu>, Jan kara <jack@suse.cz>
Subject: Re: ext4 extent status tree LRU locking
Date: Wed, 12 Jun 2013 15:17:35 +0800	[thread overview]
Message-ID: <20130612071735.GB29898@gmail.com> (raw)
In-Reply-To: <51B7B128.60909@intel.com>

Hi Dave

Thanks for reporting this.

On Tue, Jun 11, 2013 at 04:22:16PM -0700, Dave Hansen wrote:
> I've got a test case which I intended to use to stress the VM a bit.  It
> fills memory up with page cache a couple of times.  It essentially runs
> 30 or so cp's in parallel.

Could you please share your test case with me? I am glad to look at it
and think about how to improve LRU locking.

> 
> 98% of my CPU is system time, and 96% of _that_ is being spent on the
> spinlock in ext4_es_lru_add().  I think the LRU list head and its lock
> end up being *REALLY* hot cachelines and are *the* bottleneck on this
> test.  Note that this is _before_ we go in to reclaim and actually start
> calling in to the shrinker.  There is zero memory pressure in this test.
> 
> I'm not sure the benefits of having a proper in-order LRU during reclaim
> outweigh such a drastic downside for the common case.

A proper in-order LRU can help us to reclaim some memory from extent
status tree when we are under heavy memory pressure.  When shrinker
tries to reclaim extents from these trees, some extents of files that
are accessed infrequnetly will be reclaimed because we hope that
frequently accessed files' extents can be kept in memory as much as
possible.  That is why we need a proper in-order LRU list.

Regards,
                                                - Zheng

  reply	other threads:[~2013-06-12  7:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11 23:22 ext4 extent status tree LRU locking Dave Hansen
2013-06-12  7:17 ` Zheng Liu [this message]
2013-06-12 15:09   ` Dave Hansen
2013-06-12 16:03     ` Zheng Liu
2013-06-12 17:52       ` Dave Hansen
2013-06-12 20:48     ` Theodore Ts'o
2013-06-13 13:27       ` Zheng Liu
2013-06-13 13:35         ` Theodore Ts'o
2013-06-14  3:27           ` Zheng Liu
2013-06-14 14:09 ` Zheng Liu
2013-06-14 14:02   ` Theodore Ts'o
2013-06-14 17:00     ` Zheng Liu
2013-06-14 18:00       ` Theodore Ts'o
2013-06-17 10:10         ` Zheng Liu
2013-06-17 21:12           ` Dave Hansen
2013-06-18  2:25             ` Zheng Liu
2013-06-18  2:51               ` Theodore Ts'o
2013-06-18  3:49                 ` Zheng Liu
2013-06-18  2:47           ` Theodore Ts'o
2013-06-14 15:57   ` Dave Hansen
2013-06-14 17:11     ` Zheng Liu
2013-06-14 16:55       ` 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=20130612071735.GB29898@gmail.com \
    --to=gnehzuil.liu@gmail.com \
    --cc=dave.hansen@intel.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).