[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1466626530.6850.77.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Wed, 22 Jun 2016 13:15:30 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jason Baron <jbaron@...mai.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next 2/2] tcp: reduce cpu usage when SO_SNDBUF is
set
On Wed, 2016-06-22 at 15:20 -0400, Jason Baron wrote:
> hmm, I think we need the smp_mb() there. From
> tcp_poll() we have:
>
> 1) set_bit(SOCK_NOSPACE, ...) (write)
> 2) smp_mb__after_atomic();
> 3) if (sk_stream_is_writeable(sk)) (read)
>
> while in tcp_check_space() its:
>
> 1) the state that sk_stream_is_writeable() cares about (write)
> 2) smp_mb();
> 3) if (sk->sk_socket && test_bit(SOCK_NOSPACE,...) (read)
Oh right, thanks for checking.
>
> So if we can show that there are sufficient barriers
> for #1 (directly above), maybe it can be down-graded or
> eliminated. But it would still seem somewhat fragile.
>
> Note I didn't observe any missing wakeups here, but I
> just wanted to make sure we didn't miss any, since they
> can be quite hard to debug.
x
Powered by blists - more mailing lists