lkml.org 
[lkml]   [2015]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] NTB: Skip reading doorbell bits in callback
Date
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


\
 
 \ /
  Last update: 2015-05-27 23:21    [W:0.032 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site