mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][plugsched 10/28] Make io_schedule private
@ 2004-10-30 14:38 Con Kolivas
  0 siblings, 0 replies; only message in thread
From: Con Kolivas @ 2004-10-30 14:38 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 --]

Make io_schedule private



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

Make io_schedule and friends private to each scheduler as well.

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


Index: linux-2.6.10-rc1-mm2-plugsched1/include/linux/sched.h
===================================================================
--- linux-2.6.10-rc1-mm2-plugsched1.orig/include/linux/sched.h	2004-10-29 21:45:07.558373818 +1000
+++ linux-2.6.10-rc1-mm2-plugsched1/include/linux/sched.h	2004-10-29 21:47:05.007044378 +1000
@@ -165,9 +165,6 @@ extern void show_regs(struct pt_regs *);
  */
 extern void show_stack(struct task_struct *task, unsigned long *sp);
 
-void io_schedule(void);
-long io_schedule_timeout(long timeout);
-
 extern void cpu_init (void);
 extern void trap_init(void);
 extern void update_process_times(int user);
@@ -179,6 +176,9 @@ extern unsigned long cache_decay_ticks;
 /* Is this address in the __sched functions? */
 extern int in_sched_functions(unsigned long addr);
 
+void __sched io_schedule(void);
+long __sched io_schedule_timeout(long timeout);
+
 #define	MAX_SCHEDULE_TIMEOUT	LONG_MAX
 extern signed long FASTCALL(schedule_timeout(signed long timeout));
 asmlinkage void schedule(void);
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:45:07.559373662 +1000
+++ linux-2.6.10-rc1-mm2-plugsched1/include/linux/scheduler.h	2004-10-29 21:47:05.007044378 +1000
@@ -1,5 +1,7 @@
 struct sched_drv
 {
+	void (*io_schedule)(void);
+	long (*io_schedule_timeout)(long);
 	void (*sched_idle_next)(void);
 	void (*set_oom_timeslice)(task_t *);
 	unsigned long (*nr_running)(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:03.114339760 +1000
+++ linux-2.6.10-rc1-mm2-plugsched1/kernel/sched.c	2004-10-29 21:47:05.009044066 +1000
@@ -3169,7 +3169,7 @@ static long ingo_sys_sched_yield(void)
  * But don't do that if it is a deliberate, throttling IO wait (this task
  * has set its backing_dev_info: the queue against which it should throttle)
  */
-void __sched io_schedule(void)
+static void __sched ingo_io_schedule(void)
 {
 	struct runqueue *rq = &per_cpu(runqueues, _smp_processor_id());
 
@@ -3178,9 +3178,7 @@ void __sched io_schedule(void)
 	atomic_dec(&rq->nr_iowait);
 }
 
-EXPORT_SYMBOL(io_schedule);
-
-long __sched io_schedule_timeout(long timeout)
+static long __sched ingo_io_schedule_timeout(long timeout)
 {
 	struct runqueue *rq = &per_cpu(runqueues, _smp_processor_id());
 	long ret;
@@ -4384,6 +4382,8 @@ void destroy_sched_domain_sysctl()
 #endif
 
 struct sched_drv ingo_sched_drv = {
+	.io_schedule		= ingo_io_schedule,
+	.io_schedule_timeout	= ingo_io_schedule_timeout,
 	.set_oom_timeslice	= ingo_set_oom_timeslice,
 	.nr_running		= ingo_nr_running,
 	.nr_uninterruptible	= ingo_nr_uninterruptible,
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:03.115339604 +1000
+++ linux-2.6.10-rc1-mm2-plugsched1/kernel/scheduler.c	2004-10-29 21:47:05.010043910 +1000
@@ -643,6 +643,17 @@ void sched_idle_next(void)
 	scheduler->sched_idle_next();
 }
 
+void __sched io_schedule(void)
+{
+	scheduler->io_schedule();
+}
+EXPORT_SYMBOL(io_schedule);
+
+long __sched io_schedule_timeout(long timeout)
+{
+	return scheduler->io_schedule_timeout(timeout);
+}
+
 unsigned long nr_running(void)
 {
 	return scheduler->nr_running();


[-- 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:13 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:38 [PATCH][plugsched 10/28] Make io_schedule private Con Kolivas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome