Re: [rfc patch 4/6] memcg: reclaim statistics

From: Rik van Riel
Date: Tue May 17 2011 - 09:56:12 EST


On 05/17/2011 03:42 AM, Johannes Weiner wrote:

It does hierarchical soft limit reclaim once triggered, but I meant
that soft limits themselves have no hierarchical meaning. Say you
have the following hierarchy:

root_mem_cgroup

aaa bbb

a1 a2 b1 b2

a1-1

Consider aaa and a1 had a soft limit. If global memory arose, aaa and
all its children would be pushed back with the current scheme, the one
you are proposing, and the one I am proposing.

But now consider aaa hitting its hard limit. Regular target reclaim
will be triggered, and a1, a2, and a1-1 will be scanned equally from
hierarchical reclaim. That a1 is in excess of its soft limit is not
considered at all.

With what I am proposing, a1 and a1-1 would be pushed back more
aggressively than a2, because a1 is in excess of its soft limit and
a1-1 is contributing to that.

Ying, I think Johannes has a good point. I do not see
a way to enforce the limits properly with the scheme we
came up with at LSF, in the hierarchical scenario above.

There may be a way, but until we think of it, I suspect
it will be better to go with Johannes's scheme for now.

--
All rights reversed
--
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/