Re: [PATCH net-next] tcp: forbid direct reclaim if MSG_DONTWAIT is set in send path
From: Eric Dumazet
Date: Tue Oct 09 2018 - 10:58:31 EST
> >
> There was a network latency (hunreds msecs or even one sec ) recently
> on our production enviroment.
> And finally I diagnosed that this latency was caused by direct reclaim
> in tcp_sendmsg.
> That issue could be resovled by keeping a reserved memory.
> But I think deeply that why not forbid direct reclaim if we set MSG_DONWAIT.
> So I did this change and tested it. The application got a errno
> returned instead of being blocked in send path.
> That's why I sumbit this patch.
Sure, and I asked you how you have tested it, because it seems clear
to me that you missed
the real memory allocation point (We fill up to 64 KB of page
fragments memory into one (small) skb)
And how is the application going to use MSG_DONTWAIT in the real
world, I do wonder as well.
We do not add bloat in the kernel if no application is ever going to
use it, especially in the TCP fast path.
Give us a test, so that we can see how this can be used...
Thanks.