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>
This commit is contained in:
Jack Steiner
2009-06-17 16:28:30 -07:00
committed by Linus Torvalds
parent d6e2fbce0d
commit 7e796a72a2
5 changed files with 52 additions and 0 deletions

View File

@@ -744,6 +744,7 @@ void gru_steal_context(struct gru_thread_state *gts, int blade_id)
spin_unlock(&blade->bs_lock);
if (ngts) {
gts->ustats.context_stolen++;
ngts->ts_steal_jiffies = jiffies;
gru_unload_context(ngts, is_kernel_context(ngts) ? 0 : 1);
gts_stolen(ngts, blade);