diff options
author | Kirill A. Shutemov | 2012-12-12 22:51:12 +0100 |
---|---|---|
committer | Linus Torvalds | 2012-12-13 02:38:32 +0100 |
commit | 79da5407eeadc740fbf4b45d6df7d7f8e6adaf2c (patch) | |
tree | a9f1ca92b2711bb84a4707c904fcada24614d60e /Documentation/vm | |
parent | thp, vmstat: implement HZP_ALLOC and HZP_ALLOC_FAILED events (diff) | |
download | kernel-qcow2-linux-79da5407eeadc740fbf4b45d6df7d7f8e6adaf2c.tar.gz kernel-qcow2-linux-79da5407eeadc740fbf4b45d6df7d7f8e6adaf2c.tar.xz kernel-qcow2-linux-79da5407eeadc740fbf4b45d6df7d7f8e6adaf2c.zip |
thp: introduce sysfs knob to disable huge zero page
By default kernel tries to use huge zero page on read page fault. It's
possible to disable huge zero page by writing 0 or enable it back by
writing 1:
echo 0 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page
echo 1 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/vm')
-rw-r--r-- | Documentation/vm/transhuge.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt index 60aeedd54615..8785fb87d9c7 100644 --- a/Documentation/vm/transhuge.txt +++ b/Documentation/vm/transhuge.txt @@ -116,6 +116,13 @@ echo always >/sys/kernel/mm/transparent_hugepage/defrag echo madvise >/sys/kernel/mm/transparent_hugepage/defrag echo never >/sys/kernel/mm/transparent_hugepage/defrag +By default kernel tries to use huge zero page on read page fault. +It's possible to disable huge zero page by writing 0 or enable it +back by writing 1: + +echo 0 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page +echo 1 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page + khugepaged will be automatically started when transparent_hugepage/enabled is set to "always" or "madvise, and it'll be automatically shutdown if it's set to "never". |