diff options
author | Arnd Bergmann <arnd@arndb.de> | 2007-07-20 21:39:48 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@klappe.arndb.de> | 2007-07-20 21:42:17 +0200 |
commit | c5fc8d2a92461fcabd00dfd678204cba36b93119 (patch) | |
tree | 06af7ac73221494e0eef00f4f390faf53b24facf /arch/powerpc/platforms/cell/spufs/spufs.h | |
parent | 8e68e2f248332a9c3fd4f08258f488c209bd3e0c (diff) | |
download | lwn-c5fc8d2a92461fcabd00dfd678204cba36b93119.tar.gz lwn-c5fc8d2a92461fcabd00dfd678204cba36b93119.zip |
[CELL] cell: add placement computation for scheduling of affinity contexts
This patch provides the spu affinity placement logic for the spufs scheduler.
Each time a gang is going to be scheduled, the placement of a reference
context is defined. The placement of all other contexts with affinity from
the gang is defined based on this reference context location and on a
precomputed displacement offset.
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/spufs.h')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/spufs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index 36da17987e9c..42d8da8f0fb5 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h @@ -112,6 +112,7 @@ struct spu_context { struct list_head aff_list; int aff_head; + int aff_offset; }; struct spu_gang { @@ -124,6 +125,8 @@ struct spu_gang { struct list_head aff_list_head; struct mutex aff_mutex; int aff_flags; + struct spu *aff_ref_spu; + atomic_t aff_sched_count; }; /* Flag bits for spu_gang aff_flags */ @@ -208,6 +211,9 @@ void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx); /* fault handling */ int spufs_handle_class1(struct spu_context *ctx); +/* affinity */ +struct spu *affinity_check(struct spu_context *ctx); + /* context management */ extern atomic_t nr_spu_contexts; static inline void spu_acquire(struct spu_context *ctx) |