diff options
Diffstat (limited to 'Documentation/cgroups/memory.txt')
-rw-r--r-- | Documentation/cgroups/memory.txt | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index 1a608877b14e..af48135bd9b8 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -152,14 +152,19 @@ When swap is accounted, following files are added. | |||
152 | 152 | ||
153 | usage of mem+swap is limited by memsw.limit_in_bytes. | 153 | usage of mem+swap is limited by memsw.limit_in_bytes. |
154 | 154 | ||
155 | Note: why 'mem+swap' rather than swap. | 155 | * why 'mem+swap' rather than swap. |
156 | The global LRU(kswapd) can swap out arbitrary pages. Swap-out means | 156 | The global LRU(kswapd) can swap out arbitrary pages. Swap-out means |
157 | to move account from memory to swap...there is no change in usage of | 157 | to move account from memory to swap...there is no change in usage of |
158 | mem+swap. | 158 | mem+swap. In other words, when we want to limit the usage of swap without |
159 | 159 | affecting global LRU, mem+swap limit is better than just limiting swap from | |
160 | In other words, when we want to limit the usage of swap without affecting | 160 | OS point of view. |
161 | global LRU, mem+swap limit is better than just limiting swap from OS point | 161 | |
162 | of view. | 162 | * What happens when a cgroup hits memory.memsw.limit_in_bytes |
163 | When a cgroup his memory.memsw.limit_in_bytes, it's useless to do swap-out | ||
164 | in this cgroup. Then, swap-out will not be done by cgroup routine and file | ||
165 | caches are dropped. But as mentioned above, global LRU can do swapout memory | ||
166 | from it for sanity of the system's memory management state. You can't forbid | ||
167 | it by cgroup. | ||
163 | 168 | ||
164 | 2.5 Reclaim | 169 | 2.5 Reclaim |
165 | 170 | ||