[openib-general] why sdp connections cost so much memory
Michael S. Tsirkin
mst at mellanox.co.il
Sun Sep 10 00:58:18 PDT 2006
Quoting r. zhu shi song <zhushisongzhu at yahoo.com>:
> Subject: Re: why sdp connections cost so much memory
>
> OFED-1.1-rc3 has passed my tests. I have to adjust
> Post buffer size to 0x4 and use your patch for me.
> Can you make it fixed not to do these myself manually?
>
> zhu
I plan to add the following patch to OFED. Could you please verify
that it fixes the issue for you, without tweaking the ring size?
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
diff --git a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
index b30d2a0..4540fa4 100644
--- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
@@ -37,6 +37,10 @@ #include <rdma/ib_verbs.h>
#include <rdma/rdma_cm.h>
#include "sdp.h"
+static int rcvbuf_scale = 0x1;
+module_param_named(rcvbuf_scale, rcvbuf_scale, int, 0644);
+MODULE_PARM_DESC(srcvbuf_scale, "Receive buffer size scale factor.");
+
/* Like tcp_fin */
static void sdp_fin(struct sock *sk)
{
@@ -237,7 +241,7 @@ void sdp_post_recvs(struct sdp_sock *ssk
while ((likely(ssk->rx_head - ssk->rx_tail < SDP_RX_SIZE) &&
(ssk->rx_head - ssk->rx_tail - SDP_MIN_BUFS) *
SDP_MAX_SEND_SKB_FRAGS * PAGE_SIZE + rmem <
- ssk->isk.sk.sk_rcvbuf * 0x10) ||
+ ssk->isk.sk.sk_rcvbuf * rcvbuf_scale) ||
unlikely(ssk->rx_head - ssk->rx_tail < SDP_MIN_BUFS))
sdp_post_recv(ssk);
}
--
MST
More information about the general
mailing list