diff options
author | Christoph Hellwig <hch@lst.de> | 2007-06-28 20:58:07 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-07-03 01:24:46 -0400 |
commit | fe2f896d67b89a409c366c9a69e30291ab124467 (patch) | |
tree | df0cc1fa1923f03b90920dd399640e7b462a8171 /include/asm-powerpc | |
parent | 27449971e6907ff38bde7bbc4647e55bd7309fc3 (diff) |
[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')
-rw-r--r-- | include/asm-powerpc/spu.h | 17 |
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; | |||
106 | struct spu_runqueue; | 106 | struct spu_runqueue; |
107 | struct device_node; | 107 | struct device_node; |
108 | 108 | ||
109 | enum spu_utilization_state { | ||
110 | SPU_UTIL_SYSTEM, | ||
111 | SPU_UTIL_USER, | ||
112 | SPU_UTIL_IOWAIT, | ||
113 | SPU_UTIL_IDLE, | ||
114 | SPU_UTIL_MAX | ||
115 | }; | ||
116 | |||
109 | struct spu { | 117 | struct spu { |
110 | const char *name; | 118 | const char *name; |
111 | unsigned long local_store_phys; | 119 | unsigned long local_store_phys; |
@@ -159,8 +167,17 @@ struct spu { | |||
159 | 167 | ||
160 | struct { | 168 | struct { |
161 | /* protected by interrupt reentrancy */ | 169 | /* protected by interrupt reentrancy */ |
170 | enum spu_utilization_state utilization_state; | ||
171 | unsigned long tstamp; /* time of last ctx switch */ | ||
172 | unsigned long times[SPU_UTIL_MAX]; | ||
173 | unsigned long long vol_ctx_switch; | ||
174 | unsigned long long invol_ctx_switch; | ||
175 | unsigned long long min_flt; | ||
176 | unsigned long long maj_flt; | ||
177 | unsigned long long hash_flt; | ||
162 | unsigned long long slb_flt; | 178 | unsigned long long slb_flt; |
163 | unsigned long long class2_intr; | 179 | unsigned long long class2_intr; |
180 | unsigned long long libassist; | ||
164 | } stats; | 181 | } stats; |
165 | }; | 182 | }; |
166 | 183 | ||