linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tim Chen <tim.c.chen@linux.intel.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Matthew Wilcox <matthew@wil.cx>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [RFC, PATCH] Make memory reclaim from inodes and dentry cache more scalable
Date: Tue, 08 May 2012 13:00:09 -0700	[thread overview]
Message-ID: <1336507209.3796.90.camel@schen9-DESK> (raw)
In-Reply-To: <1335996382.3796.88.camel@schen9-DESK>

On Wed, 2012-05-02 at 15:06 -0700, Tim Chen wrote:
> The following patch detects when inodes and dentries cache are really
> low in free entries, and skip reclamation of memory from them when it is
> futile to do so.  We only resume reclaiming memory from inodes and
> dentries cache when we have a reasonable amount of memory there. 
> This avoided us bottlenecking on sb_lock to do useless memory
> reclamation.  
> 
> I assume that it is okay to check super block's number of free objects
> content without sb_lock as we are holding shrinker list's read lock. The
> shrinker is still registered so super block is not yet deactivated which
> requires shrinker un-registration.  It will be great if Al can help to
> comment on whether this assumption is okay.
> 
> In a test scenario where page cache is putting heavy pressure on memory
> usage with large number of processes, we saw very heavy contention on
> the sb_lock to get free pages as seen in the following profile. The
> patch helped to reduce the runtime by almost a factor of 4.
> 
>     62.81%               cp  [kernel.kallsyms]           [k] _raw_spin_lock
>                          |
>                          --- _raw_spin_lock
>                             |
>                             |--45.19%-- grab_super_passive
>                             |          prune_super
>                             |          shrink_slab
>                             |          do_try_to_free_pages
>                             |          try_to_free_pages
>                             |          __alloc_pages_nodemask
>                             |          alloc_pages_current
> 
> 
> Tim


Hi Al, 

Want to ping you again to see what your thoughts are on this patch I've
sent a week ago.

Thanks.

Tim



      reply	other threads:[~2012-05-08 20:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02 22:06 [RFC, PATCH] Make memory reclaim from inodes and dentry cache more scalable Tim Chen
2012-05-08 20:00 ` Tim Chen [this message]

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=1336507209.3796.90.camel@schen9-DESK \
    --to=tim.c.chen@linux.intel.com \
    --cc=ak@linux.intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --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).