Re: [RFC][PATCH 2/8] soft limit framework in memcg.

From: KAMEZAWA Hiroyuki
Date: Fri Mar 27 2009 - 04:03:43 EST


On Fri, 27 Mar 2009 14:03:46 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
>
> Add minimal modification for soft limit to res_counter_charge() and memcontol.c
> Based on Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> 's work but most of
> features are removed. (dropped or moved to later patch.)
>
> This is for building a frame to implement soft limit handler in memcg.
> - Checks soft limit status at every charge.
> - Adds mem_cgroup_soft_limit_check() as a function to detect we need
> check now or not.
> - mem_cgroup_update_soft_limit() is a function for updates internal status
> of soft limit controller of memcg.
> - This has no hooks in uncharge path. (see later patch.)
Note:
Why I don't insert hook to uncharge() is because uncharge() is called under
spin locks (and my softlimit update() routine is heavy).
But need some hook anyway. I'll take care of this in other patch if I got new idea.

Thanks,
-Kame

--
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/