[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iJVJdNUuNBna5JAKFP3pBL7TrvGGVWB+VByzRR=fJghag@mail.gmail.com>
Date: Tue, 6 Feb 2018 09:05:11 -0800
From: Eric Dumazet <edumazet@...gle.com>
To: Tal Gilboa <talgi@...lanox.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
David Laight <David.Laight@...lab.com>,
David Miller <davem@...emloft.net>,
"ncardwell@...gle.com" <ncardwell@...gle.com>,
"ycheng@...gle.com" <ycheng@...gle.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Saeed Mahameed <saeedm@...lanox.com>,
Tariq Toukan <tariqt@...lanox.com>,
Amir Ancel <amira@...lanox.com>
Subject: Re: [PATCH net-next 0/7] tcp: implement rb-tree based retransmit queue
On Tue, Feb 6, 2018 at 8:27 AM, Tal Gilboa <talgi@...lanox.com> wrote:
> On 2/6/2018 5:52 PM, Eric Dumazet wrote:
>>
>> On Tue, 2018-02-06 at 15:22 +0000, David Laight wrote:
>>>
>>> From: Eric Dumazet
>>>>
>>>> Sent: 06 February 2018 14:20
>>>
>>>
>>> ...
>>>>
>>>> Please give exact details.
>>>> Sending 64, 128, 256 or 512 bytes at a time on TCP_STREAM makes little
>>>> sense.
>>>> We are not optimizing stack for pathological cases, sorry.
>>>
>>>
>>> There are plenty of workloads which are not bulk data and where multiple
>>> small buffers get sent at unknown intervals (which may be back to back).
>>> Such connections have to have Nagle disabled because the Nagle delays
>>> are 'horrid'.
>>> Clearly lost packets can cause delays, but they are rare on local
>>> networks.
>>
>>
>> Auto corking makes sure aggregation happens, even for when Nagle is in
>> the picture.
>
>
>>
>> netperf -- -m 256 will still cook 64KB TSO packets
>
>
> This is what we would have liked to see, but auto corking isn't forcing 64KB
> TSO packets. Under certain conditions, specifically when TX queue is empty,
> it would send the SKB to transmit even if it isn't full:
Yes.
Auto corking does not predict the future, nor arm a high resolution
timer when application
does a send(small_size)
This packet is sent immaediately, as instructed by application and TCP
normal behavior.
But second or third packet would detect the condition.
Unless a driver does skb_orphan() too early, breaking back pressure.
> static bool tcp_should_autocork(struct sock *sk, struct sk_buff *skb,
> int size_goal)
> {
> return skb->len < size_goal &&
> sock_net(sk)->ipv4.sysctl_tcp_autocorking &&
> skb != tcp_write_queue_head(sk) &&
> refcount_read(&sk->sk_wmem_alloc) > skb->truesize;
> }
> When skb == tcp_write_queue_head(sk) corking is done. This is part of the
> optimization for mlx5 driver I've mentioned. If we can better utilize auto
> corking we shouldn't have an issue.
Or not issue expensive system calls for small payloads. stdio was
invented a while back :)
Meltdown/Spectre mitigation put high price to system calls nowadays.
Powered by blists - more mailing lists