lkml.org 
[lkml]   [2008]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: + cgroup-memory-controller-document-huge-memory-cache-overhead-in-kconfig.patch added to -mm tree
On Sat, Feb 23, 2008 at 1:02 PM,  <akpm@linux-foundation.org> wrote:
>
> The patch titled
> cgroup memory controller: document huge memory/cache overhead in Kconfig
> has been added to the -mm tree. Its filename is
> cgroup-memory-controller-document-huge-memory-cache-overhead-in-kconfig.patch
>
> Before you just go and hit "reply", please:
> a) Consider who else should be cc'ed
> b) Prefer to cc a suitable mailing list as well
> c) Ideally: find the original patch on the mailing list and do a
> reply-to-all to that, adding suitable additional cc's
>
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
>
> See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
> out what to do about this
>
> The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
>
> ------------------------------------------------------
> Subject: cgroup memory controller: document huge memory/cache overhead in Kconfig
> From: Andi Kleen <andi@firstfloor.org>
>
> 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 <ak@suse.de>
> Cc: Balbir Singh <balbir@in.ibm.com>
> Acked-by: Paul Menage <menage@google.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> init/Kconfig | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff -puN init/Kconfig~cgroup-memory-controller-document-huge-memory-cache-overhead-in-kconfig init/Kconfig
> --- a/init/Kconfig~cgroup-memory-controller-document-huge-memory-cache-overhead-in-kconfig
> +++ a/init/Kconfig
> @@ -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.
> +

Andrew,

I asked Andi what architectures have a cacheline size such that 56
bytes would fit in the cache, but 64 bytes would not. I have not heard
back. I would like Andi's approval to change the text to

Note that setting this option increases fixed memory overhead
associated with each page of memory in the system by 4/8 bytes
Only enable when you're ok with these trade offs and really
sure you need the memory controller.

Andi, please confirm at the earliest.

Balbir


\
 
 \ /
  Last update: 2008-02-23 13:45    [W:0.234 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site