diff options
author | Jack Steiner <steiner@sgi.com> | 2009-06-17 19:28:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-18 16:04:03 -0400 |
commit | 7e796a72a2691d7094fd62da61097294d0d59ce4 (patch) | |
tree | 9e8d4e1eae9a2d23f604f0af5d101979dc7afec7 /drivers/misc/sgi-gru/grulib.h | |
parent | d6e2fbce0d70c2072a1c478dbd37b34d27129d74 (diff) |
gru: collect per-context user statistics
Collect GRU statistics for each user GRU context. Statistics are kept for
TLB misses & content resource contention. Add user request for retrieving
the statistics.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/sgi-gru/grulib.h')
-rw-r--r-- | drivers/misc/sgi-gru/grulib.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/misc/sgi-gru/grulib.h b/drivers/misc/sgi-gru/grulib.h index 87586551d16f..c5865dd19eec 100644 --- a/drivers/misc/sgi-gru/grulib.h +++ b/drivers/misc/sgi-gru/grulib.h | |||
@@ -50,6 +50,9 @@ | |||
50 | /* For dumpping GRU chiplet state */ | 50 | /* For dumpping GRU chiplet state */ |
51 | #define GRU_DUMP_CHIPLET_STATE _IOWR(GRU_IOCTL_NUM, 11, void *) | 51 | #define GRU_DUMP_CHIPLET_STATE _IOWR(GRU_IOCTL_NUM, 11, void *) |
52 | 52 | ||
53 | /* For getting gseg statistics */ | ||
54 | #define GRU_GET_GSEG_STATISTICS _IOWR(GRU_IOCTL_NUM, 12, void *) | ||
55 | |||
53 | /* For user TLB flushing (primarily for tests) */ | 56 | /* For user TLB flushing (primarily for tests) */ |
54 | #define GRU_USER_FLUSH_TLB _IOWR(GRU_IOCTL_NUM, 50, void *) | 57 | #define GRU_USER_FLUSH_TLB _IOWR(GRU_IOCTL_NUM, 50, void *) |
55 | 58 | ||
@@ -61,6 +64,21 @@ | |||
61 | 64 | ||
62 | #define CONTEXT_WINDOW_BYTES(th) (GRU_GSEG_PAGESIZE * (th)) | 65 | #define CONTEXT_WINDOW_BYTES(th) (GRU_GSEG_PAGESIZE * (th)) |
63 | #define THREAD_POINTER(p, th) (p + GRU_GSEG_PAGESIZE * (th)) | 66 | #define THREAD_POINTER(p, th) (p + GRU_GSEG_PAGESIZE * (th)) |
67 | #define GSEG_START(cb) ((void *)((unsigned long)(cb) & ~(GRU_GSEG_PAGESIZE - 1))) | ||
68 | |||
69 | /* | ||
70 | * Statictics kept on a per-GTS basis. | ||
71 | */ | ||
72 | struct gts_statistics { | ||
73 | unsigned long fmm_tlbdropin; | ||
74 | unsigned long upm_tlbdropin; | ||
75 | unsigned long context_stolen; | ||
76 | }; | ||
77 | |||
78 | struct gru_get_gseg_statistics_req { | ||
79 | unsigned long gseg; | ||
80 | struct gts_statistics stats; | ||
81 | }; | ||
64 | 82 | ||
65 | /* | 83 | /* |
66 | * Structure used to pass TLB flush parameters to the driver | 84 | * Structure used to pass TLB flush parameters to the driver |