From: Jesper Dangaard Brouer <hawk@kernel.org>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>,
"Jakub Kicinski" <kuba@kernel.org>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, tom@herbertland.com,
Eric Dumazet <eric.dumazet@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>,
dsahern@kernel.org, makita.toshiaki@lab.ntt.co.jp,
kernel-team@cloudflare.com, phil@nwl.cc
Subject: Re: [PATCH net-next V4 2/2] veth: apply qdisc backpressure on full ptr_ring to reduce TX drops
Date: Thu, 17 Apr 2025 12:02:08 +0200 [thread overview]
Message-ID: <120f4e02-77cd-460f-809d-f0bf643884d1@kernel.org> (raw)
In-Reply-To: <87r01si4xr.fsf@toke.dk>
On 16/04/2025 15.58, Toke Høiland-Jørgensen wrote:
> Jakub Kicinski <kuba@kernel.org> writes:
>
>> On Tue, 15 Apr 2025 15:45:05 +0200 Jesper Dangaard Brouer wrote:
>>> In production, we're seeing TX drops on veth devices when the ptr_ring
>>> fills up. This can occur when NAPI mode is enabled, though it's
>>> relatively rare. However, with threaded NAPI - which we use in
>>> production - the drops become significantly more frequent.
>>
>> It splats:
>>
>> [ 5319.025772][ C1] dump_stack_lvl (lib/dump_stack.c:123)
>> [ 5319.025786][ C1] lockdep_rcu_suspicious (kernel/locking/lockdep.c:6866)
>> [ 5319.025797][ C1] veth_xdp_rcv (drivers/net/veth.c:907 (discriminator 9))
>> [ 5319.025850][ C1] veth_poll (drivers/net/veth.c:977)
>
> I believe the way to silence this one is to use:
>
> rcu_dereference_check(priv->peer, rcu_read_lock_bh_held());
>
> instead of just rcu_dereference()
>
Thanks for this suggestion.
Normally, this indicate I should add a rcu_read_lock() section around
for-loop in veth_xdp_rcv(), but this isn't necessary due to NAPI, right?
For background, this is because (1) NAPI is already running with RCU
read-lock held or is it because (2) BH is considered a RCU section?
--Jesper
next prev parent reply other threads:[~2025-04-17 10:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 13:44 [PATCH net-next V4 0/2] veth: qdisc backpressure and qdisc check refactor Jesper Dangaard Brouer
2025-04-15 13:44 ` [PATCH net-next V4 1/2] net: sched: generalize check for no-queue qdisc on TX queue Jesper Dangaard Brouer
2025-04-15 15:43 ` David Ahern
2025-04-15 16:30 ` Jesper Dangaard Brouer
2025-04-16 13:32 ` Toke Høiland-Jørgensen
2025-04-15 13:45 ` [PATCH net-next V4 2/2] veth: apply qdisc backpressure on full ptr_ring to reduce TX drops Jesper Dangaard Brouer
2025-04-16 12:44 ` Toshiaki Makita
2025-04-17 13:00 ` Jesper Dangaard Brouer
2025-04-16 13:38 ` Jakub Kicinski
2025-04-16 13:58 ` Toke Høiland-Jørgensen
2025-04-17 10:02 ` Jesper Dangaard Brouer [this message]
2025-04-16 13:56 ` Toke Høiland-Jørgensen
2025-04-17 9:32 ` Jesper Dangaard Brouer
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=120f4e02-77cd-460f-809d-f0bf643884d1@kernel.org \
--to=hawk@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=eric.dumazet@gmail.com \
--cc=kernel-team@cloudflare.com \
--cc=kuba@kernel.org \
--cc=makita.toshiaki@lab.ntt.co.jp \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=phil@nwl.cc \
--cc=toke@redhat.com \
--cc=tom@herbertland.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.