]> git.baikalelectronics.ru Git - kernel.git/commit
ksm: more on default values
authorHugh Dickins <hugh.dickins@tiscali.co.uk>
Wed, 7 Oct 2009 23:32:22 +0000 (16:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 8 Oct 2009 14:36:38 +0000 (07:36 -0700)
commit250d7fe0da77903e173449bc5876563276e9d8a4
treee9af7ebc13854e03e9ea0ee1c4e7e00475506fa7
parent3d1d5e6f216c3fc4e28622d4db781c17b25d72d7
ksm: more on default values

Adjust the max_kernel_pages default to a quarter of totalram_pages,
instead of nr_free_buffer_pages() / 4: the KSM pages themselves come from
highmem, and even on a 16GB PAE machine, 4GB of KSM pages would only be
pinning 32MB of lowmem with their rmap_items, so no need for the more
obscure calculation (nor for its own special init function).

There is no way for the user to switch KSM on if CONFIG_SYSFS is not
enabled, so in that case default run to KSM_RUN_MERGE.

Update KSM Documentation and Kconfig to reflect the new defaults.

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Izik Eidus <ieidus@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/vm/ksm.txt
mm/Kconfig
mm/ksm.c