netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: 2.6.10 TCP troubles -- suggested patch
@ 2005-02-13 10:52 Hubert Tonneau
  2005-02-14 14:12 ` Alexey Kuznetsov
  0 siblings, 1 reply; 40+ messages in thread
From: Hubert Tonneau @ 2005-02-13 10:52 UTC (permalink / raw)
  To: Alexey Kuznetsov, David S. Miller
  Cc: Alexey Kuznetsov, rick.jones2, shemminger, romieu, netdev

Alexey Kuznetsov wrote:
>
> Exactly. That's why the next test should be with disabled TSO in 2.6.9.
> If too rare PSHs were a problem, it will show as the same disaster there.

After,
ethtool -K eth1 tso off
the result is unchanged on 2.6.9 (14 seconds for 105 MB).

After,
ethtool -K eth1 tso off
the result is also unchanged on 2.6.10-ac11 with no extra TCP patch (325 seconds).


Settings for eth1:
Supported ports: [ TP ]
Supported link modes:   10baseT/Half 10baseT/Full 
                        100baseT/Half 100baseT/Full 
                        1000baseT/Full 
Supports auto-negotiation: Yes
Advertised link modes:  10baseT/Half 10baseT/Full 
                        100baseT/Half 100baseT/Full 
                        1000baseT/Full 
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000007 (7)
Link detected: yes


PS:
Please sorry for the long delay I have to run tests, and the reason is that
it's a production server, so I cannot make tests in the middle of the day,
it's remote, so in order to switch the kernel, I have to upload the new one,
and then upload again the old one to switch back, and the best connection
I have these days is 30 Kbps modem connection. It will improve on monday since
I'll have a 128 Kbps ADSL connection.

^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: 2.6.10 TCP troubles -- suggested patch
@ 2005-02-20 23:06 Hubert Tonneau
  0 siblings, 0 replies; 40+ messages in thread
From: Hubert Tonneau @ 2005-02-20 23:06 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, Nivedita Singhvi
  Cc: Stephen Hemminger, romieu, kuznet, niv, rick.jones2, netdev

I've noticed something very interesting:
if trying to send to a gigabit connected Mac OSX instead of 100 Mbps connected,
then there is no drastic slowdown when switching Linux 2.6.9 to 2.6.10


> Any chance you could
> send me just the following from your boxes:
> (Before and after the transfer)
>
> - /proc/net/snmp
> - /proc/net/netstat

Here are the requested extra informations:

2.6.10-ac10 before:

Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates
Ip: 2 64 47336 0 0 0 0 0 47197 127721 0 0 0 0 0 0 0 0 0
Icmp: InMsgs InErrors InDestUnreachs InTimeExcds InParmProbs InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampReps InAddrMasks InAddrMaskReps OutMsgs OutErrors OutDestUnreachs OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects OutEchos OutEchoReps OutTimestamps OutTimestampReps OutAddrMasks OutAddrMaskReps
Icmp: 2 0 0 0 0 0 0 0 2 0 0 0 0 417 0 417 0 0 0 0 0 0 0 0 0 0
Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs OutRsts
Tcp: 1 200 120000 -1 40 209 0 2 7 46158 126953 156 0 243
Udp: InDatagrams NoPorts InErrors OutDatagrams
Udp: 332 417 0 336

TcpExt: SyncookiesSent SyncookiesRecv SyncookiesFailed EmbryonicRsts PruneCalled RcvPruned OfoPruned OutOfWindowIcmps LockDroppedIcmps ArpFilter TW TWRecycled TWKilled PAWSPassive PAWSActive PAWSEstab DelayedACKs DelayedACKLocked DelayedACKLost ListenOverflows ListenDrops TCPPrequeued TCPDirectCopyFromBacklog TCPDirectCopyFromPrequeue TCPPrequeueDropped TCPHPHits TCPHPHitsToUser TCPPureAcks TCPHPAcks TCPRenoRecovery TCPSackRecovery TCPSACKReneging TCPFACKReorder TCPSACKReorder TCPRenoReorder TCPTSReorder TCPFullUndo TCPPartialUndo TCPDSACKUndo TCPLossUndo TCPLoss TCPLostRetransmit TCPRenoFailures TCPSackFailures TCPLossFailures TCPFastRetrans TCPForwardRetrans TCPSlowStartRetrans TCPTimeouts TCPRenoRecoveryFail TCPSackRecoveryFail TCPSchedulerFailed TCPRcvCollapsed TCPDSACKOldSent TCPDSACKOfoSent TCPDSACKRecv TCPDSACKOfoRecv TCPAbortOnSyn TCPAbortOnData TCPAbortOnClose TCPAbortOnMemory T
 CPAbortOnTimeout TCPAbortOnLinger TCPAbortFailed TCPMemoryPressures
TcpExt: 0 0 0 0 0 0 0 0 0 0 94 0 0 0 0 0 452 0 0 0 0 9499 215 241030 0 7583 377 16696 3330 123 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 123 0 0 7 0 0 0 0 0 0 0 0 0 90 0 0 2 0 0 0

2.6.10-ac10 after sending to the 100 Mbps connected Mac OSX:

Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates
Ip: 2 64 70100 0 0 0 0 0 69901 214176 0 0 0 0 0 0 0 0 0
Icmp: InMsgs InErrors InDestUnreachs InTimeExcds InParmProbs InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampReps InAddrMasks InAddrMaskReps OutMsgs OutErrors OutDestUnreachs OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects OutEchos OutEchoReps OutTimestamps OutTimestampReps OutAddrMasks OutAddrMaskReps
Icmp: 2 0 0 0 0 0 0 0 2 0 0 0 0 421 0 421 0 0 0 0 0 0 0 0 0 0
Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs OutRsts
Tcp: 1 200 120000 -1 49 263 0 2 9 68728 213354 284 0 315
Udp: InDatagrams NoPorts InErrors OutDatagrams
Udp: 382 421 0 386

TcpExt: SyncookiesSent SyncookiesRecv SyncookiesFailed EmbryonicRsts PruneCalled RcvPruned OfoPruned OutOfWindowIcmps LockDroppedIcmps ArpFilter TW TWRecycled TWKilled PAWSPassive PAWSActive PAWSEstab DelayedACKs DelayedACKLocked DelayedACKLost ListenOverflows ListenDrops TCPPrequeued TCPDirectCopyFromBacklog TCPDirectCopyFromPrequeue TCPPrequeueDropped TCPHPHits TCPHPHitsToUser TCPPureAcks TCPHPAcks TCPRenoRecovery TCPSackRecovery TCPSACKReneging TCPFACKReorder TCPSACKReorder TCPRenoReorder TCPTSReorder TCPFullUndo TCPPartialUndo TCPDSACKUndo TCPLossUndo TCPLoss TCPLostRetransmit TCPRenoFailures TCPSackFailures TCPLossFailures TCPFastRetrans TCPForwardRetrans TCPSlowStartRetrans TCPTimeouts TCPRenoRecoveryFail TCPSackRecoveryFail TCPSchedulerFailed TCPRcvCollapsed TCPDSACKOldSent TCPDSACKOfoSent TCPDSACKRecv TCPDSACKOfoRecv TCPAbortOnSyn TCPAbortOnData TCPAbortOnClose TCPAbortOnMemory T
 CPAbortOnTimeout TCPAbortOnLinger TCPAbortFailed TCPMemoryPressures
TcpExt: 0 0 0 0 0 0 0 0 0 0 105 0 0 0 0 0 804 0 0 0 0 12808 215 310763 0 11460 472 26236 5086 247 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 247 0 0 11 0 0 0 0 0 0 0 0 0 123 0 0 2 0 0 0

^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: 2.6.10 TCP troubles -- suggested patch
@ 2005-02-16 20:00 Hubert Tonneau
  0 siblings, 0 replies; 40+ messages in thread
From: Hubert Tonneau @ 2005-02-16 20:00 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov
  Cc: shemminger, romieu, kuznet, niv, rick.jones2, netdev

David S. Miller wrote:
>
> Hubert, do you have netfilter enabled in the 2.6.10 kernel you are running?
> 
> I'm asking because the TCP changes in 2.6.10 are pretty benign
> (attached for the curious who want to review along), whereas
> netfilter had major updates particularly in the TCP connection
> tracking code.

There is no netfilter on this server.

> I also reviewed 2.6.10-ac11 for anything interesting wrt. TCP and the
> only thing in there is the tcp_retrans_try_collapse() missing check
> to avoid collapsing TSO segments.

I'm using 2.6.10-ac11 for security reasons. I could use 2.6.10-as1 as well.
As far as I know, they all behave exactly the same from the TCP point of view.
The difference is definetly between stock 2.6.9 and stock 2.6.10

If it helps, you can send me a patch reverting TCP changes between 2.6.10
and 2.6.9, and I'll give it a spin, just to be sure that the problem is
truely related to TCP code, not other changes side effects.

Anyway, here is the set of settings I'm using to build the kernel, and no
module is loaded while the test is running:

CONFIG_2GB:  y
CONFIG_ACPI:  y
CONFIG_ACPI_AC:  m
CONFIG_ACPI_BATTERY:  m
CONFIG_ACPI_BUTTON:  m
CONFIG_ACPI_FAN:  m
CONFIG_ACPI_PROCESSOR:  y
CONFIG_ACPI_SLEEP:  y
CONFIG_ACPI_THERMAL:  y
CONFIG_ACPI_VIDEO:  m
CONFIG_APM_RTC_IS_GMT:  y
CONFIG_ATALK:  m
CONFIG_AUTODETECT_RAID:  y
CONFIG_AUTOFS_FS:  m
CONFIG_BINFMT_ELF:  y
CONFIG_BINFMT_MISC:  y
CONFIG_BLK_DEV_CMD640:  y
CONFIG_BLK_DEV_FD:  m
CONFIG_BLK_DEV_GENERIC:  y
CONFIG_BLK_DEV_IDE:  y
CONFIG_BLK_DEV_IDECD:  m
CONFIG_BLK_DEV_IDEDISK:  y
CONFIG_BLK_DEV_IDEDMA:  y
CONFIG_BLK_DEV_IDEDMA_PCI:  y
CONFIG_BLK_DEV_IDEPCI:  y
CONFIG_BLK_DEV_IDESCSI:  m
CONFIG_BLK_DEV_LOOP:  m
CONFIG_BLK_DEV_MD:  y
CONFIG_BLK_DEV_NBD:  m
CONFIG_BLK_DEV_PIIX:  y
CONFIG_BLK_DEV_RAM:  m
CONFIG_BLK_DEV_RZ1000:  y
CONFIG_BLK_DEV_SD:  y
CONFIG_BLK_DEV_SR:  m
CONFIG_BLK_DEV_TRIRON:  y
CONFIG_BSD_PROCESS_ACCT:  y
CONFIG_CHR_DEV_SG:  m
CONFIG_CHR_DEV_ST:  m
CONFIG_CODA_FS:  m
CONFIG_E1000:  y
CONFIG_EXPERIMENTAL:  y
CONFIG_EXT2_FS:  y
CONFIG_EXT3_FS:  y
CONFIG_EXT3_FS_XATTR:  y
CONFIG_FAT_FS:  m
CONFIG_FILTER:  y
CONFIG_FUSION:  y
CONFIG_FUSION_CTL:  m
CONFIG_FUSION_ISENSE:  m
CONFIG_FUSION_LAN:  m
CONFIG_HFSPLUS_FS:  m
CONFIG_HFS_FS:  m
CONFIG_HIGHMEM:  y
CONFIG_HIGHMEM4G:  y
CONFIG_HPET_TIMER:  y
CONFIG_HPFS_FS:  m
CONFIG_IDE:  y
CONFIG_IDEDMA_AUTO:  y
CONFIG_IDEDMA_ONLYDISK:  y
CONFIG_IDEDMA_PCI_AUTO:  y
CONFIG_IDEPCI_SHARE_IRQ:  y
CONFIG_IDE_GENERIC:  y
CONFIG_INET:  y
CONFIG_INPUT:  y
CONFIG_INPUT_KEYBDEV:  m
CONFIG_INPUT_KEYBOARD:  y
CONFIG_INPUT_MOUSE:  y
CONFIG_INPUT_MOUSEDEV:  m
CONFIG_IP_ALIAS:  y
CONFIG_IP_ROUTE_VERBOSE:  y
CONFIG_IRQBALANCE:  y
CONFIG_ISO9660_FS:  m
CONFIG_KCORE_ELF:  y
CONFIG_KEYBOARD_ATKBD:  y
CONFIG_LEGACY_PTYS:  y
CONFIG_LOCKD:  m
CONFIG_M386:  n
CONFIG_M486:  n
CONFIG_M586:  n
CONFIG_M686:  n
CONFIG_MAC_PARTITION:  y
CONFIG_MD:  y
CONFIG_MD_BOOT:  y
CONFIG_MD_LINEAR:  y
CONFIG_MD_LVM:  n
CONFIG_MD_MIRRORING:  y
CONFIG_MD_RAID0:  y
CONFIG_MD_RAID1:  y
CONFIG_MD_RAID5:  y
CONFIG_MD_STRIPED:  y
CONFIG_MD_TRANSLUCENT:  n
CONFIG_MODULES:  y
CONFIG_MODULE_UNLOAD:  y
CONFIG_MOUSE:  m
CONFIG_MOUSE_PS2:  y
CONFIG_MPENTIUM4:  y
CONFIG_MSDOS_FS:  m
CONFIG_MTRR:  y
CONFIG_NET:  y
CONFIG_NETDEVICES:  y
CONFIG_NET_ETHERNET:  y
CONFIG_NFSD:  m
CONFIG_NFS_FS:  m
CONFIG_NLS:  y
CONFIG_NLS_CODEPAGE_437:  m
CONFIG_NLS_CODEPAGE_850:  m
CONFIG_NLS_ISO8859_1:  m
CONFIG_NLS_UTF8:  m
CONFIG_NTFS_FS:  m
CONFIG_OOM_KILLER:  y
CONFIG_PACKET:  y
CONFIG_PARPORT:  m
CONFIG_PARPORT_PC:  m
CONFIG_PCI:  y
CONFIG_PCI_BIOS:  y
CONFIG_PCI_GOANY:  y
CONFIG_PCI_OLD_PROC:  y
CONFIG_PCI_QUIRKS:  y
CONFIG_PIIX_TUNING:  y
CONFIG_PM:  y
CONFIG_PPP:  m
CONFIG_PPPOE:  m
CONFIG_PPP_ASYNC:  m
CONFIG_PPP_BSDCOMP:  m
CONFIG_PPP_DEFLATE:  m
CONFIG_PPP_FILTER:  y
CONFIG_PPP_SYNC_TTY:  m
CONFIG_PREEMPT:  y
CONFIG_PRINTER:  m
CONFIG_PRINTER_READBACK:  y
CONFIG_PROC_FS:  y
CONFIG_PSMOUSE:  y
CONFIG_QNX4FS_FS:  m
CONFIG_REGPARM:  y
CONFIG_RTC:  y
CONFIG_SCSI:  y
CONFIG_SCSI_PROC_FS:  y
CONFIG_SERIAL:  m
CONFIG_SERIAL_8250:  m
CONFIG_SHAPER:  m
CONFIG_SLIP:  m
CONFIG_SMB_FS:  m
CONFIG_SMP:  y
CONFIG_SOUND:  m
CONFIG_SUNRPC:  m
CONFIG_SYSCTL:  y
CONFIG_SYSVIPC:  y
CONFIG_UFS_FS:  m
CONFIG_UMSDOS_FS:  m
CONFIG_UNIX:  y
CONFIG_USB:  m
CONFIG_USB_ACM:  m
CONFIG_USB_AUDIO:  m
CONFIG_USB_CDCETHER:  m
CONFIG_USB_DEVICEFS:  y
CONFIG_USB_EHCI_HCD:  m
CONFIG_USB_HID:  m
CONFIG_USB_HIDINPUT:  y
CONFIG_USB_KBD:  m
CONFIG_USB_MOUSE:  m
CONFIG_USB_OHCI:  m
CONFIG_USB_OHCI_HCD:  m
CONFIG_USB_PRINTER:  m
CONFIG_USB_SERIAL:  m
CONFIG_USB_STORAGE:  m
CONFIG_USB_UHCI:  m
CONFIG_USB_UHCI_ALT:  m
CONFIG_USB_UHCI_HCD:  m
CONFIG_VFAT_FS:  m
CONFIG_VGA_CONSOLE:  y
CONFIG_VT:  y
CONFIG_VT_CONSOLE:  y
CONFIG_X86_MCE:  y
CONFIG_X86_UP_APIC:  y
CONFIG_X86_UP_IOAPIC:  y

Since we are at it, here are the hardware components of the box:

8086 	Intel Corporation 	254C 	E7501 	0 		Host Controller
8086 	Intel Corporation 	2543 	E7500/E7501 	0 		HI_B Virtual PCI-to-PCI Bridge
8086 	Intel Corporation 	2545 	E7500/E7501 	0 		HI_C Virtual PCI-to-PCI Bridge
8086 	Intel Corporation 	2547 	E7500/E7501 	0 		HI_D Virtual PCI-to-PCI Bridge
8086 	Intel Corporation 	2482 	82801CA/CAM 	10 		USB Controller
8086 	Intel Corporation 	244E 	82801BA/CA/DB, 6300ESB 	0 		Hub Interface to PCI Bridge
8086 	Intel Corporation 	2480 	82801CA 	0 		LPC Interface Bridge
8086 	Intel Corporation 	248B 	82801CA 	0 		UltraATA/100 IDE Controller
8086 	Intel Corporation 	1461 	14611014 	0 		I/OxAPIC Interrupt Controller
8086 	Intel Corporation 	1461 	14611014 	0 		I/OxAPIC Interrupt Controller
8086 	Intel Corporation 	1461 	14611014 	0 		I/OxAPIC Interrupt Controller
8086 	Intel Corporation 	1461 	14611014 	0 		I/OxAPIC Interrupt Controller
8086 	Intel Corporation 	1461 	14611014 	0 		I/OxAPIC Interrupt Controller
8086 	Intel Corporation 	1461 	14611014 	0 		I/OxAPIC Interrupt Controller
8086 	Intel Corporation 	1460 	82870P2 	0 		Hub Interface-to-PCI Bridge
8086 	Intel Corporation 	1460 	82870P2 	0 		Hub Interface-to-PCI Bridge
8086 	Intel Corporation 	1460 	82870P2 	0 		Hub Interface-to-PCI Bridge
8086 	Intel Corporation 	1460 	82870P2 	0 		Hub Interface-to-PCI Bridge
8086 	Intel Corporation 	1460 	82870P2 	0 		Hub Interface-to-PCI Bridge
8086 	Intel Corporation 	1460 	82870P2 	0 		Hub Interface-to-PCI Bridge
8086 	Intel Corporation 	1026 	82545GM 	18 		Gigabit Ethernet Controller
8086 	Intel Corporation 	100D 	82544GC 	1C 		Gigabit Ethernet Controller (LOM)
8086 	Intel Corporation 	0309 	80303 	0 		I/O Processor PCI-to-PCI Bridge Unit
1000 	LSI Logic 	0030 	LSI53C1020/1030 	78 		PCI-X to Ultra320 SCSI Controller
1000 	LSI Logic 	0030 	LSI53C1020/1030 	79 		PCI-X to Ultra320 SCSI Controller
1002 	ATI Technologies 	4752 	Rage XL PCI 	0 	

And the interrupts (while running 2.6.9):

           CPU0       CPU1       
  0:  159132374  132686719    IO-APIC-edge  timer
  1:          9          0    IO-APIC-edge  i8042
  8:          0          0    IO-APIC-edge  rtc
  9:          0          0   IO-APIC-level  acpi
 14:          1          0    IO-APIC-edge  ide0
 24:   22225220          0   IO-APIC-level  eth0
 28:          4  134406507   IO-APIC-level  eth1
120:     532730     578109   IO-APIC-level  ioc0
121:    1931739    1327672   IO-APIC-level  ioc1
NMI:          0          0 
LOC:  291863458  291863528 
ERR:          0
MIS:          0

/proc/net/dev

Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
  eth0:2512143307 20914618    0    0    0     0          0         0 1951489031 52933097    0    0    0     0       0          0
  eth1:943883086 75451745    0    0    0     0          0         0 201914508 171409895    0    0    0     0       0          0
    lo:2247204588  748445    0    0    0     0          0         0 2247204588  748445    0    0    0     0       0          0

/proc/net/route

Iface Destination Gateway  Flags RefCnt Use Metric Mask MTU Window IRTT                                                       
eth0 207C29D5 00000000 0001 0 0 0 F0FFFFFF 0 0 0                                                                               
eth1 00606B0A 00000000 0001 0 0 0 00FFFFFF 0 0 0                                                                               
eth0 00000000 217C29D5 0003 0 0 0 00000000 0 0 0                                                                               

^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: 2.6.10 TCP troubles -- suggested patch
@ 2005-02-11 21:55 Hubert Tonneau
  2005-02-11 22:54 ` Rick Jones
  2005-02-11 23:04 ` Stephen Hemminger
  0 siblings, 2 replies; 40+ messages in thread
From: Hubert Tonneau @ 2005-02-11 21:55 UTC (permalink / raw)
  To: David S. Miller
  Cc: shemminger, romieu, kuznet, Nivedita Singhvi, Rick Jones, netdev

Sorry, it still does not work, unless I made a mistake:
Linux 2.6.9 takes 15 seconds to copy 105 MB to Mac OSX
Linux 2.6.10 with the TCP patch below still takes 325 seconds to do the same.

You can pick the new tcpdump report, created through:
tcpdump -i eth1 ip host 10.107.96.230 -w /tmp/dump-2.6.10-tcp2
at http://fullpliant.org/pliant/browse/file/archive/dump-2.6.10-tcp2.gz

Here is the connection summary:

Dell PowerEdge 2600 (dual Xeon with hyper threading) running libsmbclient
on Linux 2.6.x, IP for eth1 (Intel pro 1000) is 10.107.96.7 (full
duplex, flow control is enabled)
     |
     |
gigabit switch
     |
     |
100 Mbps switch
     |
     |
Mac running Samba server on OSX,
IP is 10.107.96.230


David S. Miller wrote:
>
> Hubert, try this patch instead.
> 
> ===== net/ipv4/tcp_output.c 1.77 vs edited =====
> --- 1.77/net/ipv4/tcp_output.c	2005-01-18 12:23:36 -08:00
> +++ edited/net/ipv4/tcp_output.c	2005-02-10 16:42:42 -08:00
> @@ -408,6 +408,16 @@
>  		sk->sk_send_head = skb;
>  }
>  
> +static inline void tcp_tso_set_push(struct sk_buff *skb)
> +{
> +	/* Force push to be on for any TSO frames to workaround
> +	 * problems with busted implementations like Mac OS-X that
> +	 * hold off socket reveive wakeups until push is seen.
> +	 */
> +	if (tcp_skb_pcount(skb) > 1)
> +		TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH;
> +}
> +
>  /* Send _single_ skb sitting at the send head. This function requires
>   * true push pending frames to setup probe timer etc.
>   */
> @@ -419,6 +429,7 @@
>  	if (tcp_snd_test(tp, skb, cur_mss, TCP_NAGLE_PUSH)) {
>  		/* Send it out now. */
>  		TCP_SKB_CB(skb)->when = tcp_time_stamp;
> +		tcp_tso_set_push(skb);
>  		if (!tcp_transmit_skb(sk, skb_clone(skb, sk->sk_allocation))) {
>  			sk->sk_send_head = NULL;
>  			tp->snd_nxt = TCP_SKB_CB(skb)->end_seq;
> @@ -755,6 +766,7 @@
>  			}
>  
>  			TCP_SKB_CB(skb)->when = tcp_time_stamp;
> +			tcp_tso_set_push(skb);
>  			if (tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC)))
>  				break;
>  
> @@ -1096,6 +1108,7 @@
>  	 * is still in somebody's hands, else make a clone.
>  	 */
>  	TCP_SKB_CB(skb)->when = tcp_time_stamp;
> +	tcp_tso_set_push(skb);
>  
>  	err = tcp_transmit_skb(sk, (skb_cloned(skb) ?
>  				    pskb_copy(skb, GFP_ATOMIC):
> @@ -1668,6 +1681,7 @@
>  
>  			TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH;
>  			TCP_SKB_CB(skb)->when = tcp_time_stamp;
> +			tcp_tso_set_push(skb);
>  			err = tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC));
>  			if (!err) {
>  				update_send_head(sk, tp, skb);

^ permalink raw reply	[flat|nested] 40+ messages in thread
* Re: 2.6.10 TCP troubles -- suggested patch
@ 2005-02-10 21:53 Hubert Tonneau
  2005-02-10 22:36 ` Rick Jones
  0 siblings, 1 reply; 40+ messages in thread
From: Hubert Tonneau @ 2005-02-10 21:53 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Francois Romieu, Alexey Kuznetsov, netdev

It does not seem to solve the problem:
. Linux 2.6.9 takes 15 seconds to copy 105 MB to the Mac OSX
. Linux 2.6.10 with the TCP patch still takes 325 seconds.

Stephen Hemminger wrote:
>
> Please try this patch, based on Alexey's suggestion:
> 
> > That's one quick and simple idea: set PSH on each tso segment.
> > Seems, it is always good. Hardware will preserve it only on the last skb and
> > everyone will be happy.
> 
> # This is a BitKeeper generated diff -Nru style patch.
> #
> # ChangeSet
> #   2005/02/09 11:00:57-08:00 shemminger@linux.site 
> #   Always set PUSH on TSO multi-segment frames
> #   to workaround bugs in MacOSX
> # 
> # net/ipv4/tcp_output.c
> #   2005/02/09 11:00:44-08:00 shemminger@linux.site +8 -0
> #   Always set PUSH on TSO multi-segment frames
> #   to workaround bugs in MacOSX
> # 
> diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> --- a/net/ipv4/tcp_output.c	2005-02-09 11:01:12 -08:00
> +++ b/net/ipv4/tcp_output.c	2005-02-09 11:01:12 -08:00
> @@ -754,6 +754,14 @@
>  					break;
>  			}
>  
> +			/* Force push to be on for any large TSO frames
> +			 * to workaround problems with busted implementations
> +			 * like MacOSX that hold off delivery of data until
> +			 * push.
> +			 */
> +			if (tcp_skb_pcount(skb) > 1)
> +			    TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH;
> +
>  			TCP_SKB_CB(skb)->when = tcp_time_stamp;
>  			if (tcp_transmit_skb(sk, skb_clone(skb, GFP_ATOMIC)))
>  				break;

^ permalink raw reply	[flat|nested] 40+ messages in thread
[parent not found: <050QTJA12@server5.heliogroup.fr>]

end of thread, other threads:[~2005-02-20 23:06 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-13 10:52 2.6.10 TCP troubles -- suggested patch Hubert Tonneau
2005-02-14 14:12 ` Alexey Kuznetsov
  -- strict thread matches above, loose matches on Subject: below --
2005-02-20 23:06 Hubert Tonneau
2005-02-16 20:00 Hubert Tonneau
2005-02-11 21:55 Hubert Tonneau
2005-02-11 22:54 ` Rick Jones
2005-02-11 23:09   ` Nivedita Singhvi
2005-02-11 23:40     ` Rick Jones
2005-02-12  1:08     ` David S. Miller
2005-02-12  1:09   ` David S. Miller
2005-02-12 14:31     ` Alexey Kuznetsov
2005-02-12 19:28       ` David S. Miller
2005-02-12 19:44         ` Leonid Grossman
2005-02-12 19:52         ` Alexey Kuznetsov
2005-02-15 23:25           ` David S. Miller
2005-02-12 20:19       ` rick jones
2005-02-12 20:28         ` David S. Miller
2005-02-12 20:56         ` Alexey Kuznetsov
2005-02-12 21:27           ` Nivedita Singhvi
2005-02-12 21:43           ` rick jones
2005-02-12 22:00             ` Alexey Kuznetsov
2005-02-13  1:29               ` rick jones
2005-02-11 23:04 ` Stephen Hemminger
2005-02-12  1:07   ` David S. Miller
2005-02-12 12:11     ` Andi Kleen
2005-02-12 19:23       ` David S. Miller
2005-02-12 21:30         ` Andi Kleen
2005-02-12 14:16     ` Alexey Kuznetsov
2005-02-12 19:41       ` David S. Miller
2005-02-12 20:03         ` Alexey Kuznetsov
2005-02-15 23:26           ` David S. Miller
2005-02-15 23:42             ` Rick Jones
2005-02-15 23:23   ` David S. Miller
2005-02-16  9:13     ` Alexey Kuznetsov
2005-02-16 17:50       ` David S. Miller
2005-02-10 21:53 Hubert Tonneau
2005-02-10 22:36 ` Rick Jones
2005-02-11  1:16   ` David S. Miller
     [not found] <050QTJA12@server5.heliogroup.fr>
2005-02-09 18:59 ` Stephen Hemminger
2005-02-09 20:25   ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).