linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NTB: Skip reading doorbell bits in callback
@ 2015-05-27 15:37 Allen Hubbe
  0 siblings, 0 replies; only message in thread
From: Allen Hubbe @ 2015-05-27 15:37 UTC (permalink / raw)
  To: linux-ntb; +Cc: linux-kernel, linux-pci, Jon Mason, Dave Jiang, Allen Hubbe

Avoid the penalty of ioread latency before doing useful work in the
doorbell callback.  Instead of reading the doorbell bits, assume the
bits are set, and always schedule the transport qp tasklets.

Signed-off-by: Allen Hubbe <Allen.Hubbe@emc.com>
---
Notes:
  This should theoretically improve the response time.  Experiments with
  netperf do not show any significant difference in either direction.

 drivers/ntb/ntb_transport.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
index 4c59f24cef2d..b70b6a30a0b5 100644
--- a/drivers/ntb/ntb_transport.c
+++ b/drivers/ntb/ntb_transport.c
@@ -1922,12 +1922,11 @@ static void ntb_transport_doorbell_callback(void *data, int vector)
 {
 	struct ntb_transport_ctx *nt = data;
 	struct ntb_transport_qp *qp;
-	u64 db_mask, db_bits;
+	u64 db_bits;
 	unsigned int qp_num;
 
-	db_mask = (nt->qp_bitmap & ~nt->qp_bitmap_free &
+	db_bits = (nt->qp_bitmap & ~nt->qp_bitmap_free &
 		   ntb_db_vector_mask(nt->ndev, vector));
-	db_bits = db_mask & ntb_db_read(nt->ndev);
 
 	while (db_bits) {
 		qp_num = __ffs(db_bits);
-- 
2.4.0.rc0.43.gcf8a8c6


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-27 20:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-27 15:37 [PATCH] NTB: Skip reading doorbell bits in callback Allen Hubbe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).