[RFC][PATCH 0/3] memory controller soft limit (Yet Another One) v1

From: KAMEZAWA Hiroyuki
Date: Fri Mar 06 2009 - 05:36:20 EST



I don't say this should go but there are big distance between Balbir and me, so
showing what I'm thinking of in a patch.

[1/3] interface of softlimit.
[2/3] recalaim logic of softlimit
[3/3] documenation.

Characteristic is.

1. No hook to fast path.
2. memory.softlimit_priority file is used in addtion to memory.softlimit file.
3. vicitm cgroup at softlimit depends on priority given by user.
4. softlimit can be set to any cgroup even if it's children in hierarchy.
5. has some logic to sync with kswapd()'s balance_pgdat().

This patch should be sophisticated to some extent.(and may have bug.)

Example) Assume group_A which uses hierarchy and childrsn 01, 02, 03.
The lower number priority, the less memory is reclaimd.

/group_A/ softlimit=300M priority=0 (priority0 is ignored)
01/ softlimit=unlimited priority=1
02/ softlimit=unlimited priority=3
03/ softlimit=unlimited priority=3

1. When kswapd runs, memory will be reclaimed by 02 and 03 in round-robin.
2. If no memory can be reclaimed from 02 and 03, memory will be reclaimed from 01
3. If no memory can be reclaimed from 01,02,03, global shrink_zone() is called.

I'm sorry if my response is too slow.

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/