[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1410018384.11872.33.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Sat, 06 Sep 2014 08:46:24 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: therbert@...gle.com, alexander.h.duyck@...el.com,
netdev@...r.kernel.org
Subject: Re: Performance regression on kernels 3.10 and newer
On Sat, 2014-09-06 at 08:27 -0700, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> Alexander Duyck reported high false sharing on dst refcount in tcp stack
> when prequeue is used. prequeue is the mechanism used when a thread is
> blocked in recvmsg()/read() on the TCP socket.
>
> We already try to use RCU in input path as much as possible, but we were
> forced to take a refcount on the dst when skb escaped RCU protected
> region. When/if the user thread runs on different cpu, dst_release()
> will then touch dst refcount again.
>
> Commit 093162553c33 (tcp: force a dst refcount when prequeue packet)
> was an example of a race fix.
>
> It turns out the only remaining usage of skb->dst for a packet stored
> in a TCP socket prequeue is IP early demux.
>
> We can add a logic to detect when IP early demux is probably going
> to use skb->dst.
>
> In IPv4 stack, we also can drop dst when skb has to be queued into
> socket backlog. IPv6 needs extra care before doing the same.
>
> Many thanks to Alexander for providing a nice bug report, git bisection,
> and reproducer.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: Alexander Duyck <alexander.h.duyck@...el.com>
Works fine on IPv4, not on IPv6, I will submit a v2 (with a proper title
btw)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists