From 0f9cea0ca2a6a54241d0249f7f7ff9b61fb4f11e Mon Sep 17 00:00:00 2001 From: Santosh Shilimkar Date: Thu, 8 Oct 2015 15:59:14 -0700 Subject: [PATCH] RDS: make send_batch_count tunable effective The send_batch_count tunable is stale and code relies on hard-coded batch count value. Its a nice feature and lets you tune the system based on different HCAs. TCP transport as well have different characteristics and tunable can be useful. There is no change in default behavior with this patch. Orabug: 22010933 Acked-by: Ajaykumar Hotchandani Acked-by: Sowmini Varadhan Acked-by: Wengang Wang Reported-by: Wei Lin Guay Signed-off-by: Santosh Shilimkar --- net/rds/send.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/rds/send.c b/net/rds/send.c index cc4835a81afe..e7109f9228e3 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -48,7 +48,7 @@ * it to 0 will restore the old behavior (where we looped until we had * drained the queue). */ -static int send_batch_count = 64; +static int send_batch_count = 1024; module_param(send_batch_count, int, 0444); MODULE_PARM_DESC(send_batch_count, " batch factor when working the send queue"); @@ -285,7 +285,7 @@ restart: * through a lot of messages, lets back off and see * if anyone else jumps in */ - if (batch_count >= 1024) + if (batch_count >= send_batch_count) goto over_batch; spin_lock_irqsave(&conn->c_lock, flags); @@ -492,7 +492,7 @@ over_batch: !list_empty(&conn->c_send_queue)) && send_gen == conn->c_send_gen) { rds_stats_inc(s_send_lock_queue_raced); - if (batch_count < 1024) + if (batch_count < send_batch_count) goto restart; queue_delayed_work(rds_wq, &conn->c_send_w, 1); } -- 2.50.1