[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090305181323.19dbebf9.kamezawa.hiroyu@jp.fujitsu.com>
Date: Thu, 5 Mar 2009 18:13:23 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc: balbir@...ux.vnet.ibm.com, linux-mm@...ck.org,
Sudhir Kumar <skumar@...ux.vnet.ibm.com>,
YAMAMOTO Takashi <yamamoto@...inux.co.jp>,
Bharata B Rao <bharata@...ibm.com>,
Paul Menage <menage@...gle.com>, lizf@...fujitsu.com,
linux-kernel@...r.kernel.org,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
David Rientjes <rientjes@...gle.com>,
Pavel Emelianov <xemul@...nvz.org>,
Dhaval Giani <dhaval@...ux.vnet.ibm.com>,
Rik van Riel <riel@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 0/4] Memory controller soft limit patches (v3)
I wrote almost all concerns are addressed but following part is a concern.
On Thu, 5 Mar 2009 18:04:10 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:
> @@ -1758,6 +1778,7 @@ static unsigned long balance_pgdat(pg_da
> {
> int all_zones_ok;
> int priority;
> + int nid = pgdat->node_id;
> int i;
> unsigned long total_scanned;
> struct reclaim_state *reclaim_state = current->reclaim_state;
> @@ -1785,6 +1806,8 @@ loop_again:
> for (i = 0; i < pgdat->nr_zones; i++)
> temp_priority[i] = DEF_PRIORITY;
>
> + mem_cgroup_update_softlimit_hint(nid);
> +
> for (priority = DEF_PRIORITY; priority >= 0; priority--) {
> int end_zone = 0; /* Inclusive. 0 = ZONE_DMA */
> unsigned long lru_pages = 0;
> @@ -1863,8 +1886,17 @@ loop_again:
> * zone has way too many pages free already.
> */
> if (!zone_watermark_ok(zone, order, 8*zone->pages_high,
> - end_zone, 0))
> - shrink_zone(priority, zone, &sc);
> + end_zone, 0)) {
> + /*
> + * If priority is not so bad, try softlimit
> + * of memcg.
> + */
> + if (!(priority < DEF_PRIORITY - 2))
> + softlimit_shrink_zone(nid, i,
> + priority, zone, &sc);
> + else
> + shrink_zone(priority, zone, &sc);
> + }
> reclaim_state->reclaimed_slab = 0;
> nr_slab = shrink_slab(sc.nr_scanned, GFP_KERNEL,
> lru_pages);
This may increase priority to unexpected level, So, insert softlimit_shrink_zone()
before diving into this priority loop of balance_pgdat() may be better.
Thanks,
-Kame
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists