Skip to contentSkip to conversation

PlugSched-6.3.1 for 2.6.16-rc5

RFC Peter Williams 2 participants 4 messages Feb 28, 2006 – Apr 2, 2006

lore
Share & tools
lore
#0 lore raw

This version updates staircase scheduler to version 14.1 (thanks Con) and includes the latest smpnice patches

A patch for 2.6.16-rc5 is available at:

<http://prdownloads.sourceforge.net/cpuse/plugsched-6.3.1-for-2.6.16-rc5.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, ingo_ll, nicksched, staircase, spa_no_frills, spa_ws, spa_svr, spa_ebs 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 · 4 lines
Peter Williams                                   [email protected]

"Learning, n. The kind of ignorance distinguishing the studious."
 -- Ambrose Bierce
#1 lore raw
Quoted 6 lines · Peter Williams

This version updates staircase scheduler to version 14.1 (thanks Con) and includes the latest smpnice patches

A patch for 2.6.16-rc5 is available at:

<http://prdownloads.sourceforge.net/cpuse/plugsched-6.3.1-for-2.6.16-rc5.patch?download>

and for 2.6.16-rc5-mm1 at:

<http://prdownloads.sourceforge.net/cpuse/plugsched-6.3.1-for-2.6.16-rc5-mm1.patch?download>

Quoted 24 lines

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, ingo_ll, nicksched, staircase, spa_no_frills, spa_ws, spa_svr, spa_ebs 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 · 4 lines
Peter Williams                                   [email protected]

"Learning, n. The kind of ignorance distinguishing the studious."
 -- Ambrose Bierce
#2 lore raw
Quoted 39 lines · Peter Williams
Quoted 6 lines · Peter Williams

This version updates staircase scheduler to version 14.1 (thanks Con) and includes the latest smpnice patches

A patch for 2.6.16-rc5 is available at:

<http://prdownloads.sourceforge.net/cpuse/plugsched-6.3.1-for-2.6.16-rc5.patch?download>

and for 2.6.16-rc5-mm1 at:

<http://prdownloads.sourceforge.net/cpuse/plugsched-6.3.1-for-2.6.16-rc5-mm1.patch?download>

Quoted 24 lines

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, ingo_ll, nicksched, staircase, spa_no_frills, spa_ws, spa_svr, spa_ebs 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

Now available for 2.6.16 at:

<http://prdownloads.sourceforge.net/cpuse/plugsched-6.3.1-for-2.6.16.patch?download>

and 2.6.16-mm2 at:

<http://prdownloads.sourceforge.net/cpuse/plugsched-6.3.1-for-2.6.16-mm2.patch?download>

Con and Nick,
I've taken the liberty of modifying staircase and nicksched (in the
2.6.16-mm2 version) to support priority inheritance. I'd appreciate it if you could review the code?

Thanks,
Peter

Signature · 4 lines
Peter Williams                                   [email protected]

"Learning, n. The kind of ignorance distinguishing the studious."
 -- Ambrose Bierce
#3 lore raw
Quoted 4 lines · Peter Williams

Con and Nick,
I've taken the liberty of modifying staircase and nicksched (in the
2.6.16-mm2 version) to support priority inheritance. I'd appreciate it if you could review the code?

Looks fine to me.

Here are two patches (I know it's bad form to send two patches as attachments under normal circumstances but I'm sure you won't mind). The first brings us up to staircase v15. The second adds the sched_system_tick function from account_system_time that staircase 15 needs to work properly. Unfortunately I can only build test these patches at this time (since the family needs my only pc and they build fine) but the changes are mostly straightforward so they should be ok.

Cheers,
Con

---
 include/linux/sched_runq.h |    3 
 include/linux/sched_task.h |    2 
 kernel/staircase.c         |  228 ++++++++++++++++++++++++---------------------
 3 files changed, 127 insertions(+), 106 deletions(-)
include/linux/sched_runq.h +1 -2
Index: linux-2.6.16-mm2/include/linux/sched_runq.h
===================================================================
@@ -39,8 +39,7 @@ struct ingo_runqueue_queue {
 struct staircase_runqueue_queue {
 	DECLARE_BITMAP(bitmap, STAIRCASE_NUM_PRIO_SLOTS);
 	struct list_head queue[STAIRCASE_NUM_PRIO_SLOTS - 1];
-	unsigned int cache_ticks;
-	unsigned int preempted;
+	unsigned short cache_ticks, preempted;
 };
 #endif
 
include/linux/sched_task.h +1 -1
Index: linux-2.6.16-mm2/include/linux/sched_task.h
===================================================================
@@ -48,7 +48,7 @@ struct ingo_ll_sched_drv_task {
 #ifdef CONFIG_CPUSCHED_STAIRCASE
 struct staircase_sched_drv_task {
 	unsigned long sflags;
-	unsigned long runtime, totalrun, ns_debit;
+	unsigned long runtime, totalrun, ns_debit, systime;
 	unsigned int bonus;
 	unsigned int slice, time_slice;
 };
kernel/staircase.c +125 -103

483 lines not on this page · raw message

---
 include/linux/sched_drv.h |    1 +
 include/linux/sched_spa.h |    1 +
 kernel/ingo_ll.c          |    5 +++++
 kernel/ingosched.c        |    5 +++++
 kernel/nicksched.c        |    5 +++++
 kernel/sched.c            |    1 +
 kernel/sched_spa.c        |    5 +++++
 kernel/sched_spa_ebs.c    |    1 +
 kernel/sched_spa_svr.c    |    1 +
 kernel/sched_spa_ws.c     |    1 +
 kernel/sched_zaphod.c     |    1 +
 kernel/staircase.c        |    8 ++++++++
 12 files changed, 35 insertions(+)
include/linux/sched_drv.h +1 -0
Index: linux-2.6.16-mm2/include/linux/sched_drv.h
===================================================================
@@ -32,6 +32,7 @@ struct sched_drv {
 	int (*move_tasks)(runqueue_t *, int, runqueue_t *, unsigned long, unsigned long,
 		 struct sched_domain *, enum idle_type, int *all_pinned);
 #endif
+	void (*sched_system_tick)(task_t *);
 	void (*tick)(struct task_struct*, struct runqueue *, unsigned long long);
 #ifdef CONFIG_SCHED_SMT
 	struct task_struct *(*head_of_queue)(union runqueue_queue *);
kernel/ingo_ll.c +5 -0
Index: linux-2.6.16-mm2/kernel/ingo_ll.c
===================================================================
@@ -752,6 +752,10 @@ out:
 }
 #endif
 
+static void ingo_system_tick(struct task_struct *p)
+{
+}
+
 /*
  * This function gets called by the timer code, with HZ frequency.
  * We call it with interrupts disabled.
@@ -1290,6 +1294,7 @@ const struct sched_drv ingo_ll_sched_drv
 #ifdef CONFIG_SMP
 	.move_tasks = ingo_move_tasks,
 #endif
+	.sched_system_tick = ingo_system_tick,
 	.tick = ingo_tick,
 #ifdef CONFIG_SCHED_SMT
 	.head_of_queue = ingo_head_of_queue,
kernel/ingosched.c +5 -0
Index: linux-2.6.16-mm2/kernel/ingosched.c
===================================================================
@@ -777,6 +777,10 @@ out:
 }
 #endif
 
+static void ingo_system_tick(struct task_struct *p)
+{
+}
+
 /*
  * This function gets called by the timer code, with HZ frequency.
  * We call it with interrupts disabled.
@@ -1336,6 +1340,7 @@ const struct sched_drv ingo_sched_drv = 
 #ifdef CONFIG_SMP
 	.move_tasks = ingo_move_tasks,
 #endif
+	.sched_system_tick = ingo_system_tick,
 	.tick = ingo_tick,
 #ifdef CONFIG_SCHED_SMT
 	.head_of_queue = ingo_head_of_queue,
kernel/nicksched.c +5 -0
Index: linux-2.6.16-mm2/kernel/nicksched.c
===================================================================
@@ -642,6 +642,10 @@ out:
 }
 #endif
 
+static void nick_system_tick(struct task_struct *p)
+{
+}
+
 /*
  * This function gets called by the timer code, with HZ frequency.
  * We call it with interrupts disabled.
@@ -1087,6 +1091,7 @@ const struct sched_drv nick_sched_drv = 
 #ifdef CONFIG_SMP
 	.move_tasks = nick_move_tasks,
 #endif
+	.sched_system_tick = nick_system_tick,
 	.tick = nick_tick,
 #ifdef CONFIG_SCHED_SMT
 	.head_of_queue = nick_head_of_queue,
kernel/sched.c +1 -0
Index: linux-2.6.16-mm2/kernel/sched.c
===================================================================
@@ -1693,6 +1693,7 @@ void account_system_time(struct task_str
 		cpustat->idle = cputime64_add(cpustat->idle, tmp);
 	/* Account for system time used */
 	acct_update_integrals(p);
+	sched_drvp->sched_system_tick(p);
 }
 
 /*
kernel/sched_spa.c +5 -0
Index: linux-2.6.16-mm2/kernel/sched_spa.c
===================================================================
@@ -825,6 +825,10 @@ static void spa_nf_runq_data_tick(unsign
 {
 }
 
+void spa_system_tick(struct task_struct *p)
+{
+}
+
 /*
  * This function gets called by the timer code, with HZ frequency.
  * We call it with interrupts disabled.
@@ -1658,6 +1662,7 @@ const struct sched_drv spa_nf_sched_drv 
 #ifdef CONFIG_SMP
 	.move_tasks = spa_move_tasks,
 #endif
+	.sched_system_tick = spa_system_tick,
 	.tick = spa_tick,
 #ifdef CONFIG_SCHED_SMT
 	.head_of_queue = spa_head_of_queue,
kernel/staircase.c +8 -0
Index: linux-2.6.16-mm2/kernel/staircase.c
===================================================================
@@ -652,6 +652,13 @@ static void time_slice_expired(task_t *p
 	enqueue_task(p, rqq);
 }
 
+static void staircase_system_tick(struct task_struct *p)
+{
+	struct staircase_sched_drv_task *sp = &p->sdu.staircase;
+
+	sp->systime++;
+}
+
 /*
  * This function gets called by the timer code, with HZ frequency.
  * We call it with interrupts disabled.
@@ -1115,6 +1122,7 @@ const struct sched_drv staircase_sched_d
 #ifdef CONFIG_SMP
 	.move_tasks = staircase_move_tasks,
 #endif
+	.sched_system_tick = staircase_system_tick,
 	.tick = staircase_tick,
 #ifdef CONFIG_SCHED_SMT
 	.head_of_queue = staircase_head_of_queue,
kernel/sched_spa_ebs.c +1 -0
Index: linux-2.6.16-mm2/kernel/sched_spa_ebs.c
===================================================================
@@ -370,6 +370,7 @@ const struct sched_drv spa_ebs_sched_drv
 #ifdef CONFIG_SMP
 	.move_tasks = spa_move_tasks,
 #endif
+	.sched_system_tick = spa_system_tick,
 	.tick = spa_tick,
 #ifdef CONFIG_SCHED_SMT
 	.head_of_queue = spa_head_of_queue,
kernel/sched_spa_svr.c +1 -0
Index: linux-2.6.16-mm2/kernel/sched_spa_svr.c
===================================================================
@@ -170,6 +170,7 @@ const struct sched_drv spa_svr_sched_drv
 #ifdef CONFIG_SMP
 	.move_tasks = spa_move_tasks,
 #endif
+	.sched_system_tick = spa_system_tick,
 	.tick = spa_tick,
 #ifdef CONFIG_SCHED_SMT
 	.head_of_queue = spa_head_of_queue,
kernel/sched_spa_ws.c +1 -0
Index: linux-2.6.16-mm2/kernel/sched_spa_ws.c
===================================================================
@@ -317,6 +317,7 @@ const struct sched_drv spa_ws_sched_drv 
 #ifdef CONFIG_SMP
 	.move_tasks = spa_move_tasks,
 #endif
+	.sched_system_tick = spa_system_tick,
 	.tick = spa_tick,
 #ifdef CONFIG_SCHED_SMT
 	.head_of_queue = spa_head_of_queue,
kernel/sched_zaphod.c +1 -0
Index: linux-2.6.16-mm2/kernel/sched_zaphod.c
===================================================================
@@ -607,6 +607,7 @@ const struct sched_drv zaphod_sched_drv 
 #ifdef CONFIG_SMP
 	.move_tasks = spa_move_tasks,
 #endif
+	.sched_system_tick = spa_system_tick,
 	.tick = spa_tick,
 #ifdef CONFIG_SCHED_SMT
 	.head_of_queue = spa_head_of_queue,
include/linux/sched_spa.h +1 -0
Index: linux-2.6.16-mm2/include/linux/sched_spa.h
===================================================================
@@ -111,6 +111,7 @@ void spa_wake_up_task(struct task_struct
 void spa_fork(task_t *);
 void spa_wake_up_new_task(task_t *, unsigned long);
 void spa_exit(task_t *);
+void spa_system_tick(struct task_struct *);
 void spa_tick(struct task_struct *, struct runqueue *, unsigned long long);
 void spa_schedule(void);
 void spa_set_normal_task_nice(task_t *, long);