[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110302231727.GG2547@redhat.com>
Date: Wed, 2 Mar 2011 18:17:27 -0500
From: Vivek Goyal <vgoyal@...hat.com>
To: Greg Thelen <gthelen@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
containers@...ts.osdl.org, Andrea Righi <arighi@...eler.com>,
Balbir Singh <balbir@...ux.vnet.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
Minchan Kim <minchan.kim@...il.com>,
Ciju Rajan K <ciju@...ux.vnet.ibm.com>,
David Rientjes <rientjes@...gle.com>,
Wu Fengguang <fengguang.wu@...el.com>,
Chad Talbott <ctalbott@...gle.com>,
Justin TerAvest <teravest@...gle.com>
Subject: Re: [PATCH v5 9/9] memcg: check memcg dirty limits in page writeback
On Fri, Feb 25, 2011 at 01:36:00PM -0800, Greg Thelen wrote:
[..]
> @@ -500,18 +527,27 @@ static void balance_dirty_pages(struct address_space *mapping,
> };
>
> global_dirty_info(&sys_info);
> + if (!memcg_dirty_info(NULL, &memcg_info))
> + memcg_info = sys_info;
>
> /*
> * Throttle it only when the background writeback cannot
> * catch-up. This avoids (excessively) small writeouts
> * when the bdi limits are ramping up.
> */
> - if (dirty_info_reclaimable(&sys_info) + sys_info.nr_writeback <=
> + if ((dirty_info_reclaimable(&sys_info) +
> + sys_info.nr_writeback <=
> (sys_info.background_thresh +
> - sys_info.dirty_thresh) / 2)
> + sys_info.dirty_thresh) / 2) &&
> + (dirty_info_reclaimable(&memcg_info) +
> + memcg_info.nr_writeback <=
> + (memcg_info.background_thresh +
> + memcg_info.dirty_thresh) / 2))
> break;
>
> - bdi_thresh = bdi_dirty_limit(bdi, sys_info.dirty_thresh);
> + bdi_thresh = bdi_dirty_limit(bdi,
> + min(sys_info.dirty_thresh,
> + memcg_info.dirty_thresh));
> bdi_thresh = task_dirty_limit(current, bdi_thresh);
Greg, so currently we seem to have per_bdi/per_task dirty limits and
now with this patch it will sort of become per_cgroup/per_bdi/per_task
dirty limits? I think that kind of makes sense to me.
Thanks
Vivek
--
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