diff options
Diffstat (limited to 'Documentation/cgroups/memory.txt')
-rw-r--r-- | Documentation/cgroups/memory.txt | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index 9b1067afb224..6a066a270fc5 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -184,12 +184,14 @@ behind this approach is that a cgroup that aggressively uses a shared | |||
184 | page will eventually get charged for it (once it is uncharged from | 184 | page will eventually get charged for it (once it is uncharged from |
185 | the cgroup that brought it in -- this will happen on memory pressure). | 185 | the cgroup that brought it in -- this will happen on memory pressure). |
186 | 186 | ||
187 | But see section 8.2: when moving a task to another cgroup, its pages may | ||
188 | be recharged to the new cgroup, if move_charge_at_immigrate has been chosen. | ||
189 | |||
187 | Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used. | 190 | Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used. |
188 | When you do swapoff and make swapped-out pages of shmem(tmpfs) to | 191 | When you do swapoff and make swapped-out pages of shmem(tmpfs) to |
189 | be backed into memory in force, charges for pages are accounted against the | 192 | be backed into memory in force, charges for pages are accounted against the |
190 | caller of swapoff rather than the users of shmem. | 193 | caller of swapoff rather than the users of shmem. |
191 | 194 | ||
192 | |||
193 | 2.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP) | 195 | 2.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP) |
194 | 196 | ||
195 | Swap Extension allows you to record charge for swap. A swapped-in page is | 197 | Swap Extension allows you to record charge for swap. A swapped-in page is |
@@ -430,17 +432,10 @@ hierarchical_memory_limit - # of bytes of memory limit with regard to hierarchy | |||
430 | hierarchical_memsw_limit - # of bytes of memory+swap limit with regard to | 432 | hierarchical_memsw_limit - # of bytes of memory+swap limit with regard to |
431 | hierarchy under which memory cgroup is. | 433 | hierarchy under which memory cgroup is. |
432 | 434 | ||
433 | total_cache - sum of all children's "cache" | 435 | total_<counter> - # hierarchical version of <counter>, which in |
434 | total_rss - sum of all children's "rss" | 436 | addition to the cgroup's own value includes the |
435 | total_mapped_file - sum of all children's "cache" | 437 | sum of all hierarchical children's values of |
436 | total_pgpgin - sum of all children's "pgpgin" | 438 | <counter>, i.e. total_cache |
437 | total_pgpgout - sum of all children's "pgpgout" | ||
438 | total_swap - sum of all children's "swap" | ||
439 | total_inactive_anon - sum of all children's "inactive_anon" | ||
440 | total_active_anon - sum of all children's "active_anon" | ||
441 | total_inactive_file - sum of all children's "inactive_file" | ||
442 | total_active_file - sum of all children's "active_file" | ||
443 | total_unevictable - sum of all children's "unevictable" | ||
444 | 439 | ||
445 | # The following additional stats are dependent on CONFIG_DEBUG_VM. | 440 | # The following additional stats are dependent on CONFIG_DEBUG_VM. |
446 | 441 | ||
@@ -622,8 +617,7 @@ memory cgroup. | |||
622 | bit | what type of charges would be moved ? | 617 | bit | what type of charges would be moved ? |
623 | -----+------------------------------------------------------------------------ | 618 | -----+------------------------------------------------------------------------ |
624 | 0 | A charge of an anonymous page(or swap of it) used by the target task. | 619 | 0 | A charge of an anonymous page(or swap of it) used by the target task. |
625 | | Those pages and swaps must be used only by the target task. You must | 620 | | You must enable Swap Extension(see 2.4) to enable move of swap charges. |
626 | | enable Swap Extension(see 2.4) to enable move of swap charges. | ||
627 | -----+------------------------------------------------------------------------ | 621 | -----+------------------------------------------------------------------------ |
628 | 1 | A charge of file pages(normal file, tmpfs file(e.g. ipc shared memory) | 622 | 1 | A charge of file pages(normal file, tmpfs file(e.g. ipc shared memory) |
629 | | and swaps of tmpfs file) mmapped by the target task. Unlike the case of | 623 | | and swaps of tmpfs file) mmapped by the target task. Unlike the case of |
@@ -636,8 +630,6 @@ memory cgroup. | |||
636 | 630 | ||
637 | 8.3 TODO | 631 | 8.3 TODO |
638 | 632 | ||
639 | - Implement madvise(2) to let users decide the vma to be moved or not to be | ||
640 | moved. | ||
641 | - All of moving charge operations are done under cgroup_mutex. It's not good | 633 | - All of moving charge operations are done under cgroup_mutex. It's not good |
642 | behavior to hold the mutex too long, so we may need some trick. | 634 | behavior to hold the mutex too long, so we may need some trick. |
643 | 635 | ||