From: Santosh Shilimkar Date: Thu, 8 Oct 2015 22:59:14 +0000 (-0700) Subject: RDS: make send_batch_count tunable effective X-Git-Tag: v4.1.12-92~261^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0f9cea0ca2a6a54241d0249f7f7ff9b61fb4f11e;p=users%2Fjedix%2Flinux-maple.git 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 --- 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); }