From: Edward Cree <ecree.xilinx@gmail.com>
To: mengkanglai <mengkanglai2@huawei.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jiri Pirko <jiri@resnulli.us>, Simon Horman <horms@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Lorenzo Bianconi <lorenzo@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Cc: "Fengtao (fengtao, Euler)" <fengtao40@huawei.com>,
"Yanan (Euler)" <yanan@huawei.com>
Subject: Re: cpu performance drop between 4.18 and 5.10 kernel?
Date: Wed, 22 May 2024 12:08:51 +0100 [thread overview]
Message-ID: <0826f183-5402-5529-c935-e933b817bd74@gmail.com> (raw)
In-Reply-To: <9fd382fb581e47a291ed31bfe091112c@huawei.com>
On 22/05/2024 08:44, mengkanglai wrote:
> Dear maintainers:
> I updated my VM kernel from 4.18 to 5.10, and found that the CPU SI usage was higher under the 5.10 kernel for the same udp service.
> I captured the flame graph and compared the two versions of kernels.
> Kernel 5.10 compared to 4.18 napi_complete_done function added gro_normal_list call (ommit 323ebb61e32b4 ("net: use listified RX for handling GRO_NORMAL
> skbs") Introduced), I removed gro_normal_list from napi_complete_done in 5.10 kernel, CPU SI usages was same as 4.18.
> I don't know much about GRO, so I'm not sure if it can be modified in this way, and the consequences of such a modification?
No, you can't just remove that call, else network RX packets will
be delayed for arbitrarily long times, and potentially leaked if
the netdev is ifdowned. The delay may also lead to other bugs
from code that assumes the RX processing happens within a single
NAPI cycle.
You could revert the commit, and if that improves performance for
you then more data would potentially be interesting.
You can also try altering sysctl net.core.gro_normal_batch;
setting it to 0 (or 1) should prevent any batching and in theory
give the same performance as reverting 323ebb61e32b4 — if it
doesn't then that's also a significant datum.
-ed
prev parent reply other threads:[~2024-05-22 11:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 7:44 cpu performance drop between 4.18 and 5.10 kernel? mengkanglai
2024-05-22 11:08 ` Edward Cree [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0826f183-5402-5529-c935-e933b817bd74@gmail.com \
--to=ecree.xilinx@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fengtao40@huawei.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=mengkanglai2@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yanan@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox