]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
RDS: make send_batch_count tunable effective
authorSantosh Shilimkar <santosh.shilimkar@oracle.com>
Thu, 8 Oct 2015 22:59:14 +0000 (15:59 -0700)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Tue, 13 Oct 2015 17:08:23 +0000 (10:08 -0700)
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 <ajaykumar.hotchandani@oracle.com>
Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Wengang Wang <wen.gang.wang@oracle.com>
Reported-by: Wei Lin Guay <wei.lin.guay@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
net/rds/send.c

index cc4835a81afed3908c5a01787e48680ec326cb4f..e7109f9228e33badbf1944c2ff0142b1f1151518 100644 (file)
@@ -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);
                }