netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Dave Taht <dave.taht@gmail.com>
Cc: Samiullah Khawaja <skhawaja@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	almasrymina@google.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v3 0/4] Add support to do threaded napi busy poll
Date: Thu, 6 Feb 2025 19:50:35 +0000	[thread overview]
Message-ID: <20250206195035.12d64d8a@pumpkin> (raw)
In-Reply-To: <CAA93jw7tVyiz6Kj8B5zXMqYKxLZSnctGiwbH5hC+4_ZTWpg3fA@mail.gmail.com>

On Wed, 5 Feb 2025 21:36:31 -0800
Dave Taht <dave.taht@gmail.com> wrote:

> I have often wondered the effects of reducing napi poll weight from 64
> to 16 or less.

Doesn't that just move the loop from inside 'NAPI' to the softint scheduler.
Which could easily slow things down because of L1 I-cache pressure.

IIRC what happens next the the softint scheduler decides it has run too
many functions on the current process stack and decides to defer further
calls to a thread context.
Since the thread runs at a normal user priority hardware receive rings
then overflow (discarding packets) because the receive code has suddenly
gone from being very high priority (higher than any RT process) to really
quite low.

On a system doing real work all the ethernet receive code needs to run
at a reasonably high priority (eg a low/bad FIFO one) in order to avoid
packet loss for anything needing high rx packet rates.

	David

      parent reply	other threads:[~2025-02-06 19:50 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05  0:10 [PATCH net-next v3 0/4] Add support to do threaded napi busy poll Samiullah Khawaja
2025-02-05  0:10 ` [PATCH net-next v3 1/4] Add support to set napi threaded for individual napi Samiullah Khawaja
2025-02-05  2:50   ` Joe Damato
2025-02-05 23:10   ` David Laight
2025-02-06 18:40     ` Joe Damato
2025-02-05  0:10 ` [PATCH net-next v3 2/4] net: Create separate gro_flush helper function Samiullah Khawaja
2025-02-05  2:55   ` Joe Damato
2025-02-05  0:10 ` [PATCH net-next v3 3/4] Extend napi threaded polling to allow kthread based busy polling Samiullah Khawaja
2025-02-05  9:08   ` Paul Barker
2025-02-06  3:40   ` Samudrala, Sridhar
2025-02-05  0:10 ` [PATCH net-next v3 4/4] selftests: Add napi threaded busy poll test in `busy_poller` Samiullah Khawaja
2025-02-05  0:14 ` [PATCH net-next v3 0/4] Add support to do threaded napi busy poll Samiullah Khawaja
2025-02-05  1:32 ` Martin Karsten
2025-02-05 20:35   ` Samiullah Khawaja
2025-02-05 22:06     ` Joe Damato
2025-02-06  0:45       ` Samiullah Khawaja
2025-02-06 13:42         ` Joe Damato
2025-02-06 22:49           ` Samiullah Khawaja
2025-02-06 22:58             ` Joe Damato
2025-02-06  1:15       ` Martin Karsten
2025-02-06  4:43         ` Samiullah Khawaja
2025-02-06  4:50           ` Martin Karsten
2025-02-06  6:43             ` Samiullah Khawaja
2025-02-06 14:00               ` Joe Damato
2025-02-06 13:54           ` Joe Damato
2025-02-05  3:18 ` Joe Damato
2025-02-06 21:19   ` Joe Damato
2025-02-06 22:06     ` Samiullah Khawaja
2025-02-06 22:48       ` Joe Damato
2025-02-07  3:13         ` Samiullah Khawaja
2025-02-07  3:50           ` Joe Damato
2025-02-11  2:52       ` Martin Karsten
2025-02-06  5:36 ` Dave Taht
2025-02-06  5:49   ` Samiullah Khawaja
2025-02-06  5:57     ` Dave Taht
2025-02-06 14:01     ` Joe Damato
2025-02-06 19:50   ` David Laight [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=20250206195035.12d64d8a@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=almasrymina@google.com \
    --cc=dave.taht@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=skhawaja@google.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;
as well as URLs for NNTP newsgroup(s).