Messages in this thread Patch in this message | | | Date | Wed, 20 Jan 1999 00:22:50 +0100 (CET) | From | Andrea Arcangeli <> | Subject | [patch] delayed acks killed in pre-8.gz in testing/ |
| |
David I am happy to see that you have removed the ->ato == HZ/50 == quickack (that was always trashing the very useful information that we had in the ato field). My delack patch was/is doing that too and it is working fine so far.
But you had a bug in your implementation that killed completly delacks in pre-8.gz. The bug is that in the ato == 0 path you set the quickack bit but then the skb_transmit() was clearing it and so the next delack estimator was again in the ato == 0 path, and so killing completly delacks.
Here the fix. Since I was there I also removed completly the reception of a little PSH packet that was setting delacks hardwired to HZ/50. I half the ato now. This looks a bit more sane for me since HZ/50 is zero in a slow link (and maybe too long in a fast path where ato could be 1 or HZ could be > 100).
Index: tcp_input.c =================================================================== RCS file: /var/cvs/linux/net/ipv4/tcp_input.c,v retrieving revision 1.1.2.3 diff -u -r1.1.2.3 tcp_input.c --- tcp_input.c 1999/01/18 14:16:32 1.1.2.3 +++ linux/net/ipv4/tcp_input.c 1999/01/19 23:08:16 @@ -55,6 +55,13 @@ * work without delayed acks. * Andi Kleen: Process packets with PSH set in the * fast path. + * Andrea Arcangeli: Fixed a bug that was killing delayed + * acks completly because tp->ato was + * always 0 due a unluky iteraction + * between tcp_delack_estimator() and + * tcp_transmit_skb(). + * Andrea Arcangeli: Half the delack timeout if we get + * a tiny packet with PSH set. */ #include <linux/config.h> @@ -103,6 +110,13 @@ * this sets our initial ato value. */ tcp_enter_quickack_mode(tp); + /* + * NOTE: since the next tcp_transmit_skb() will clear the + * tcp quickack mode bit, we must also set an ato |= 1 value + * to be sure to not recurse here the next time (and so + * killing the delayed acks completly). -arca + */ + tp->ato |= 1; } else { int m = jiffies - tp->lrcvtime; @@ -132,7 +146,12 @@ * Note: This also clears the "quick ack mode" bit. */ if(th->psh && (skb->len < (tp->mss_cache >> 1))) - tp->ato = HZ/50; + { + tcp_exit_quickack_mode(tp); + tp->ato >>= 1; + if (!tp->ato) + tp->ato = 1; + } } /* Called to compute a smoothed rtt estimate. The data fed to this
Andrea Arcangeli
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |