[openib-general] why sdp connections cost so much memory

Michael S. Tsirkin mst at mellanox.co.il
Wed Aug 16 11:55:21 PDT 2006


Quoting r. zhu shi song <zhushisongzhu at yahoo.com>:
> Subject: Re: why sdp connections cost so much memory
> 
> I have changed SDP_RX_SIZE from 0x40 to 1 and rebuilt
> ib_sdp.ko. But kernel always crashed.

Weird. How about this patch:

diff --git a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
index c35a4da..2fd79a0 100644
--- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
@@ -234,7 +234,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) ||
 	       unlikely(ssk->rx_head - ssk->rx_tail < SDP_MIN_BUFS))
 		sdp_post_recv(ssk);
 }

-- 
MST




More information about the general mailing list