On Mon, Apr 30, 2018 at 12:10 PM, David Miller wrote:
> From: Eric Dumazet
> Date: Mon, 30 Apr 2018 09:01:47 -0700
>
>> TCP sockets are read by a single thread really (or synchronized
>> threads), or garbage is ensured, regardless of how the kernel
>> ensures locking while reporting "queue length
From: Eric Dumazet
Date: Mon, 30 Apr 2018 09:01:47 -0700
> TCP sockets are read by a single thread really (or synchronized
> threads), or garbage is ensured, regardless of how the kernel
> ensures locking while reporting "queue length"
Whatever applications "typically do", we should never return
On 04/30/2018 08:56 AM, David Miller wrote:
> From: Eric Dumazet
> Date: Mon, 30 Apr 2018 08:43:50 -0700
>
>> I say sort of, because by the time we have any number, TCP might
>> have received more packets anyway.
>
> That's fine.
>
> However, the number reported should have been true at least
On Mon, Apr 30, 2018 at 11:43 AM, Eric Dumazet wrote:
> On 04/30/2018 08:38 AM, David Miller wrote:
>> From: Soheil Hassas Yeganeh
>> Date: Fri, 27 Apr 2018 14:57:32 -0400
>>
>>> Since the socket lock is not held when calculating the size of
>>> receive queue, TCP_INQ is a hint. For example, it
From: Eric Dumazet
Date: Mon, 30 Apr 2018 08:43:50 -0700
> I say sort of, because by the time we have any number, TCP might
> have received more packets anyway.
That's fine.
However, the number reported should have been true at least at some
finite point in time.
If you allow overlapping chang
On 04/30/2018 08:38 AM, David Miller wrote:
> From: Soheil Hassas Yeganeh
> Date: Fri, 27 Apr 2018 14:57:32 -0400
>
>> Since the socket lock is not held when calculating the size of
>> receive queue, TCP_INQ is a hint. For example, it can overestimate
>> the queue size by one byte, if FIN is r
From: Soheil Hassas Yeganeh
Date: Fri, 27 Apr 2018 14:57:32 -0400
> Since the socket lock is not held when calculating the size of
> receive queue, TCP_INQ is a hint. For example, it can overestimate
> the queue size by one byte, if FIN is received.
I think it is even worse than that.
If anoth
From: Soheil Hassas Yeganeh
Applications with many concurrent connections, high variance
in receive queue length and tight memory bounds cannot
allocate worst-case buffer size to drain sockets. Knowing
the size of receive queue length, applications can optimize
how they allocate buffers to read f