Skip to content

Commit

Permalink
cgroup memory controller: document huge memory/cache overhead in Kconfig
Browse files Browse the repository at this point in the history
Document huge memory/cache overhead of memory controller in Kconfig

I was a little surprised that 2.6.25-rc* increased struct page for the
memory controller.  At least on many x86-64 machines it will not fit into a
single cache line now anymore and also costs considerable amounts of RAM.
At earlier review I remembered asking for a external data structure for
this.

It's also quite unobvious that a innocent looking Kconfig option with a
single line Kconfig description has such a negative effect.

This patch attempts to document these disadvantages at least so that users
configuring their kernel can make a informed decision.

Signed-off-by: Andi Kleen <[email protected]>
Cc: Balbir Singh <[email protected]>
Acked-by: Paul Menage <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Feb 24, 2008
1 parent 00d6296 commit 0835ab5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,14 @@ config CGROUP_MEM_CONT
Provides a memory controller that manages both page cache and
RSS memory.

Note that setting this option increases fixed memory overhead
associated with each page of memory in the system by 4/8 bytes
and also increases cache misses because struct page on many 64bit
systems will not fit into a single cache line anymore.

Only enable when you're ok with these trade offs and really
sure you need the memory controller.

config PROC_PID_CPUSET
bool "Include legacy /proc/<pid>/cpuset file"
depends on CPUSETS
Expand Down

0 comments on commit 0835ab5

Please sign in to comment.