[ofa-general] Re: [PATCH 4/8]: RDS: Increase the default number of WRs

Olaf Kirch okir at lst.de
Thu Apr 24 02:11:26 PDT 2008


From 8ee794c0530f6e5f5fe81bc78b5e09be8f4b1eda Mon Sep 17 00:00:00 2001
From: Olaf Kirch <olaf.kirch at oracle.com>
Date: Thu, 24 Apr 2008 00:27:35 -0700
Subject: [PATCH] RDS: Increase the default number of WRs

The default number of send and receive WRs was way too
low to be useful. Increment this to 256 send WRs and
1024 recv WRs.

Signed-off-by: Olaf Kirch <olaf.kirch at oracle.com>
---
 net/rds/ib.h        |    3 +++
 net/rds/ib_sysctl.c |   10 ++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/net/rds/ib.h b/net/rds/ib.h
index fd0b2d8..2c6e809 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -13,6 +13,9 @@
 #define RDS_IB_MAX_SGE			8
 #define RDS_IB_RECV_SGE 		2
 
+#define RDS_IB_DEFAULT_RECV_WR		1024
+#define RDS_IB_DEFAULT_SEND_WR		256
+
 /*
  * IB posts RDS_FRAG_SIZE fragments of pages to the receive queues to 
  * try and minimize the amount of memory tied up both the device and
diff --git a/net/rds/ib_sysctl.c b/net/rds/ib_sysctl.c
index 813b1a6..b8a10fc 100644
--- a/net/rds/ib_sysctl.c
+++ b/net/rds/ib_sysctl.c
@@ -38,18 +38,16 @@
 
 static struct ctl_table_header *rds_ib_sysctl_hdr;
 
-/* default to what we hope will be order 0 allocations */
-unsigned long rds_ib_sysctl_max_send_wr = PAGE_SIZE / sizeof(struct ib_send_wr);
-unsigned long rds_ib_sysctl_max_recv_wr = PAGE_SIZE / sizeof(struct ib_recv_wr);
+unsigned long rds_ib_sysctl_max_send_wr = RDS_IB_DEFAULT_SEND_WR;
+unsigned long rds_ib_sysctl_max_recv_wr = RDS_IB_DEFAULT_RECV_WR;
 unsigned long rds_ib_sysctl_max_recv_allocation = (128 * 1024 * 1024) / RDS_FRAG_SIZE;
 static unsigned long rds_ib_sysctl_max_wr_min = 1;
 /* hardware will fail CQ creation long before this */
 static unsigned long rds_ib_sysctl_max_wr_max = (u32)~0;
 
-/* default to rds_ib_sysctl_max_send_wr/4 */
-unsigned long rds_ib_sysctl_max_unsig_wrs = PAGE_SIZE / (4 * sizeof(struct ib_send_wr));
+unsigned long rds_ib_sysctl_max_unsig_wrs = 16;
 static unsigned long rds_ib_sysctl_max_unsig_wr_min = 1;
-static unsigned long rds_ib_sysctl_max_unsig_wr_max = PAGE_SIZE / sizeof(struct ib_send_wr);
+static unsigned long rds_ib_sysctl_max_unsig_wr_max = 64;
 
 unsigned long rds_ib_sysctl_max_unsig_bytes = (16 << 20);
 static unsigned long rds_ib_sysctl_max_unsig_bytes_min = 1;
-- 
1.5.4.rc3


-- 
Olaf Kirch  |  --- o --- Nous sommes du soleil we love when we play
okir at lst.de |    / | \   sol.dhoop.naytheet.ah kin.ir.samse.qurax



More information about the general mailing list