From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mel@csn.ul.ie>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Minchan Kim <minchan@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
"andi.kleen" <andi.kleen@intel.com>,
linux-mm <linux-mm@kvack.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Cgroup: Fix memory accounting scalability in shrink_page_list
Date: Fri, 20 Jul 2012 14:19:47 +0300 [thread overview]
Message-ID: <20120720111947.GA8035@otc-wbsnb-06> (raw)
In-Reply-To: <1342740866.13492.50.camel@schen9-DESK>
[-- Attachment #1: Type: text/plain, Size: 2049 bytes --]
On Thu, Jul 19, 2012 at 04:34:26PM -0700, Tim Chen wrote:
> Hi,
>
> I noticed in a multi-process parallel files reading benchmark I ran on a
> 8 socket machine, throughput slowed down by a factor of 8 when I ran
> the benchmark within a cgroup container. I traced the problem to the
> following code path (see below) when we are trying to reclaim memory
> from file cache. The res_counter_uncharge function is called on every
> page that's reclaimed and created heavy lock contention. The patch
> below allows the reclaimed pages to be uncharged from the resource
> counter in batch and recovered the regression.
>
> Tim
>
> 40.67% usemem [kernel.kallsyms] [k] _raw_spin_lock
> |
> --- _raw_spin_lock
> |
> |--92.61%-- res_counter_uncharge
> | |
> | |--100.00%-- __mem_cgroup_uncharge_common
> | | |
> | | |--100.00%-- mem_cgroup_uncharge_cache_page
> | | | __remove_mapping
> | | | shrink_page_list
> | | | shrink_inactive_list
> | | | shrink_mem_cgroup_zone
> | | | shrink_zone
> | | | do_try_to_free_pages
> | | | try_to_free_pages
> | | | __alloc_pages_nodemask
> | | | alloc_pages_current
>
>
> ---
> Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
--
Kirill A. Shutemov
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-07-20 11:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 23:34 [PATCH] Cgroup: Fix memory accounting scalability in shrink_page_list Tim Chen
2012-07-20 3:19 ` Kamezawa Hiroyuki
2012-07-20 4:25 ` Minchan Kim
2012-07-20 16:38 ` Tim Chen
2012-07-20 6:27 ` Johannes Weiner
2012-07-20 11:19 ` Kirill A. Shutemov [this message]
2012-07-20 13:53 ` Michal Hocko
2012-07-20 14:16 ` Johannes Weiner
2012-07-20 14:38 ` Michal Hocko
2012-07-20 15:12 ` Johannes Weiner
2012-07-20 16:31 ` Michal Hocko
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=20120720111947.GA8035@otc-wbsnb-06 \
--to=kirill.shutemov@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=andi.kleen@intel.com \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=minchan@kernel.org \
--cc=tim.c.chen@linux.intel.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).