From: Eric Dumazet Subject: Re: [PATCH] net/sock: move memory_allocated over to percpu_counter variables Date: Thu, 6 Sep 2018 12:33:58 -0700 Message-ID: References: <20180906192034.8467-1-olof@lixom.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: David Miller , Neil Horman , Marcelo Ricardo Leitner , Vladislav Yasevich , Herbert Xu , Alexey Kuznetsov , Hideaki YOSHIFUJI , linux-crypto@vger.kernel.org, LKML , linux-sctp@vger.kernel.org, netdev , linux-decnet-user@lists.sourceforge.net, kernel-team To: Olof Johansson Return-path: In-Reply-To: <20180906192034.8467-1-olof@lixom.net> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org On Thu, Sep 6, 2018 at 12:21 PM Olof Johansson wrote: > > 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. Please share some numbers with us.