Date: Thu, 25 Jan 2001 11:14:03 -0600 (CST) From: Jonathan Lemon <jlemon@flugsvamp.com> To: wollman@khavrinen.lcs.mit.edu, net@freebsd.org, jayanth@freebsd.org Subject: Re: I have delayed ACK problems Message-ID: <200101251714.f0PHE3L73868@prism.flugsvamp.com> In-Reply-To: <local.mail.freebsd-net/200101251617.LAA83006@khavrinen.lcs.mit.edu> References: <local.mail.freebsd-net/77394.980367750@winston.osd.bsdi.com> <local.mail.freebsd-net/Pine.BSF.4.21.0101250840280.48291-100000@besplex.bde.org> <local.mail.freebsd-net/20010125002509.A77051@yahoo-inc.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <local.mail.freebsd-net/200101251617.LAA83006@khavrinen.lcs.mit.edu> you write:
><<On Thu, 25 Jan 2001 00:25:10 -0800, jayanth <jayanth@yahoo-inc.com> said:
>
>> could you test this patch and compare the results.
>> By generating an ACK for every segment with the TH_PSH flag set
>> I found a significant increase in throughput.
>
>I don't think this is right.
>
>I think what we want to do is:
>
> if (callout_pending(tp->tt_delack)) {
> callout_stop(tp->tt_delack);
> tp->t_flags |= TF_ACKNOW;
> } else
> callout_reset(...)
I'm not sure this is required. Expanding the context of the area in
question:
/*
* Add data to socket buffer.
*/
m_adj(m, drop_hdrlen); /* delayed header drop */
sbappend(&so->so_rcv, m);
sorwakeup(so);
if (tcp_delack_enabled) {
callout_reset(tp->tt_delack, tcp_delacktime,
tcp_timer_delack, tp);
} else {
tp->t_flags |= TF_ACKNOW;
tcp_output(tp);
}
return;
From the bottom portion of tcp_output():
tp->last_ack_sent = tp->rcv_nxt;
tp->t_flags &= ~TF_ACKNOW;
if (tcp_delack_enabled)
callout_stop(tp->tt_delack);
So simply setting TF_ACKNOW and calling tcp_output should be sufficient;
if there is a pending delack timer it will get turned off when the ACK
is actually sent.
I think that jayanth's patch is correct, although I slightly dislike
tying it to the PSH flag - not all implementations actually set this.
However, it is better than the lower bound of acking every incoming
data packet.
--
Jonathan
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101251714.f0PHE3L73868>
