Add an entry in /proc/scheduler which reads out the running cpu scheduler's name. Signed-off-by: Con Kolivas Index: linux-2.6.10-rc1-mm2-plugsched1/fs/proc/proc_misc.c =================================================================== --- linux-2.6.10-rc1-mm2-plugsched1.orig/fs/proc/proc_misc.c 2004-10-30 00:19:30.452320081 +1000 +++ linux-2.6.10-rc1-mm2-plugsched1/fs/proc/proc_misc.c 2004-10-30 00:20:14.086339759 +1000 @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -265,6 +266,18 @@ static int version_read_proc(char *page, return proc_calc_metrics(page, start, off, count, eof, len); } +static int scheduler_read_proc(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + char *sched_name = scheduler->cpusched_name; + int len; + + strcpy(page, sched_name); + strcat(page, "\n"); + len = strlen(page); + return proc_calc_metrics(page, start, off, count, eof, len); +} + extern struct seq_operations cpuinfo_op; static int cpuinfo_open(struct inode *inode, struct file *file) { @@ -608,6 +621,7 @@ void __init proc_misc_init(void) {"cmdline", cmdline_read_proc}, {"locks", locks_read_proc}, {"execdomains", execdomains_read_proc}, + {"scheduler", scheduler_read_proc}, {NULL,} }; for (p = simple_ones; p->name; p++)