Subject: Re: [PATCH] tcp: ensure epoll edge trigger wakeup when out of memory

From: Jason Baron <[email-masked]>
Date: Tue, 19 May 2015 10:10:33 -0400

On 05/19/2015 12:10 AM, David Miller wrote:
> From: David Miller <[email-masked]>
> Date: Tue, 19 May 2015 00:09:45 -0400 (EDT)
>
>> From: Jason Baron <[email-masked]>
>> Date: Fri, 15 May 2015 21:17:07 +0000 (GMT)
>>
>>> From: Jason Baron <[email-masked]>
>>>
>>> If we really can't get an skb allocated, make sure that we let
>>> userspace know. This at least gives us a chance to re-try or abort.
>>>
>>> Signed-off-by: Jason Baron <[email-masked]>
>> Applied to net-next, thanks Jason.
> Nevermind, reverted, you didn't compile let alone test this:
>

Hi David,

This was meant as: "do you think this is a good idea? If so, I will
go off and test it. I mentioned it was *not* tested in the separate
thread where we were discussing it:

http://marc.info/?l=linux-netdev&m=143172482802074&w=2

However, I didn't make that at all clear in *this* thread. And I'm
sorry for the inconvenience.

I meant to do:

+       if (unlikely(skb_queue_len(&sk->sk_write_queue) == 0 && err ==
-EAGAIN))
+               sk->sk_write_space(sk);

not:

+       if (unlikely(sk->sk_write_queue == 0 && err == -EAGAIN))
+               sk->sk_write_space(sk);

Sounds like you are ok with doing the wakeup here- so I will go
off and test that approach, and report back my findings.

Thanks,

-Jason