summaryrefslogtreecommitdiff
path: root/include/asm-powerpc/spu.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-06-29 10:58:07 +1000
committerPaul Mackerras <paulus@samba.org>2007-07-03 15:24:46 +1000
commitfe2f896d67b89a409c366c9a69e30291ab124467 (patch)
treedf0cc1fa1923f03b90920dd399640e7b462a8171 /include/asm-powerpc/spu.h
parent27449971e6907ff38bde7bbc4647e55bd7309fc3 (diff)
downloadlwn-fe2f896d67b89a409c366c9a69e30291ab124467.tar.gz
lwn-fe2f896d67b89a409c366c9a69e30291ab124467.zip
[POWERPC] spufs: Add spu stats in sysfs
Export spu statistics in sysfs. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/spu.h')
-rw-r--r--include/asm-powerpc/spu.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h
index 5957fcdda04c..eedc828cef2d 100644
--- a/include/asm-powerpc/spu.h
+++ b/include/asm-powerpc/spu.h
@@ -106,6 +106,14 @@ struct spu_context;
struct spu_runqueue;
struct device_node;
+enum spu_utilization_state {
+ SPU_UTIL_SYSTEM,
+ SPU_UTIL_USER,
+ SPU_UTIL_IOWAIT,
+ SPU_UTIL_IDLE,
+ SPU_UTIL_MAX
+};
+
struct spu {
const char *name;
unsigned long local_store_phys;
@@ -159,8 +167,17 @@ struct spu {
struct {
/* protected by interrupt reentrancy */
+ enum spu_utilization_state utilization_state;
+ unsigned long tstamp; /* time of last ctx switch */
+ unsigned long times[SPU_UTIL_MAX];
+ unsigned long long vol_ctx_switch;
+ unsigned long long invol_ctx_switch;
+ unsigned long long min_flt;
+ unsigned long long maj_flt;
+ unsigned long long hash_flt;
unsigned long long slb_flt;
unsigned long long class2_intr;
+ unsigned long long libassist;
} stats;
};