On Thu, Apr 21, 2011 at 10:27 PM, KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> wrote:
> +static unsigned long shrink_mem_cgroup(struct mem_cgroup *mem_cont, int order)this one and
> +{
> + return 0;
> +}
(snip)
> @@ -2672,36 +2686,48 @@ int kswapd(void *p)
> /*this one shold be placed in "[7/9] Per-memcg background reclaim". isn't it?
> * We can speed up thawing tasks if we don't call balance_pgdat
> * after returning from the refrigerator
> */
> - if (!ret) {
> + if (is_global_kswapd(kswapd_p)) {
> trace_mm_vmscan_kswapd_wake(pgdat->node_id, order);
> order = balance_pgdat(pgdat, order, &classzone_idx);
> + } else {
> + mem = mem_cgroup_get_shrink_target();
> + if (mem)
> + shrink_mem_cgroup(mem, order);
> + mem_cgroup_put_shrink_target(mem);
> }
> }
This is the infrastructure, and the shrink_mem_cgroup() is a noop. The [7/9] is the actual implementation.
--Ying