[Cbe-oss-dev] spufs: add spu stats in sysfs and ctx stat file to spufs

Christoph Hellwig hch at lst.de
Sat Jul 14 00:03:50 EST 2007


On Thu, Jul 12, 2007 at 11:54:49AM -0300, Andre Detsch wrote:
> Subject: spufs: add spu stats in sysfs and ctx stat file to spufs
> 
> From: Andr? Detsch <adetsch at br.ibm.com>
> 
> This patch exports per-context statistics in spufs as long as spu
> statistics in sysfs.
> 
> It was formed by merging:
> "spufs: add spu stats in sysfs"   From: Christoph Hellwig
> "spufs: add stat file to spufs"   From: Christoph Hellwig
> "spufs: Fix libassist accounting" From: Jeremy Kerr
> "spusched: fix spu utilization statistics" From: Luke Browning
> And some adjustments by myself, after suggestions on cbe-oss-dev.
> 
> Having separate patches was making the review process harder
> than it should, as we end up integrating spus ans ctx statistics
> accounting much more than it was on the first implementation.

This looks good to me.

I understand the rationale for the switch to SPU_UTIL_IDLE_LOADED
in spu_bind_context now, but I don't quite agree to it.  For the
spu_run case we'd still be in system state afterwards (and in fact
switch back to it quite soon), and for the direct ps mmap or
write to the mfc file I'm not quite sure what state we should
account this again.  They're suspended because other ppe thread
need info about the context - either loaded or iowait would fit
here.

Anyway, we can keep it as-is, the fine details of how the state
switches work in spu_run might change a bit once spu_run is remodelled
after the class0 irq changes, but it should not change things for
the numbers reported except for tiny fractions.




More information about the cbe-oss-dev mailing list