summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/cell/spufs/sched.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2007-07-20 19:39:49 (GMT)
committerArnd Bergmann <arnd@klappe.arndb.de>2007-07-20 19:42:18 (GMT)
commitcbc23d3e7cb3c9fd3c9fce0bc3f44f687a9517c0 (patch)
tree4adcbbfa5402e46c816788cd86f992082d2a6f61 /arch/powerpc/platforms/cell/spufs/sched.c
parentc5fc8d2a92461fcabd00dfd678204cba36b93119 (diff)
downloadlinux-fsl-qoriq-cbc23d3e7cb3c9fd3c9fce0bc3f44f687a9517c0.tar.xz
[CELL] spufs: integration of SPE affinity with the scheduller
This patch makes the scheduller honor affinity information for each context being scheduled. If the context has no affinity information, behaviour is unchanged. If there are affinity information, context is schedulled to be run on the exact spu recommended by the affinity placement algorithm. Signed-off-by: Andre Detsch <adetsch@br.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/sched.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index a9569de..49b8f68 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -507,6 +507,10 @@ static struct spu *spu_get_idle(struct spu_context *ctx)
int node = cpu_to_node(raw_smp_processor_id());
int n;
+ spu = affinity_check(ctx);
+ if (spu)
+ return spu_alloc_spu(spu);
+
for (n = 0; n < MAX_NUMNODES; n++, node++) {
node = (node < MAX_NUMNODES) ? node : 0;
if (!node_allowed(ctx, node))