Re: [PATCH net-next] tcp: reduce cpu usage when SO_SNDBUF is set

2016-06-21 Thread Eric Dumazet
On Tue, 2016-06-21 at 11:24 -0400, Jason Baron wrote: > in tcp_check_space() with something like: > > sk->sk_flags &= ~((1UL << SOCK_QUEUE_SHRUNK) | (1UL << SOCK_SHORT_WRITE)); > > Since we are already writing to sk_flags there this should have very > minimal overhead. And then remove the clear

Re: [PATCH net-next] tcp: reduce cpu usage when SO_SNDBUF is set

2016-06-21 Thread Jason Baron
On 06/20/2016 06:29 PM, Eric Dumazet wrote: > On Mon, 2016-06-20 at 17:23 -0400, Jason Baron wrote: >> From: Jason Baron >> >> When SO_SNDBUF is set and we are under tcp memory pressure, the effective >> write buffer space can be much lower than what was set using SO_SNDBUF. For >> example, we m

Re: [PATCH net-next] tcp: reduce cpu usage when SO_SNDBUF is set

2016-06-20 Thread Eric Dumazet
On Mon, 2016-06-20 at 17:23 -0400, Jason Baron wrote: > From: Jason Baron > > When SO_SNDBUF is set and we are under tcp memory pressure, the effective > write buffer space can be much lower than what was set using SO_SNDBUF. For > example, we may have set the buffer to 100kb, but we may only be

[PATCH net-next] tcp: reduce cpu usage when SO_SNDBUF is set

2016-06-20 Thread Jason Baron
From: Jason Baron When SO_SNDBUF is set and we are under tcp memory pressure, the effective write buffer space can be much lower than what was set using SO_SNDBUF. For example, we may have set the buffer to 100kb, but we may only be able to write 10kb. In this scenario poll()/select()/epoll(), ar