[PATCH 7/8] ppc64: SPU file system

Arnd Bergmann arnd at arndb.de
Sun May 15 20:08:52 EST 2005


On Sünndag 15 Mai 2005 08:29, Benjamin Herrenschmidt wrote:
> Why not just write(pc) to start and read back status from the same
> file ?

I suppose you are thinking of the simple_transaction_read() style
interface. I've got the feeling that this is generally even
less popular than ioctl because 

- it is still an untyped interface (as would be a read() based one)
- you can't do 32 bit emulation (doesn't matter for me, we only
  have 32 bit data)
- it is non-atomic
- it doubles the system call overhead

One operation that I want to allow is to have an infinite loop
running on the SPU that does a simple operation (e.g. process
one MPEG macroblock) and have that called by multiple unrelated
processes in turns. When my operation is not atomic, users need
to have additional IPC serialization of their accesses. Most
would want that anyway, but it is not a requirement with an
interface that needs only a single system call.

For the extra syscall overhead, I would like to see measurements
of a real world application before I change to an interface that
is slower in theory. Do you have measurements for the time spent
in a trivial system call on G5 or Power4?

	Arnd <><



More information about the Linuxppc64-dev mailing list