Re: [RFC] [PATCH 0/2] memcg: per cgroup dirty limit

From: David Rientjes
Date: Mon Feb 22 2010 - 16:16:01 EST


On Mon, 22 Feb 2010, Vivek Goyal wrote:

> dirty_ratio is easy to configure. One system wide default value works for
> all the newly created cgroups. For dirty_bytes, you shall have to
> configure each and individual cgroup with a specific value depneding on
> what is the upper limit of memory for that cgroup.
>

Agreed, it makes sense for each memcg to have a dirty_ratio that defaults
to whatever vm_dirty_ratio does, and export that constant via
linux/writeback.h. dirty_bytes would then use the same semantics as
globally so that if it is set to 0, the finer-granuality is disabled by
default and we use memcg->dirty_ratio instead.

> Secondly, memory cgroup kind of partitions global memory resource per
> cgroup. So if as long as we have global dirty ratio knobs, it makes sense
> to have per cgroup dirty ratio knob also.
>

It has a good default, too: whatever ratio of memory that was allowed to
be dirty before the memcg limit was set is still allowed by default.
--
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/