From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mel@csn.ul.ie>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Nishimura Daisuke <d-nishimura@mtf.biglobe.ne.jp>
Subject: Re: [PATCH 1/7] memcg: sc.nr_to_reclaim should be initialized
Date: Sun, 25 Jul 2010 13:55:32 +0530 [thread overview]
Message-ID: <AANLkTikpZ8iH1oO1k84kvo2qYYS96LYuNmmw6xJL-1QV@mail.gmail.com> (raw)
In-Reply-To: <20100723154638.88C8.A69D9226@jp.fujitsu.com>
On Fri, Jul 23, 2010 at 1:03 PM, KOSAKI Motohiro
<kosaki.motohiro@jp.fujitsu.com> wrote:
>> * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> [2010-07-16 19:13:31]:
>>
>> > Currently, mem_cgroup_shrink_node_zone() initialize sc.nr_to_reclaim as 0.
>> > It mean shrink_zone() only scan 32 pages and immediately return even if
>> > it doesn't reclaim any pages.
>> >
>> > This patch fixes it.
>> >
>> > Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
>> > ---
>> > mm/vmscan.c | 1 +
>> > 1 files changed, 1 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/mm/vmscan.c b/mm/vmscan.c
>> > index 1691ad0..bd1d035 100644
>> > --- a/mm/vmscan.c
>> > +++ b/mm/vmscan.c
>> > @@ -1932,6 +1932,7 @@ unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem,
>> > struct zone *zone, int nid)
>> > {
>> > struct scan_control sc = {
>> > + .nr_to_reclaim = SWAP_CLUSTER_MAX,
>> > .may_writepage = !laptop_mode,
>> > .may_unmap = 1,
>> > .may_swap = !noswap,
>>
>> Could you please do some additional testing on
>>
>> 1. How far does this push pages (in terms of when limit is hit)?
>
> 32 pages per mem_cgroup_shrink_node_zone().
>
> That said, the algorithm is here.
>
> 1. call mem_cgroup_largest_soft_limit_node()
> calculate largest cgroup
> 2. call mem_cgroup_shrink_node_zone() and shrink 32 pages
> 3. goto 1 if limit is still exceed.
>
> If it's not your intention, can you please your intended algorithm?
We set it to 0, since we care only about a single page reclaim on
hitting the limit. IIRC, in the past we saw an excessive pushback on
reclaiming SWAP_CLUSTER_MAX pages, just wanted to check if you are
seeing the same behaviour even now after your changes.
Balbir
--
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:[~2010-07-25 8:25 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-16 10:12 [PATCH 0/7] memcg reclaim tracepoint KOSAKI Motohiro
2010-07-16 10:13 ` [PATCH 1/7] memcg: sc.nr_to_reclaim should be initialized KOSAKI Motohiro
2010-07-16 10:17 ` KAMEZAWA Hiroyuki
2010-07-16 10:25 ` Mel Gorman
2010-07-21 13:34 ` KOSAKI Motohiro
2010-07-22 5:31 ` Balbir Singh
2010-07-23 7:33 ` KOSAKI Motohiro
2010-07-25 8:25 ` Balbir Singh [this message]
2010-07-25 9:48 ` KOSAKI Motohiro
2010-07-25 16:40 ` Balbir Singh
2010-07-16 10:14 ` [PATCH 2/7] memcg: mem_cgroup_shrink_node_zone() doesn't need sc.nodemask KOSAKI Motohiro
2010-07-16 10:18 ` KAMEZAWA Hiroyuki
2010-07-16 10:47 ` Mel Gorman
2010-07-22 4:49 ` Balbir Singh
2010-07-23 5:14 ` KOSAKI Motohiro
2010-07-25 8:28 ` Balbir Singh
2010-07-16 10:15 ` [PATCH 3/7] memcg: nid and zid can be calculated from zone KOSAKI Motohiro
2010-07-16 10:19 ` KAMEZAWA Hiroyuki
2010-07-16 10:56 ` Mel Gorman
2010-07-21 13:33 ` KOSAKI Motohiro
2010-07-22 5:36 ` Balbir Singh
2010-07-22 11:01 ` Mel Gorman
2010-07-16 10:16 ` [PATCH 4/7] vmscan: convert direct reclaim tracepoint to DEFINE_EVENT KOSAKI Motohiro
2010-07-16 10:20 ` KAMEZAWA Hiroyuki
2010-07-16 11:08 ` Mel Gorman
2010-07-20 22:45 ` Steven Rostedt
2010-07-16 10:16 ` [PATCH 5/7] memcg, vmscan: add memcg reclaim tracepoint KOSAKI Motohiro
2010-07-16 10:21 ` KAMEZAWA Hiroyuki
2010-07-16 11:17 ` Mel Gorman
2010-07-22 5:34 ` Balbir Singh
2010-07-16 10:17 ` [PATCH 6/7] vmscan: convert mm_vmscan_lru_isolate to DEFINE_EVENT KOSAKI Motohiro
2010-07-16 10:22 ` KAMEZAWA Hiroyuki
2010-07-16 10:18 ` [PATCH 7/7] memcg: add mm_vmscan_memcg_isolate tracepoint KOSAKI Motohiro
2010-07-16 10:23 ` KAMEZAWA Hiroyuki
2010-07-16 11:21 ` Mel Gorman
2010-07-16 13:18 ` Mel Gorman
2010-07-20 1:47 ` [PATCH 0/7] memcg reclaim tracepoint Daisuke Nishimura
2010-07-22 4:00 ` Balbir Singh
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=AANLkTikpZ8iH1oO1k84kvo2qYYS96LYuNmmw6xJL-1QV@mail.gmail.com \
--to=balbir@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=d-nishimura@mtf.biglobe.ne.jp \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
/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