Commit f519fc5f authored by Linus Torvalds's avatar Linus Torvalds

There's a pre-3 patch on ftp.kernel.org in the kernel/testing directory,

and I'd really like people to give it a good testing: especially if you've
seen slow network connections to some clients (ie Windows). David worked
in the compatibility patches to work around some of the Windows TCP stack
"features" (and Apple too, for that matter), and we want to get this well
tested. It's all fairly straightforward, but let's be careful out there..

                Linus
parent 07f61d38
......@@ -793,17 +793,22 @@ static __inline__ int tcp_snd_test(struct sock *sk, struct sk_buff *skb)
* c) We are retransmiting [Nagle]
* d) We have too many packets 'in flight'
*
* Don't use the nagle rule for urgent data.
* Don't use the nagle rule for urgent data (or
* for the final FIN -DaveM).
*/
if ((sk->nonagle == 2 && (skb->len < tp->mss_cache)) ||
(!sk->nonagle &&
skb->len < (tp->mss_cache >> 1) &&
tp->packets_out &&
!(TCP_SKB_CB(skb)->flags & TCPCB_FLAG_URG)))
!(TCP_SKB_CB(skb)->flags & (TCPCB_FLAG_URG|TCPCB_FLAG_FIN))))
nagle_check = 0;
/* Don't be strict about the congestion window for the
* final FIN frame. -DaveM
*/
return (nagle_check &&
(tcp_packets_in_flight(tp) < tp->snd_cwnd) &&
((tcp_packets_in_flight(tp) < tp->snd_cwnd) ||
(TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN)) &&
!after(TCP_SKB_CB(skb)->end_seq, tp->snd_una + tp->snd_wnd) &&
tp->retransmits == 0);
}
......
......@@ -45,12 +45,7 @@ static int try_to_swap_out(struct task_struct * tsk, struct vm_area_struct* vma,
page = pte_page(pte);
if (MAP_NR(page) >= max_mapnr)
return 0;
page_map = mem_map + MAP_NR(page);
if (PageReserved(page_map)
|| PageLocked(page_map)
|| ((gfp_mask & __GFP_DMA) && !PageDMA(page_map)))
return 0;
if (pte_young(pte)) {
/*
......@@ -62,6 +57,11 @@ static int try_to_swap_out(struct task_struct * tsk, struct vm_area_struct* vma,
return 0;
}
if (PageReserved(page_map)
|| PageLocked(page_map)
|| ((gfp_mask & __GFP_DMA) && !PageDMA(page_map)))
return 0;
/*
* Is the page already in the swap cache? If so, then
* we can just drop our reference to it without doing
......@@ -248,9 +248,8 @@ static int swap_out_vma(struct task_struct * tsk, struct vm_area_struct * vma,
pgd_t *pgdir;
unsigned long end;
/* Don't swap out areas like shared memory which have their
own separate swapping mechanism or areas which are locked down */
if (vma->vm_flags & (VM_SHM | VM_LOCKED))
/* Don't swap out areas which are locked down */
if (vma->vm_flags & VM_LOCKED)
return 0;
pgdir = pgd_offset(tsk->mm, address);
......
......@@ -5,7 +5,7 @@
*
* Implementation of the Transmission Control Protocol(TCP).
*
* Version: $Id: tcp_input.c,v 1.161 1999/04/01 04:35:26 davem Exp $
* Version: $Id: tcp_input.c,v 1.162 1999/04/24 00:27:16 davem Exp $
*
* Authors: Ross Biro, <bir7@leland.Stanford.Edu>
* Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
......@@ -2189,8 +2189,22 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
}
}
/* The silly FIN test here is necessary to see an advancing ACK in
* retransmitted FIN frames properly. Consider the following sequence:
*
* host1 --> host2 FIN XSEQ:XSEQ(0) ack YSEQ
* host2 --> host1 FIN YSEQ:YSEQ(0) ack XSEQ
* host1 --> host2 XSEQ:XSEQ(0) ack YSEQ+1
* host2 --> host1 FIN YSEQ:YSEQ(0) ack XSEQ+1 (fails tcp_sequence test)
*
* At this point the connection will deadlock with host1 believing
* that his FIN is never ACK'd, and thus it will retransmit it's FIN
* forever. The following fix is from Taral (taral@taral.net).
*/
/* step 1: check sequence number */
if (!tcp_sequence(tp, TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq)) {
if (!tcp_sequence(tp, TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq) &&
!(th->fin && TCP_SKB_CB(skb)->end_seq == tp->rcv_nxt)) {
if (!th->rst) {
tcp_send_ack(sk);
goto discard;
......
......@@ -5,7 +5,7 @@
*
* Implementation of the Transmission Control Protocol(TCP).
*
* Version: $Id: tcp_ipv4.c,v 1.172 1999/04/22 10:07:36 davem Exp $
* Version: $Id: tcp_ipv4.c,v 1.173 1999/04/24 00:27:07 davem Exp $
*
* IPv4 specific functions
*
......@@ -1358,7 +1358,14 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct open_request *req,
newtp->last_ack_sent = req->rcv_isn + 1;
newtp->backoff = 0;
newtp->mdev = TCP_TIMEOUT_INIT;
newtp->snd_cwnd = 1;
/* So many TCP implementations out there (incorrectly) count the
* initial SYN frame in their delayed-ACK and congestion control
* algorithms that we must have the following bandaid to talk
* efficiently to them. -DaveM
*/
newtp->snd_cwnd = 2;
newtp->rto = TCP_TIMEOUT_INIT;
newtp->packets_out = 0;
newtp->fackets_out = 0;
......@@ -1839,10 +1846,16 @@ static int tcp_v4_init_sock(struct sock *sk)
tp->mdev = TCP_TIMEOUT_INIT;
tp->mss_clamp = ~0;
/* So many TCP implementations out there (incorrectly) count the
* initial SYN frame in their delayed-ACK and congestion control
* algorithms that we must have the following bandaid to talk
* efficiently to them. -DaveM
*/
tp->snd_cwnd = 2;
/* See draft-stevens-tcpca-spec-01 for discussion of the
* initialization of these values.
*/
tp->snd_cwnd = 1;
tp->snd_cwnd_cnt = 0;
tp->snd_ssthresh = 0x7fffffff; /* Infinity */
......
......@@ -9,6 +9,7 @@
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*/
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/socket.h>
......
......@@ -5,7 +5,7 @@
* Authors:
* Pedro Roque <roque@di.fc.ul.pt>
*
* $Id: tcp_ipv6.c,v 1.103 1999/04/22 10:07:46 davem Exp $
* $Id: tcp_ipv6.c,v 1.104 1999/04/24 00:27:25 davem Exp $
*
* Based on:
* linux/net/ipv4/tcp.c
......@@ -1575,10 +1575,16 @@ static int tcp_v6_init_sock(struct sock *sk)
tp->mdev = TCP_TIMEOUT_INIT;
tp->mss_clamp = ~0;
/* So many TCP implementations out there (incorrectly) count the
* initial SYN frame in their delayed-ACK and congestion control
* algorithms that we must have the following bandaid to talk
* efficiently to them. -DaveM
*/
tp->snd_cwnd = 2;
/* See draft-stevens-tcpca-spec-01 for discussion of the
* initialization of these values.
*/
tp->snd_cwnd = 1;
tp->snd_cwnd_cnt = 0;
tp->snd_ssthresh = 0x7fffffff;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment