summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs
diff options
context:
space:
mode:
authorJeremy Kerr2007-06-29 02:57:53 +0200
committerPaul Mackerras2007-07-03 07:24:44 +0200
commit60e242393346c1a9a64e7b14dfb7f613a737324f (patch)
tree79987a1ff1f9406251a5967c0aa6820b73637281 /arch/powerpc/platforms/cell/spufs
parent[POWERPC] spusched: Dynamic timeslicing for SCHED_OTHER (diff)
downloadkernel-qcow2-linux-60e242393346c1a9a64e7b14dfb7f613a737324f.tar.gz
kernel-qcow2-linux-60e242393346c1a9a64e7b14dfb7f613a737324f.tar.xz
kernel-qcow2-linux-60e242393346c1a9a64e7b14dfb7f613a737324f.zip
[POWERPC] spusched: Fix timeslice calculations
The current timeslice code mixes 'jiffies' up with 'spesched ticks'. This change correctly defines the number of time slices each SPE contexts is given, and clarifies the comment. This brings the default timeslice for SPE contexts into a reasonable range. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs')
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 1b2916bdc1c8..6843a01b1a25 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -70,11 +70,11 @@ static struct timer_list spusched_timer;
/*
* These are the 'tuning knobs' of the scheduler:
*
- * Minimum timeslice is 5 msecs (or 10 jiffies, whichever is larger),
- * default timeslice is 100 msecs, maximum timeslice is 800 msecs.
+ * Minimum timeslice is 5 msecs (or 1 spu scheduler tick, whichever is
+ * larger), default timeslice is 100 msecs, maximum timeslice is 800 msecs.
*/
-#define MIN_SPU_TIMESLICE max(5 * HZ / 100, 10)
-#define DEF_SPU_TIMESLICE (100 * HZ / 100)
+#define MIN_SPU_TIMESLICE max(5 * HZ / (1000 * SPUSCHED_TICK), 1)
+#define DEF_SPU_TIMESLICE (100 * HZ / (1000 * SPUSCHED_TICK))
#define MAX_USER_PRIO (MAX_PRIO - MAX_RT_PRIO)
#define SCALE_PRIO(x, prio) \