linux/arch/powerpc/platforms
Jeremy Kerr 4ef110141b [POWERPC] spufs: fix scheduler starvation by idle contexts
2.6.25 has a regression where we can starve the scheduler by creating
(N_SPES+1) contexts, then running them one at a time.

The final context will never be run, as the other contexts are loaded on
the SPEs, none of which are repoted as free (ie, spu->alloc_state !=
SPU_FREE), so spu_get_idle() doesn't give us a spu to run on. Because
all of the contexts are stopped, none are descheduled by the scheduler
tick, as spusched_tick returns if spu_stopped(ctx).

This change replaces the spu_stopped() check with checking for SCHED_IDLE
in ctx->policy. We set a context's policy to SCHED_IDLE when we're not
in spu_run(). We also favour SCHED_IDLE contexts when looking for contexts
to unbind, but leave their timeslice intact for later resumption.

This patch fixes the following test in the spufs-testsuite:
  tests/20-scheduler/02-yield-starvation

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2008-02-19 10:12:02 +11:00
..
8xx [POWERPC] 8xx: adder875, ep88xc: fix to match recent 8xx cleanups. 2008-02-05 23:29:58 -06:00
40x Merge branch 'virtex-for-2.6.25' of git://git.secretlab.ca/git/linux-2.6-virtex into for-2.6.25 2008-02-06 21:06:45 -06:00
44x [POWERPC] 4xx: Fix offset value on Warp board 2008-02-06 21:02:54 -06:00
52xx [POWERPC] Remove unused CONFIG_WANT_DEVICE_TREE 2008-02-14 22:11:03 +11:00
82xx [POWERPC] arch/powerpc/platforms/82xx: Add missing of_node_put 2008-02-06 22:06:59 +11:00
83xx [POWERPC] 83xx: mpc832x_rdb: fix compiler warning 2008-02-05 23:38:10 -06:00
85xx [POWERPC] 85xx: convert sbc85* boards to use machine_device_initcall 2008-01-28 13:15:26 -06:00
86xx [POWERPC] 86xx: MPC8641 HPCN - call of_platform_bus_probe() 2008-01-23 19:35:02 -06:00
512x [POWERPC] Remove unused CONFIG_WANT_DEVICE_TREE 2008-02-14 22:11:03 +11:00
cell [POWERPC] spufs: fix scheduler starvation by idle contexts 2008-02-19 10:12:02 +11:00
celleb [POWERPC] Have celleb use its own dma_direct_offset variable 2008-01-25 22:52:54 +11:00
chrp [POWERPC] Autodetect serial console on pegasos2 2008-01-25 22:52:55 +11:00
embedded6xx [POWERPC] Remove unused CONFIG_WANT_DEVICE_TREE 2008-02-14 22:11:03 +11:00
iseries [POWERPC] free_property() must not be __init 2008-02-14 22:11:02 +11:00
maple [POWERPC] Use <linux/of_{platform, device}.h> and not <asm/...> variants. 2008-01-17 14:58:57 +11:00
pasemi pasemi: Fix thinko in dma_direct_ops setup 2008-02-01 21:03:36 +11:00
powermac [POWERPC] Disable G5 NAP mode during SMU commands on U3 2008-02-08 19:52:35 +11:00
prep [POWERPC] Split several platforms into their respective Kconfig file 2007-03-22 10:07:32 -05:00
ps3 [POWERPC] PS3: Remove lpar address workaround 2008-01-25 22:52:53 +11:00
pseries [POWERPC] Update default irq servers when boot cpu is removed 2008-02-07 11:40:19 +11:00
fsl_uli1575.c [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards 2007-08-17 13:22:16 -05:00
Kconfig [POWERPC] Remove unused CONFIG_WANT_DEVICE_TREE 2008-02-14 22:11:03 +11:00
Kconfig.cputype [POWERPC] Remove unused CONFIG_WANT_DEVICE_TREE 2008-02-14 22:11:03 +11:00
Makefile [POWERPC] mpc512x: Basic platform support 2008-02-06 14:03:10 -07:00