aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs/run.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-06-28 20:57:51 -0400
committerPaul Mackerras <paulus@samba.org>2007-07-03 01:24:44 -0400
commit379018022071489a7dffee74db2a267465dab561 (patch)
tree7f8f0ce614c827e637a71a414308f1dee06fc452 /arch/powerpc/platforms/cell/spufs/run.c
parentbe7031773eded128675de6da778234a935c8d8ea (diff)
[POWERPC] spusched: Switch from workqueues to kthread + timer tick
Get rid of the scheduler workqueues that complicated things a lot to a dedicated spu scheduler thread that gets woken by a traditional scheduler tick. By default this scheduler tick runs a HZ * 10, aka one spu scheduler tick for every 10 cpu ticks. Currently the tick is not disabled when we have less context than available spus, but I will implement this later. 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/run.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index 3ba30cea764a..89b02b6bfc55 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -144,7 +144,6 @@ static int spu_run_init(struct spu_context *ctx, u32 * npc)
144 ctx->ops->runcntl_write(ctx, runcntl); 144 ctx->ops->runcntl_write(ctx, runcntl);
145 } else { 145 } else {
146 unsigned long mode = SPU_PRIVCNTL_MODE_NORMAL; 146 unsigned long mode = SPU_PRIVCNTL_MODE_NORMAL;
147 spu_start_tick(ctx);
148 ctx->ops->npc_write(ctx, *npc); 147 ctx->ops->npc_write(ctx, *npc);
149 if (test_thread_flag(TIF_SINGLESTEP)) 148 if (test_thread_flag(TIF_SINGLESTEP))
150 mode = SPU_PRIVCNTL_MODE_SINGLE_STEP; 149 mode = SPU_PRIVCNTL_MODE_SINGLE_STEP;
@@ -160,7 +159,6 @@ static int spu_run_fini(struct spu_context *ctx, u32 * npc,
160{ 159{
161 int ret = 0; 160 int ret = 0;
162 161
163 spu_stop_tick(ctx);
164 *status = ctx->ops->status_read(ctx); 162 *status = ctx->ops->status_read(ctx);
165 *npc = ctx->ops->npc_read(ctx); 163 *npc = ctx->ops->npc_read(ctx);
166 spu_release(ctx); 164 spu_release(ctx);
@@ -330,10 +328,8 @@ long spufs_run_spu(struct file *file, struct spu_context *ctx,
330 328
331 if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) { 329 if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) {
332 ret = spu_reacquire_runnable(ctx, npc, &status); 330 ret = spu_reacquire_runnable(ctx, npc, &status);
333 if (ret) { 331 if (ret)
334 spu_stop_tick(ctx);
335 goto out2; 332 goto out2;
336 }
337 continue; 333 continue;
338 } 334 }
339 ret = spu_process_events(ctx); 335 ret = spu_process_events(ctx);