[Patch 07/25] GRU - add context lock flag to gru status

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: steiner
Date: Thursday, August 26, 2010 - 6:19 am

From: Jack Steiner <steiner@sgi.com>

Add a flag to the GRU cch_status file to indicate if the cch is locked.
This is useful for debugging.

Signed-off-by: Jack Steiner <steiner@sgi.com>


---
 drivers/misc/sgi-gru/gruprocfs.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Index: linux/drivers/misc/sgi-gru/gruprocfs.c
===================================================================
--- linux.orig/drivers/misc/sgi-gru/gruprocfs.c	2010-06-09 08:11:42.043954832 -0500
+++ linux/drivers/misc/sgi-gru/gruprocfs.c	2010-06-09 08:11:42.456084620 -0500
@@ -190,21 +190,22 @@ static int cch_seq_show(struct seq_file
 	const char *mode[] = { "??", "UPM", "INTR", "OS_POLL" };
 
 	if (gid == 0)
-		seq_printf(file, "#%5s%5s%6s%7s%9s%6s%8s%8s\n", "gid", "bid",
-			   "ctx#", "asid", "pid", "cbrs", "dsbytes", "mode");
+		seq_printf(file, "#%5s%5s%6s%7s%9s%6s%8s%8s%7s\n", "gid", "bid",
+			   "ctx#", "asid", "pid", "cbrs", "dsbytes", "mode", "locked");
 	if (gru)
 		for (i = 0; i < GRU_NUM_CCH; i++) {
 			ts = gru->gs_gts[i];
 			if (!ts)
 				continue;
-			seq_printf(file, " %5d%5d%6d%7d%9d%6d%8d%8s\n",
+			seq_printf(file, " %5d%5d%6d%7d%9d%6d%8d%8s%7s\n",
 				   gru->gs_gid, gru->gs_blade_id, i,
 				   is_kernel_context(ts) ? 0 : ts->ts_gms->ms_asids[gid].mt_asid,
 				   is_kernel_context(ts) ? 0 : ts->ts_tgid_owner,
 				   ts->ts_cbr_au_count * GRU_CBR_AU_SIZE,
-				   ts->ts_cbr_au_count * GRU_DSR_AU_BYTES,
+				   ts->ts_dsr_au_count * GRU_DSR_AU_BYTES,
 				   mode[ts->ts_user_options &
-					GRU_OPT_MISS_MASK]);
+					GRU_OPT_MISS_MASK],
+				   mutex_is_locked(&ts->ts_ctxlock) ? "LOCKED" : "-");
 		}
 
 	return 0;

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Patch 05/25] GRU - cbe cache flush, steiner, (Thu Aug 26, 6:19 am)
[Patch 06/25] GRU - change context stealing, steiner, (Thu Aug 26, 6:19 am)
[Patch 07/25] GRU - add context lock flag to gru status, steiner, (Thu Aug 26, 6:19 am)
[Patch 13/25] GRU - delete obsolete debug code, steiner, (Thu Aug 26, 6:19 am)
[Patch 14/25] GRU - add polling for tlb misses, steiner, (Thu Aug 26, 6:19 am)
[Patch 15/25] GRU - reorder interrupt processing, steiner, (Thu Aug 26, 6:19 am)
[Patch 17/25] GRU - no panic on gru malfunction, steiner, (Thu Aug 26, 6:19 am)
[Patch 18/25] GRU - contexts must contain cbrs, steiner, (Thu Aug 26, 6:19 am)
[Patch 22/25] GRU - gru api cleanup, steiner, (Thu Aug 26, 6:19 am)
[Patch 23/25] GRU - update driverr version, steiner, (Thu Aug 26, 6:20 am)
[Patch 24/25] GRU - rename gru pagesize defines, steiner, (Thu Aug 26, 6:20 am)
[Patch 25/25] GRU - update cbrstate definitions, steiner, (Thu Aug 26, 6:20 am)