aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamhoon Kim <namhoonk@cs.unc.edu>2016-03-23 09:13:40 -0400
committerNamhoon Kim <namhoonk@cs.unc.edu>2016-03-23 09:13:40 -0400
commita0039b91f779ab88e3c9acd6a2f237e24001c1e9 (patch)
treea78358a11c0fd28c9e56fc1e91f7bac843c0cdad
parentff210e0441b743890ad85c7335e41894b34a1431 (diff)
Add flush array
-rw-r--r--litmus/cache_proc.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/litmus/cache_proc.c b/litmus/cache_proc.c
index 85d86c02d6e9..2f308142d2da 100644
--- a/litmus/cache_proc.c
+++ b/litmus/cache_proc.c
@@ -804,6 +804,11 @@ static struct ctl_table cache_table[] =
804 .proc_handler = do_perf_test_proc_handler, 804 .proc_handler = do_perf_test_proc_handler,
805 }, 805 },
806 { 806 {
807 .procname = "setup_flusher",
808 .mode = 0644,
809 .proc_handler = setup_flusher_proc_handler,
810 },
811 {
807 .procname = "lockdown_reg_0", 812 .procname = "lockdown_reg_0",
808 .mode = 0644, 813 .mode = 0644,
809 .proc_handler = lockdown_reg_handler, 814 .proc_handler = lockdown_reg_handler,
@@ -991,10 +996,10 @@ int setup_flusher_array(void)
991 int node; 996 int node;
992 switch (color) { 997 switch (color) {
993 case 0: 998 case 0:
994 node = 32; 999 node = 48;
995 break; 1000 break;
996 case 1: 1001 case 1:
997 node = 33; 1002 node = 49;
998 break; 1003 break;
999 case 2: 1004 case 2:
1000 node = 50; 1005 node = 50;
@@ -1194,6 +1199,24 @@ int do_perf_test_proc_handler(struct ctl_table *table, int write,
1194 return ret; 1199 return ret;
1195} 1200}
1196 1201
1202int setup_flusher_proc_handler(struct ctl_table *table, int write,
1203 void __user *buffer, size_t *lenp, loff_t *ppos)
1204{
1205 int ret = -EINVAL;
1206
1207 if (write && flusher_pages == NULL) {
1208 ret = setup_flusher_array();
1209 printk(KERN_INFO "setup flusher return: %d\n", ret);
1210
1211 }
1212 else if (flusher_pages) {
1213 printk(KERN_INFO "flusher_pages is already set!\n");
1214 ret = 0;
1215 }
1216
1217 return ret;
1218}
1219
1197static struct ctl_table_header *litmus_sysctls; 1220static struct ctl_table_header *litmus_sysctls;
1198 1221
1199static int __init litmus_sysctl_init(void) 1222static int __init litmus_sysctl_init(void)