Re: [PATCH v4 11/11] memcg: check memcg dirty limits in page writeback

From: Greg Thelen
Date: Fri Oct 29 2010 - 12:07:13 EST


KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> writes:

> On Fri, 29 Oct 2010 00:09:14 -0700
> Greg Thelen <gthelen@xxxxxxxxxx> wrote:
>
>> If the current process is in a non-root memcg, then
>> balance_dirty_pages() will consider the memcg dirty limits
>> as well as the system-wide limits. This allows different
>> cgroups to have distinct dirty limits which trigger direct
>> and background writeback at different levels.
>>
>> Signed-off-by: Andrea Righi <arighi@xxxxxxxxxxx>
>> Signed-off-by: Greg Thelen <gthelen@xxxxxxxxxx>
>
> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
>
> Ideally, I think some comments in the code for "why we need double-check system's
> dirty limit and memcg's dirty limit" will be appreciated.

I will add to the balance_dirty_pages() comment. It will read:
/*
* balance_dirty_pages() must be called by processes which are generating dirty
* data. It looks at the number of dirty pages in the machine and will force
* the caller to perform writeback if the system is over `vm_dirty_ratio'.
* If we're over `background_thresh' then the writeback threads are woken to
* perform some writeout. The current task may have per-memcg dirty
* limits, which are also checked.
*/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/