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

zhu shi song zhushisongzhu at yahoo.com
Sun Sep 10 21:37:07 PDT 2006


I tested for 10 times and every time issued 5000
concurrent connections to access Internet through SDP.
Until now I haven't found any problem.  I hope you can
also reduce memory used by one SDP connection.
  Another question, When I use ib_query_gid in
sdp_init function, it return -EINVAL.  How to use
ib_query_gid correctly?
  If I want to let SDP module is independent of ipoib
module, it it difficult?
  tks
  zhu

--- "Michael S. Tsirkin" <mst at mellanox.co.il> wrote:

> 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
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the general mailing list