diff options
author | Arnd Bergmann <arnd@arndb.de> | 2006-10-04 17:26:15 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-10-05 09:21:01 +1000 |
commit | 6263203ed6e9ff107129a1ebe613290b342a4465 (patch) | |
tree | dc7d68b783fed2b5ffcb8905c62086ebe078368b /include/asm-powerpc | |
parent | 9add11daeee2f6d69f6b86237f197824332a4a3b (diff) |
[POWERPC] spufs: Add infrastructure needed for gang scheduling
Add the concept of a gang to spufs as a new type of object.
So far, this has no impact whatsover on scheduling, but makes
it possible to add that later.
A new type of object in spufs is now a spu_gang. It is created
with the spu_create system call with the flags argument set
to SPU_CREATE_GANG (0x2). Inside of a spu_gang, it
is then possible to create spu_context objects, which until
now was only possible at the root of spufs.
There is a new member in struct spu_context pointing to
the spu_gang it belongs to, if any. The spu_gang maintains
a list of spu_context structures that are its children.
This information can then be used in the scheduler in the
future.
There is still a bug that needs to be resolved in this
basic infrastructure regarding the order in which objects
are removed. When the spu_gang file descriptor is closed
before the spu_context descriptors, we leak the dentry
and inode for the gang. Any ideas how to cleanly solve
this are appreciated.
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/spu.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index 87cc21e21946..83b6dae48efc 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h @@ -181,7 +181,10 @@ extern struct spufs_calls { * Flags for sys_spu_create. */ #define SPU_CREATE_EVENTS_ENABLED 0x0001 -#define SPU_CREATE_FLAG_ALL 0x0001 /* mask of all valid flags */ +#define SPU_CREATE_GANG 0x0002 + +#define SPU_CREATE_FLAG_ALL 0x0003 /* mask of all valid flags */ + #ifdef CONFIG_SPU_FS_MODULE int register_spu_syscalls(struct spufs_calls *calls); |