From: Con Kolivas <kernel@kolivas.org>
To: linux <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>,
Peter Williams <pwil3058@bigpond.net.au>,
William Lee Irwin III <wli@holomorphy.com>,
Alexander Nyberg <alexn@dsv.su.se>,
Nick Piggin <nickpiggin@yahoo.com.au>
Subject: [PATCH][plugsched 10/28] Make io_schedule private
Date: Sun, 31 Oct 2004 00:38:39 +1000 [thread overview]
Message-ID: <4183A76F.9060700@kolivas.org> (raw)
[-- 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 --]
reply other threads:[~2004-10-30 15:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4183A76F.9060700@kolivas.org \
--to=kernel@kolivas.org \
--cc=akpm@osdl.org \
--cc=alexn@dsv.su.se \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=pwil3058@bigpond.net.au \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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