[PATCH] NTB: Skip reading doorbell bits in callback

From: Allen Hubbe
Date: Wed May 27 2015 - 16:38:56 EST


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@xxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/