[RFC][PATCH v7 11/14] memcg: create support routines for writeback

Greg Thelen gthelen at google.com
Sun May 15 12:56:24 PDT 2011


On Fri, May 13, 2011 at 3:04 AM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu at jp.fujitsu.com> wrote:
> On Fri, 13 May 2011 01:47:50 -0700
> Greg Thelen <gthelen at google.com> wrote:
>
>> Introduce memcg routines to assist in per-memcg writeback:
>>
>> - mem_cgroups_over_bground_dirty_thresh() determines if any cgroups need
>>   writeback because they are over their dirty memory threshold.
>>
>> - should_writeback_mem_cgroup_inode() determines if an inode is
>>   contributing pages to an over-limit memcg.
>>
>> - mem_cgroup_writeback_done() is used periodically during writeback to
>>   update memcg writeback data.
>>
>> Signed-off-by: Greg Thelen <gthelen at google.com>
>
> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com>
>
> I'm okay with the bitmap..then, problem will be when set/clear wbc->for_cgroup...

wbc->for_cgroup is only set in two conditions:

a) when mem_cgroup_balance_dirty_pages() is trying to get a cgroup
below its dirty memory foreground threshold.  This is in patch 12/14.

b) when bdi-flusher is performing background writeback and determines
that at any of the cgroup are over their respective background dirty
memory threshold.  This is in patch 13/14.


More information about the Containers mailing list