diff options
| author | Balbir Singh <[email protected]> | 2009-09-23 15:56:39 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2009-09-24 07:20:59 -0700 |
| commit | 4e41695356fb4e0b153be1440ad027e46e0a7ea2 (patch) | |
| tree | 547dae77d1655a1acb260ea8b266c7b8a48f2d2c /scripts | |
| parent | 75822b4495b62e8721e9b88e3cf9e653a0c85b73 (diff) | |
memory controller: soft limit reclaim on contention
Implement reclaim from groups over their soft limit
Permit reclaim from memory cgroups on contention (via the direct reclaim
path).
memory cgroup soft limit reclaim finds the group that exceeds its soft
limit by the largest number of pages and reclaims pages from it and then
reinserts the cgroup into its correct place in the rbtree.
Add additional checks to mem_cgroup_hierarchical_reclaim() to detect long
loops in case all swap is turned off. The code has been refactored and
the loop check (loop < 2) has been enhanced for soft limits. For soft
limits, we try to do more targetted reclaim. Instead of bailing out after
two loops, the routine now reclaims memory proportional to the size by
which the soft limit is exceeded. The proportion has been empirically
determined.
[[email protected]: build fix]
[[email protected]: fix softlimit css refcnt handling]
[[email protected]: refcount of the "victim" should be decremented before exiting the loop]
Signed-off-by: Balbir Singh <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Li Zefan <[email protected]>
Acked-by: KOSAKI Motohiro <[email protected]>
Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Signed-off-by: Daisuke Nishimura <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions