aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs/spufs.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-06-29 10:57:52 +1000
committerPaul Mackerras <paulus@samba.org>2007-07-03 15:24:44 +1000
commitfe443ef2ac421c9c652e251e8733e2479d8e411a (patch)
tree60914cfaf29232b9c3d4f555eac3b19b85a84254 /arch/powerpc/platforms/cell/spufs/spufs.h
parent[POWERPC] spusched: Switch from workqueues to kthread + timer tick (diff)
downloadlinux-dev-fe443ef2ac421c9c652e251e8733e2479d8e411a.tar.xz
linux-dev-fe443ef2ac421c9c652e251e8733e2479d8e411a.zip
[POWERPC] spusched: Dynamic timeslicing for SCHED_OTHER
Enable preemptive scheduling for non-RT contexts. We use the same algorithms as the CPU scheduler to calculate the time slice length, and for now we also use the same timeslice length as the CPU scheduler. This might be not enough for good performance and can be changed after some benchmarking. Note that currently we do not boost the priority for contexts waiting on the runqueue for a long time, so contexts with a higher nice value could starve ones with less priority. This could easily be fixed once the rework of the spu lists that Luke and I discussed is done. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/spufs.h')
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index 8068171dfa9c..fddc59c204b5 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -31,8 +31,6 @@
#include <asm/spu_csa.h>
#include <asm/spu_info.h>
-#define SPU_DEF_TIMESLICE 100
-
/* The magic number for our file system */
enum {
SPUFS_MAGIC = 0x23c9b64e,
@@ -82,7 +80,6 @@ struct spu_context {
struct list_head rq;
unsigned int time_slice;
unsigned long sched_flags;
- unsigned long rt_priority;
int policy;
int prio;
};
@@ -197,6 +194,7 @@ void spu_acquire_saved(struct spu_context *ctx);
int spu_activate(struct spu_context *ctx, unsigned long flags);
void spu_deactivate(struct spu_context *ctx);
void spu_yield(struct spu_context *ctx);
+void spu_set_timeslice(struct spu_context *ctx);
int __init spu_sched_init(void);
void __exit spu_sched_exit(void);