linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][plugsched 19/28] Name and choose scheduler
@ 2004-10-30 14:40 Con Kolivas
  0 siblings, 0 replies; only message in thread
From: Con Kolivas @ 2004-10-30 14:40 UTC (permalink / raw)
  To: linux
  Cc: Andrew Morton, Ingo Molnar, Peter Williams, William Lee Irwin III,
	Alexander Nyberg, Nick Piggin


[-- Attachment #1.1: Type: text/plain, Size: 27 bytes --]

Name and choose scheduler


[-- Attachment #1.2: setup_scheduler.diff --]
[-- Type: text/x-patch, Size: 2060 bytes --]

Add a scheduler name and the beginnings of bootparam checking to change
scheduler at boot time.

Signed-off-by: Con Kolivas <kernel@kolivas.org>


Index: linux-2.6.10-rc1-mm2-plugsched1/include/linux/scheduler.h
===================================================================
--- linux-2.6.10-rc1-mm2-plugsched1.orig/include/linux/scheduler.h	2004-10-29 21:47:52.739595073 +1000
+++ linux-2.6.10-rc1-mm2-plugsched1/include/linux/scheduler.h	2004-10-29 21:48:05.209648954 +1000
@@ -1,5 +1,8 @@
+#define SCHED_NAME_MAX	(16)
+
 struct sched_drv
 {
+	char cpusched_name[SCHED_NAME_MAX];
 	int (*rt_task)(task_t *);
 	void (*wait_for_completion)(struct completion *);
 	void (*io_schedule)(void);
Index: linux-2.6.10-rc1-mm2-plugsched1/kernel/sched.c
===================================================================
--- linux-2.6.10-rc1-mm2-plugsched1.orig/kernel/sched.c	2004-10-29 21:47:52.743594449 +1000
+++ linux-2.6.10-rc1-mm2-plugsched1/kernel/sched.c	2004-10-29 21:48:05.211648642 +1000
@@ -4151,6 +4151,7 @@ void destroy_sched_domain_sysctl()
 #endif
 
 struct sched_drv ingo_sched_drv = {
+	.cpusched_name		= "ingosched",
 	.rt_task		= ingo_rt_task,
 	.wait_for_completion	= ingo_wait_for_completion,
 	.io_schedule		= ingo_io_schedule,
Index: linux-2.6.10-rc1-mm2-plugsched1/kernel/scheduler.c
===================================================================
--- linux-2.6.10-rc1-mm2-plugsched1.orig/kernel/scheduler.c	2004-10-29 21:47:49.051170701 +1000
+++ linux-2.6.10-rc1-mm2-plugsched1/kernel/scheduler.c	2004-10-29 21:48:05.212648486 +1000
@@ -878,7 +878,17 @@ void fastcall complete_all(struct comple
 EXPORT_SYMBOL(complete_all);
 
 extern struct sched_drv ingo_sched_drv;
-static const struct sched_drv *scheduler = &ingo_sched_drv;
+
+static struct sched_drv *scheduler = &ingo_sched_drv;
+
+static int __init scheduler_setup(char *str)
+{
+	if (!strcmp(str, "ingosched"))
+		scheduler = &ingo_sched_drv;
+	return 1;
+}
+
+__setup ("cpusched=", scheduler_setup);
 
 void fastcall __sched wait_for_completion(struct completion *x)
 {


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-30 15:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-30 14:40 [PATCH][plugsched 19/28] Name and choose scheduler Con Kolivas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).