aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorBron Gondwana <brong@fastmail.fm>2008-02-05 01:29:20 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:18 -0500
commit195cf453d2c3d789cbe80e3735755f860c2fb222 (patch)
treefad48a8167744b6c091c8ca499bc78b859af8957 /kernel/sysctl.c
parent3dfa5721f12c3d5a441448086bee156887daa961 (diff)
mm/page-writeback: highmem_is_dirtyable option
Add vm.highmem_is_dirtyable toggle A 32 bit machine with HIGHMEM64 enabled running DCC has an MMAPed file of approximately 2Gb size which contains a hash format that is written randomly by the dbclean process. On 2.6.16 this process took a few minutes. With lowmem only accounting of dirty ratios, this takes about 12 hours of 100% disk IO, all random writes. Include a toggle in /proc/sys/vm/highmem_is_dirtyable which can be set to 1 to add the highmem back to the total available memory count. [akpm@linux-foundation.org: Fix the CONFIG_DETECT_SOFTLOCKUP=y build] Signed-off-by: Bron Gondwana <brong@fastmail.fm> Cc: Ethan Solomita <solo@google.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: WU Fengguang <wfg@mail.ustc.edu.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 7cb1ac3e6fff..d0b47b859067 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -84,8 +84,11 @@ extern int sysctl_stat_interval;
84extern int latencytop_enabled; 84extern int latencytop_enabled;
85 85
86/* Constants used for minimum and maximum */ 86/* Constants used for minimum and maximum */
87#ifdef CONFIG_DETECT_SOFTLOCKUP 87#if defined(CONFIG_DETECT_SOFTLOCKUP) || defined(CONFIG_HIGHMEM)
88static int one = 1; 88static int one = 1;
89#endif
90
91#ifdef CONFIG_DETECT_SOFTLOCKUP
89static int sixty = 60; 92static int sixty = 60;
90#endif 93#endif
91 94
@@ -1150,6 +1153,19 @@ static struct ctl_table vm_table[] = {
1150 .extra1 = &zero, 1153 .extra1 = &zero,
1151 }, 1154 },
1152#endif 1155#endif
1156#ifdef CONFIG_HIGHMEM
1157 {
1158 .ctl_name = CTL_UNNUMBERED,
1159 .procname = "highmem_is_dirtyable",
1160 .data = &vm_highmem_is_dirtyable,
1161 .maxlen = sizeof(vm_highmem_is_dirtyable),
1162 .mode = 0644,
1163 .proc_handler = &proc_dointvec_minmax,
1164 .strategy = &sysctl_intvec,
1165 .extra1 = &zero,
1166 .extra2 = &one,
1167 },
1168#endif
1153/* 1169/*
1154 * NOTE: do not add new entries to this table unless you have read 1170 * NOTE: do not add new entries to this table unless you have read
1155 * Documentation/sysctl/ctl_unnumbered.txt 1171 * Documentation/sysctl/ctl_unnumbered.txt