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 in sk_stream_write_space().
Interesting. You added in 3c7151275c0c9 a smp_mb__after_atomic() in tcp_check_space(), but there is no atomic operation to begin with ;)