[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110607175634.b07f2e57.kamezawa.hiroyu@jp.fujitsu.com>
Date: Tue, 7 Jun 2011 17:56:34 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.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, linux-fsdevel@...r.kernel.org,
Andrea Righi <arighi@...eler.com>,
Balbir Singh <balbir@...ux.vnet.ibm.com>,
Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
Minchan Kim <minchan.kim@...il.com>,
Johannes Weiner <hannes@...xchg.org>,
Ciju Rajan K <ciju@...ux.vnet.ibm.com>,
David Rientjes <rientjes@...gle.com>,
Wu Fengguang <fengguang.wu@...el.com>,
Vivek Goyal <vgoyal@...hat.com>,
Dave Chinner <david@...morbit.com>
Subject: Re: [PATCH v8 11/12] writeback: make background writeback cgroup
aware
On Fri, 3 Jun 2011 09:12:17 -0700
Greg Thelen <gthelen@...gle.com> wrote:
> When the system is under background dirty memory threshold but a cgroup
> is over its background dirty memory threshold, then only writeback
> inodes associated with the over-limit cgroup(s).
>
> In addition to checking if the system dirty memory usage is over the
> system background threshold, over_bground_thresh() also checks if any
> cgroups are over their respective background dirty memory thresholds.
> The writeback_control.for_cgroup field is set to distinguish between a
> system and memcg overage.
>
> If performing cgroup writeback, move_expired_inodes() skips inodes that
> do not contribute dirty pages to the cgroup being written back.
>
> After writing some pages, wb_writeback() will call
> mem_cgroup_writeback_done() to update the set of over-bg-limits memcg.
>
> Signed-off-by: Greg Thelen <gthelen@...gle.com>
> ---
> Changelog since v7:
> - over_bground_thresh() now sets shared_inodes=1. In -v7 per memcg
> background writeback did not, so it did not write pages of shared
> inodes in background writeback. In the (potentially common) case
> where the system dirty memory usage is below the system background
> dirty threshold but at least one cgroup is over its background dirty
> limit, then per memcg background writeback is queued for any
> over-background-threshold cgroups. Background writeback should be
> allowed to writeback shared inodes. The hope is that writing such
> inodes has good chance of cleaning the inodes so they can transition
> from shared to non-shared. Such a transition is good because then the
> inode will remain unshared until it is written by multiple cgroup.
> Non-shared inodes offer better isolation.
If you post v9, please adds above explanation as the comments in the code.
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
--
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