PlugSched-5.1 for 2.6.12-rc6 and 2.6.12-rc6-mm1
The patch of PlugSched-5.1 for 2.6.12-rc5 applies cleanly to 2.6.12-rc6 and is available at:
<http://prdownloads.sourceforge.net/cpuse/plugsched-5.1-for-2.6.12-rc5.patch?download>
A (new) patch for 2.6.12-rc6-mm1 is available at:
<http://prdownloads.sourceforge.net/cpuse/plugsched-5.1-for-2.6.12-rc6-mm1.patch?download>
Very Brief Documentation:
You can select a default scheduler at kernel build time. If you wish to boot with a scheduler other than the default it can be selected at boot time by adding:
cpusched=<scheduler>
to the boot command line where <scheduler> is one of: ingosched, nicksched, staircase, spa_no_frills or zaphod. If you don't change the default when you build the kernel the default scheduler will be ingosched (which is the normal scheduler).
The scheduler in force on a running system can be determined by the contents of:
/proc/scheduler
Control parameters for the scheduler can be read/set via files in:
/sys/cpusched/<scheduler>/
Peter
Signature · 9 lines
Peter Williams [email protected] "Learning, n. The kind of ignorance distinguishing the studious." -- Ambrose Bierce - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Quoted 2 lines · Peter Williams
The patch of PlugSched-5.1 for 2.6.12-rc5 applies cleanly to 2.6.12-rc6 and is available at:
Hi Peter
The recent fix that Ingo posted for the changes to pipe code affects significantly the behaviour of the mainline scheduler and should be incorporated as soon as possible. Staircase has undergone substantial revision in response to this change, fortunately to its advantage removing all that extra code I added to your last plugsched version. Anyway here is a patch committing Ingo's pipe signalling changes, and the update to staircase 11.3 in line with those changes. None of this changes the way the other cpu schedulers behave but it may be worth investigating how the pipe changes affect the behaviour of the ones you maintain.
Cheers,
Con
fs/pipe.c +5 -1
@@ -39,7 +39,11 @@ void pipe_wait(struct inode * inode) {DEFINE_WAIT (wait); -prepare_to_wait (PIPE_WAIT (*inode), &wait,TASK_INTERRUPTIBLE ); +/* +* Pipes are system-local resources, so sleeping on them +* is considered a noninteractive wait: +*/ +prepare_to_wait (PIPE_WAIT (*inode), &wait,TASK_INTERRUPTIBLE |TASK_NONINTERACTIVE );up (PIPE_SEM (*inode));schedule ();finish_wait (PIPE_WAIT (*inode), &wait);
include/linux/sched.h +1 -0
@@ -112,6 +112,7 @@ extern unsigned long nr_iowait(void);#define TASK_TRACED 8#define EXIT_ZOMBIE 16#define EXIT_DEAD 32 +#define TASK_NONINTERACTIVE 64#define __set_task_state (tsk, state_value) \ do { (tsk)->state = (state_value); } while (0)
include/linux/sched_drv.h +0 -1
@@ -27,7 +27,6 @@ struct sched_drv {int (*move_tasks)(runqueue_t *,int ,runqueue_t *,unsigned long ,struct sched_domain *,enum idle_type );#endif -void (*systime_hook)(runqueue_t *,cputime_t );void (*tick)(struct task_struct *,struct runqueue *,unsigned long long );#ifdef CONFIG_SCHED_SMT struct task_struct *(*head_of_queue)(union runqueue_queue *);
include/linux/sched_runq.h +0 -1
@@ -41,7 +41,6 @@ struct staircase_runqueue_queue {struct list_head queue[STAIRCASE_NUM_PRIO_SLOTS -1 ];unsigned int cache_ticks; unsigned int preempted; - unsigned long systime_centile; };#endif
kernel/ingosched.c +10 -2
@@ -388,6 +388,16 @@ static void ingo_wake_up_task(struct tas }/* +* Tasks that have marked their sleep as noninteractive get +* woken up without updating their sleep average. (i.e. their +* sleep is handled in a priority-neutral manner, no priority +* boost and no penalty.) +*/ +if (old_state &TASK_NONINTERACTIVE ) +__activate_task (p, rq); +else +activate_task (p, rq, same_cpu); +/* * Sync wakeups (i.e. those types of wakeups where the waker * has indicated that it will leave the CPU in short order) * don't trigger a preemption, if the woken up task will run on
@@ -395,7 +405,6 @@ static void ingo_wake_up_task(struct tas* the waker guarantees that the freshly woken up task is going * to be considered on this CPU.) */ -activate_task (p, rq, same_cpu);if (!sync || !same_cpu) {if (TASK_PREEMPTS_CURR (p, rq))resched_task (rq->curr);
@@ -1148,7 +1157,6 @@ const struct sched_drv ingo_sched_drv =#ifdef CONFIG_SMP .move_tasks = ingo_move_tasks, #endif - .systime_hook = blank_systime_hook, .tick = ingo_tick, #ifdef CONFIG_SCHED_SMT .head_of_queue = ingo_head_of_queue,
kernel/nicksched.c +0 -1
@@ -965,7 +965,6 @@ const struct sched_drv nick_sched_drv =#ifdef CONFIG_SMP .move_tasks = nick_move_tasks, #endif - .systime_hook = blank_systime_hook, .tick = nick_tick, #ifdef CONFIG_SCHED_SMT .head_of_queue = nick_head_of_queue,
kernel/sched.c +0 -1
@@ -1401,7 +1401,6 @@ void account_system_time(struct task_stracct_update_integrals (p);/* Update rss highwater mark */ update_mem_hiwater (p); - sched_drvp->systime_hook (rq, cputime); }/*
kernel/sched_drv.c +0 -7
@@ -135,10 +135,3 @@ void __init sched_drv_sysfs_init(void) (void )kobject_register (&sched_drv_kobj); } } - -/* -* Dummy functions -*/ -void blank_systime_hook (runqueue_t *rq,cputime_t cputime) -{ -}
kernel/sched_spa.c +0 -2
@@ -1498,7 +1498,6 @@ const struct sched_drv spa_nf_sched_drv#ifdef CONFIG_SMP .move_tasks = spa_move_tasks, #endif - .systime_hook = blank_systime_hook, .tick = spa_tick, #ifdef CONFIG_SCHED_SMT .head_of_queue = spa_head_of_queue,
@@ -1545,7 +1544,6 @@ const struct sched_drv zaphod_sched_drv .head_of_queue = spa_head_of_queue, .dependent_sleeper_trumps = spa_dependent_sleeper_trumps, #endif - .systime_hook = blank_systime_hook, .schedule = spa_schedule, .set_normal_task_nice = spa_set_normal_task_nice, .setscheduler = spa_setscheduler,
kernel/staircase.c +23 -31
143 lines not on this page · raw message
Quoted 10 lines · Con Kolivas
Quoted 2 lines · Peter Williams
The patch of PlugSched-5.1 for 2.6.12-rc5 applies cleanly to 2.6.12-rc6 and is available at:
Hi Peter
The recent fix that Ingo posted for the changes to pipe code affects significantly the behaviour of the mainline scheduler and should be incorporated as soon as possible. Staircase has undergone substantial revision in response to this change, fortunately to its advantage removing all that extra code I added to your last plugsched version. Anyway here is a patch committing Ingo's pipe signalling changes, and the update to staircase 11.3 in line with those changes. None of this changes the way the other cpu schedulers behave but it may be worth investigating how the pipe changes affect the behaviour of the ones you maintain.
Thanks. I've incorporated this patch plus some modifications to the Zaphod scheduler to take advantage of the TASK_NONINTERACTIVE flag into v-5.2 of PlugSched for 2.6.11, 2.6.12-rc6 and 2.6.12-rc6-mm1 kernels. Patches to upgrade v-5.1 to v-5.2 are available at:
<http://prdownloads.sourceforge.net/cpuse/plugsched-5.1-to-5.2-for-2.6.11.patch?download>
<http://prdownloads.sourceforge.net/cpuse/plugsched-5.1-to-5.2-for-2.6.12-rc6.patch?download>
<http://prdownloads.sourceforge.net/cpuse/plugsched-5.1-to-5.2-for-2.6.12-rc6-mm1.patch?download>
I noticed when doing this conversion that I had botched the propagation of your staircase 11.2 patches into the 2.6.12-rc6-mm1 kernel and anyone using the staircase scheduler in that kernel is advised to upgrade to this patch.
Peter
Signature · 4 lines
Peter Williams [email protected] "Learning, n. The kind of ignorance distinguishing the studious." -- Ambrose Bierce