[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230227152741.4a53634b@kernel.org>
Date: Mon, 27 Feb 2023 15:27:41 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: edumazet@...gle.com
Cc: Florian Westphal <fw@...len.de>, netdev@...r.kernel.org,
davem@...emloft.net, pabeni@...hat.com, shakeelb@...gle.com,
soheil@...gle.com
Subject: Re: [PATCH net] net: avoid indirect memory pressure calls
On Fri, 24 Feb 2023 19:46:06 +0100 Florian Westphal wrote:
> There is a noticeable tcp performance regression (loopback or cross-netns),
> seen with iperf3 -Z (sendfile mode) when generic retpolines are needed.
>
> With SK_RECLAIM_THRESHOLD checks gone number of calls to enter/leave
> memory pressure happen much more often. For TCP indirect calls are
> used.
>
> We can't remove the if-set-return short-circuit check in
> tcp_enter_memory_pressure because there are callers other than
> sk_enter_memory_pressure. Doing a check in the sk wrapper too
> reduces the indirect calls enough to recover some performance.
>
> Before,
> 0.00-60.00 sec 322 GBytes 46.1 Gbits/sec receiver
>
> After:
> 0.00-60.04 sec 359 GBytes 51.4 Gbits/sec receiver
>
> "iperf3 -c $peer -t 60 -Z -f g", connected via veth in another netns.
>
> Fixes: 4890b686f408 ("net: keep sk->sk_forward_alloc as small as possible")
> Signed-off-by: Florian Westphal <fw@...len.de>
Looks acceptable, Eric?
Powered by blists - more mailing lists