Subject: Re: sosend_loan tweak
To: None <wrstuden@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-net
Date: 06/15/2006 11:05:39
> > Index: kern/uipc_socket2.c
> > ===================================================================
> > --- kern/uipc_socket2.c (revision 1673)
> > +++ kern/uipc_socket2.c (revision 1674)
> > @@ -385,7 +385,7 @@ soreserve(struct socket *so, u_long sndc
> > if (so->so_rcv.sb_lowat == 0)
> > so->so_rcv.sb_lowat = 1;
> > if (so->so_snd.sb_lowat == 0)
> > - so->so_snd.sb_lowat = MCLBYTES;
> > + so->so_snd.sb_lowat = MAX(MCLBYTES, sock_loan_thresh);
>
> If I understand what you're doing, you make sock_loan_thresh variable. If
> loaning is off, we set it to INT_MAX, which will cause the loan code to
> never trigger.
>
> But then wouldn't the above code put the low water at INT_MAX too? That
> seems like we'd then not have correct high/low water dynamics.
heh, right. i'll fix. thanks.
YAMAMOTO Takashi