public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: steiner@sgi.com
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [Patch 15/25] GRU - reorder interrupt processing
Date: Mon, 19 Jul 2010 16:32:33 -0500	[thread overview]
Message-ID: <20100719213853.607589770@sgi.com> (raw)
In-Reply-To: 20100719213651.362618144@sgi.com

[-- Attachment #1: uv_gru_preload_tlb_inval --]
[-- Type: text/plain, Size: 2372 bytes --]

From: Jack Steiner <steiner@sgi.com>

Reorder the servicing of CBR completion interrupts & TLB miss interrupts.
There is a small performance gain to service TLB misses first. Completion
interrupts are rare.


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

---
 drivers/misc/sgi-gru/grufault.c |   24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

Index: linux/drivers/misc/sgi-gru/grufault.c
===================================================================
--- linux.orig/drivers/misc/sgi-gru/grufault.c	2010-07-19 10:25:40.978392010 -0500
+++ linux/drivers/misc/sgi-gru/grufault.c	2010-07-19 10:25:45.626240841 -0500
@@ -7,7 +7,7 @@
  * These misses are reported either via interrupts or user polling of
  * the user CB.
  *
- *  Copyright (c) 2008 Silicon Graphics, Inc.  All Rights Reserved.
+ *  Copyright (c) 2008-2010 Silicon Graphics, Inc.  All Rights Reserved.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -559,19 +559,10 @@ static irqreturn_t gru_intr(int chiplet,
 		imap.fault_bits[0], imap.fault_bits[1],
 		dmap.fault_bits[0], dmap.fault_bits[1]);
 
-	for_each_cbr_in_tfm(cbrnum, dmap.fault_bits) {
-		STAT(intr_cbr);
-		cmp = gru->gs_async_wq[cbrnum];
-		if (cmp)
-			complete(cmp);
-		gru_dbg(grudev, "gid %d, cbr_done %d, done %d\n",
-			gru->gs_gid, cbrnum, cmp ? cmp->done : -1);
-	}
-
 	for_each_cbr_in_tfm(cbrnum, imap.fault_bits) {
-		STAT(intr_tfh);
 		tfh = get_tfh_by_index(gru, cbrnum);
 		prefetchw(tfh);	/* Helps on hdw, required for emulator */
+		STAT(intr_tfh);
 
 		/*
 		 * When hardware sets a bit in the faultmap, it implicitly
@@ -596,6 +587,8 @@ static irqreturn_t gru_intr(int chiplet,
 			gts->ustats.interrupts++;
 		gts->ustats.fmm_tlbmiss++;
 		multi = 1;
+		if (!gts->ts_mm)
+			continue;
 		if (!gts->ts_force_cch_reload &&
 					down_read_trylock(&gts->ts_mm->mmap_sem)) {
 			gru_try_dropin(gru, gts, tfh, NULL);
@@ -605,6 +598,15 @@ static irqreturn_t gru_intr(int chiplet,
 			STAT(intr_mm_lock_failed);
 		}
 	}
+	for_each_cbr_in_tfm(cbrnum, dmap.fault_bits) {
+		STAT(intr_cbr);
+		cmp = gru->gs_async_wq[cbrnum];
+		if (cmp)
+			complete(cmp);
+		gru_dbg(grudev, "gid %d, cbr_done %d, done %d\n",
+			gru->gs_gid, cbrnum, cmp ? cmp->done : -1);
+	}
+
 	return IRQ_HANDLED;
 }
 


  parent reply	other threads:[~2010-07-19 21:42 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-19 21:32 [Patch 00/25] GRU - GRU Updates steiner
2010-07-19 21:32 ` [Patch 01/25] GRU - delete obsolete gru instruction opcodes steiner
2010-07-19 21:32 ` [Patch 02/25] GRU - skip gru tlb purging of gru contexts:w steiner
2010-07-19 21:32 ` [Patch 03/25] GRU - update gru tlb miss statistics steiner
2010-07-19 21:32 ` [Patch 04/25] GRU - mmap gru contexts using nonlinear steiner
2010-07-19 21:32 ` [Patch 05/25] GRU - cbe cache flush steiner
2010-07-19 21:32 ` [Patch 06/25] GRU - change context stealing steiner
2010-07-19 21:32 ` [Patch 07/25] GRU - add context lock flag to gru status steiner
2010-07-19 21:32 ` [Patch 08/25] GRU - flush gru tlb when driver is loaded steiner
2010-07-19 21:32 ` [Patch 09/25] GRU - add software reserved bits to cbr definition steiner
2010-07-19 21:32 ` [Patch 10/25] GRU - eliminate gru contention on mmap_sem steiner
2010-07-19 21:32 ` [Patch 11/25] GRU - interrupt fix for processors without core 0 steiner
2010-07-19 21:32 ` [Patch 12/25] GRU - add gru hub number to context status steiner
2010-07-19 21:32 ` [Patch 13/25] GRU - delete obsolete debug code steiner
2010-07-19 21:32 ` [Patch 14/25] GRU - add polling for tlb misses steiner
2010-07-19 21:32 ` steiner [this message]
2010-07-19 21:32 ` [Patch 16/25] GRU - add refcnt to vdata structure steiner
2010-07-19 21:32 ` [Patch 17/25] GRU - no panic on gru malfunction steiner
2010-07-19 21:32 ` [Patch 18/25] GRU - contexts must contain cbrs steiner
2010-07-19 21:32 ` [Patch 19/25] GRU - update debug messages and comments steiner
2010-07-19 21:32 ` [Patch 20/25] GRU - add gsh information to gru dumps steiner
2010-07-19 21:32 ` [Patch 21/25] GRU - delete unused gru statistics structure steiner
2010-07-19 21:32 ` [Patch 22/25] GRU - gru api cleanup steiner
2010-07-19 21:32 ` [Patch 23/25] GRU - update driverr version steiner
2010-07-19 21:32 ` [Patch 24/25] GRU - rename gru pagesize defines steiner
2010-07-19 21:32 ` [Patch 25/25] GRU - update cbrstate definitions steiner
  -- strict thread matches above, loose matches on Subject: below --
2010-08-26 13:19 [Patch 00/25] GRU - GRU Updates - Production Driver steiner
2010-08-26 13:19 ` [Patch 15/25] GRU - reorder interrupt processing steiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100719213853.607589770@sgi.com \
    --to=steiner@sgi.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox