From: Tim Chen <tim.c.chen@linux.intel.com>
To: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mel@csn.ul.ie>, Minchan Kim <minchan@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Andi Kleen <ak@linux.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 09:38:18 -0700 [thread overview]
Message-ID: <1342802298.13492.59.camel@schen9-DESK> (raw)
In-Reply-To: <5008CE38.2020300@jp.fujitsu.com>
On Fri, 2012-07-20 at 12:19 +0900, Kamezawa Hiroyuki wrote:
>
> When I added batching, I didn't touch page-reclaim path because it delays
> res_counter_uncharge() and make more threads run into page reclaim.
> But, from above score, bactching seems required.
>
> And because of current design of per-zone-per-memcg-LRU, batching
> works very very well....all lru pages shrink_page_list() scans are on
> the same memcg.
>
> BTW, it's better to show 'how much improved' in patch description..
I didn't put the specific improvement in patch description as the
performance change is specific to my machine and benchmark and
improvement could be variable for others. However, I did include the
specific number in the body of my message. Hope that is enough.
>
>
> > ---
> > Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
> > diff --git a/mm/vmscan.c b/mm/vmscan.c
> > index 33dc256..aac5672 100644
> > --- a/mm/vmscan.c
> > +++ b/mm/vmscan.c
> > @@ -779,6 +779,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
> >
> > cond_resched();
> >
> > + mem_cgroup_uncharge_start();
> > while (!list_empty(page_list)) {
> > enum page_references references;
> > struct address_space *mapping;
> > @@ -1026,6 +1027,7 @@ keep_lumpy:
> >
> > list_splice(&ret_pages, page_list);
> > count_vm_events(PGACTIVATE, pgactivate);
> > + mem_cgroup_uncharge_end();
>
> I guess placing mem_cgroup_uncharge_end() just after the loop may be better looking.
I initially though of doing that. I later pushed the statement down to
after list_splice(&ret_pages, page_list) as that's when the page reclaim
is actually completed. It probably doesn't matter one way or the other.
I can move it to just after the loop if people think that's better.
Thanks for reviewing the change.
Tim
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-07-20 16:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 23:34 Tim Chen
2012-07-20 3:19 ` Kamezawa Hiroyuki
2012-07-20 4:25 ` Minchan Kim
2012-07-20 16:38 ` Tim Chen [this message]
2012-07-20 6:27 ` Johannes Weiner
2012-07-20 11:19 ` Kirill A. Shutemov
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=1342802298.13492.59.camel@schen9-DESK \
--to=tim.c.chen@linux.intel.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--cc=minchan@kernel.org \
/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