Skip to content

Commit

Permalink
kernel: res_counter: remove the unused API
Browse files Browse the repository at this point in the history
All memory accounting and limiting has been switched over to the
lockless page counters.  Bye, res_counter!

[[email protected]: update Documentation/cgroups/memory.txt]
[[email protected]: ditch the last remainings of res_counter]
Signed-off-by: Johannes Weiner <[email protected]>
Acked-by: Vladimir Davydov <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Paul Bolle <[email protected]>
Signed-off-by: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
hnaz authored and torvalds committed Dec 11, 2014
1 parent 71f87be commit 5b1efc0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 647 deletions.
17 changes: 8 additions & 9 deletions Documentation/cgroups/memory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,16 @@ The memory controller is the first controller developed.

2.1. Design

The core of the design is a counter called the res_counter. The res_counter
tracks the current memory usage and limit of the group of processes associated
with the controller. Each cgroup has a memory controller specific data
structure (mem_cgroup) associated with it.
The core of the design is a counter called the page_counter. The
page_counter tracks the current memory usage and limit of the group of
processes associated with the controller. Each cgroup has a memory controller
specific data structure (mem_cgroup) associated with it.

2.2. Accounting

+--------------------+
| mem_cgroup |
| (res_counter) |
| mem_cgroup |
| (page_counter) |
+--------------------+
/ ^ \
/ | \
Expand Down Expand Up @@ -352,9 +352,8 @@ set:
0. Configuration

a. Enable CONFIG_CGROUPS
b. Enable CONFIG_RESOURCE_COUNTERS
c. Enable CONFIG_MEMCG
d. Enable CONFIG_MEMCG_SWAP (to use swap extension)
b. Enable CONFIG_MEMCG
c. Enable CONFIG_MEMCG_SWAP (to use swap extension)
d. Enable CONFIG_MEMCG_KMEM (to use kmem extension)

1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?)
Expand Down
197 changes: 0 additions & 197 deletions Documentation/cgroups/resource_counter.txt

This file was deleted.

Loading

0 comments on commit 5b1efc0

Please sign in to comment.