[PATCH 0/2] memcg: Reduce usage at change limit

From: KAMEZAWA Hiroyuki
Date: Mon Jun 16 2008 - 23:27:04 EST


Hi, this is a patch for reducing usage at the change of limit for memcg.
A cut out from hierarchy patch set.I added Andrew Morton to CC.

I think this version is enough neat and small.
This patch implements only necessary things.

Change log (hierarchy set's) v4 -> (this version) v5.
- just for changing limit.
- avoid to add rich limit handlers to res_counter because..
1. memcg is maybe an only user which shrink_usage can be implemented.
2. Many objections ;)

This patch adds feedback control at set_limit as following

-> user's request to set limit to 'val'
1. try to set limit to 'val'
2. at success goto 6.
3. try to shrink usage...
4. if we cannot make progress any more, return -EBUSY.
5. goto 1.
6. successs.

Tested on x86-64.

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/