Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187221
b: refs/heads/master
c: 2e72b63
h: refs/heads/master
i:
  187219: c6e958c
v: v3
  • Loading branch information
Kirill A. Shutemov authored and Linus Torvalds committed Mar 12, 2010
1 parent 541699d commit c7cf04f
Show file tree
Hide file tree
Showing 3 changed files with 328 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 378ce724bc2a0ef1243e11c09d58a70bb6be007a
refs/heads/master: 2e72b6347c9459e6cff5634ddc815485bae6985f
19 changes: 18 additions & 1 deletion trunk/Documentation/cgroups/memory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,24 @@ Note: More type of pages(e.g. file cache, shmem,) will be supported by other
- All of moving charge operations are done under cgroup_mutex. It's not good
behavior to hold the mutex too long, so we may need some trick.

9. TODO
9. Memory thresholds

Memory controler implements memory thresholds using cgroups notification
API (see cgroups.txt). It allows to register multiple memory and memsw
thresholds and gets notifications when it crosses.

To register a threshold application need:
- create an eventfd using eventfd(2);
- open memory.usage_in_bytes or memory.memsw.usage_in_bytes;
- write string like "<event_fd> <memory.usage_in_bytes> <threshold>" to
cgroup.event_control.

Application will be notified through eventfd when memory usage crosses
threshold in any direction.

It's applicable for root and non-root cgroup.

10. TODO

1. Add support for accounting huge pages (as a separate controller)
2. Make per-cgroup scanner reclaim not-shared pages first
Expand Down
Loading

0 comments on commit c7cf04f

Please sign in to comment.