Skip to contentSkip to conversation

linsched: add the functions for setting scheduler proc parameters

PATCH New Michael Wang 1 participant 1 message Apr 27, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 linsched: add the functions for setting scheduler proc parameters

From: Michael Wang <[email protected]>

This patch add the functions for setting scheduler proc parameters. Currently support:

	sysctl_sched_child_runs_first;
	sysctl_sched_min_granularity;
	sysctl_sched_latency;
	sysctl_sched_wakeup_granularity;
---
 arch/linsched/kernel/misc.c     |    3 --
 tools/linsched/Makefile.inc     |    3 +-
 tools/linsched/linsched_proc.c  |   46 +++++++++++++++++++++++++++++++++++++++
 tools/linsched/linsched_proc.h  |    6 +++++
 tools/linsched/linux_linsched.c |    1 +
 5 files changed, 55 insertions(+), 4 deletions(-)
 create mode 100644 tools/linsched/linsched_proc.c
 create mode 100644 tools/linsched/linsched_proc.h
arch/linsched/kernel/misc.c +0 -3
index abb1cb4..a76d397 100644
@@ -334,8 +334,5 @@ int proc_dointvec(struct ctl_table *table, int write,
 int proc_dointvec_minmax(struct ctl_table *table, int write,
 		    void __user *buffer, size_t *lenp, loff_t *ppos)
 {
-	/* should be unused */
-	BUG();
-
 	return 0;
 }
tools/linsched/Makefile.inc +2 -1
index 441f7e3..15a344b 100644
@@ -25,7 +25,8 @@ LINSCHED_OBJS = ${LINSCHED_DIR}/linux_linsched.o \
 		${LINSCHED_DIR}/nohz_tracking.o \
 		${LINSCHED_DIR}/linsched_rand.o \
 		${LINSCHED_DIR}/linsched_sim.o \
-		${LINSCHED_DIR}/stubs/sched.o
+		${LINSCHED_DIR}/stubs/sched.o \
+		${LINSCHED_DIR}/linsched_proc.o
 
 LINUX_OBJS =	${LINUXDIR}/kernel/notifier.o \
 		${LINUXDIR}/kernel/timer.o \
tools/linsched/linsched_proc.c new file +46 -0

46 lines not on this page · raw message

tools/linsched/linsched_proc.h new file +6 -0
new file mode 100644
index 0000000..4c27297
@@ -0,0 +1,6 @@
+#ifndef LINSCHED_PROC_H
+#define LINSCHED_PROC_H
+
+void set_linsched_proc(char *procname, unsigned long value);
+
+#endif
tools/linsched/linux_linsched.c +1 -0
index ca07a73..6c24578 100644
@@ -41,6 +41,7 @@
 
 #include "linsched_rand.h"
 #include "load_balance_score.h"
+#include "linsched_proc.h"
 
 /* linsched variables and functions */
 
Signature · 1 line
1.7.1