Thread (9 messages) 9 messages, 4 authors, 2018-09-18

Re: [PATCH] net/sock: move memory_allocated over to percpu_counter variables

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2018-09-07 03:33:52
Also in: linux-crypto, linux-sctp, lkml

On Thu, Sep 06, 2018 at 12:33:58PM -0700, Eric Dumazet wrote:
On Thu, Sep 6, 2018 at 12:21 PM Olof Johansson [off-list ref] wrote:
quoted
Today these are all global shared variables per protocol, and in
particular tcp_memory_allocated can get hot on a system with
large number of CPUs and a substantial number of connections.

Moving it over to a per-cpu variable makes it significantly cheaper,
and the added overhead when summing up the percpu copies is still smaller
than the cost of having a hot cacheline bouncing around.
I am curious. We never noticed contention on this variable, at least for TCP.
Yes these variables are heavily amortised so I'm surprised that
they would cause much contention.
Please share some numbers with us.
Indeed.

Thanks,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help