[PATCH prototype] [7/8] Add the sysctls to control pbitmaps

Andi Kleen
2008-03-18T01:12:12Z

- pbitmap_enabled: Master switch for pbitmap
- pbitmap_early_fault: Control whether pbitmap should do
early page faults or not. Default on.
- pbitmap_update_interval: How often the pbitmap should
be updated on disk.

Signed-off-by: Andi Kleen <andi@firstfloor.org>

---
kernel/sysctl.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Index: linux/kernel/sysctl.c
===================================================================
--- linux.orig/kernel/sysctl.c
+++ linux/kernel/sysctl.c
@@ -1044,6 +1044,36 @@ static struct ctl_table vm_table[] = {
.extra1 = &zero,
},
{
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "pbitmap_enabled",
+ .data = &pbitmap_enabled,
+ .maxlen = sizeof(pbitmap_enabled),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ .strategy = &sysctl_intvec,
+ .extra1 = &zero,
+ },
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "pbitmap_early_fault",
+ .data = &pbitmap_early_fault,
+ .maxlen = sizeof(pbitmap_early_fault),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ .strategy = &sysctl_intvec,
+ .extra1 = &zero,
+ },
+ {
+ .ctl_name = CTL_UNNUMBERED,
+ .procname = "pbitmap_update_interval",
+ .data = &pbitmap_update_interval,
+ .maxlen = sizeof(pbitmap_update_interval),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec,
+ .strategy = &sysctl_intvec,
+ .extra1 = &zero,
+ },
+ {
.ctl_name = VM_VFS_CACHE_PRESSURE,
.procname = "vfs_cache_pressure",
.data = &sysctl_vfs_cache_pressure,