mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Karl Mehltretter <kmehltretter@gmail.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	 Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	 Clark Williams <clrkwllms@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	 Stephen Hemminger <stephen@networkplumber.org>,
	Arend van Spriel <arend.vanspriel@broadcom.com>,
	 linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev,
	Breno Leitao <leitao@debian.org>
Subject: Re: [PATCH net v2 1/2] netpoll: use a raw lock for the deferred transmit queue
Date: Sun, 11 Oct 2026 21:10:23 +0200	[thread overview]
Message-ID: <asveuLDEf6a44bkD@gmail.com> (raw)
In-Reply-To: <20261009155225.6Uy7b0wd@linutronix.de>

On Fri, Oct 09, 2026 at 05:52:25PM +0100, Sebastian Andrzej Siewior wrote:
> 
> I would suggest to untangle that local-irq-disable assumption. Then we
> end up with the ::write_atomic callback on PREEMPT_RT which will raise
> warnings. But those will appear only on panic() and as the last console
> due to CON_NBCON_ATOMIC_UNSAFE so everything will go according to the
> plan.
> On !RT the whole __netpoll_send_skb() will be with disabled interrupts
> due to the console lock. On RT it won't and I don't know if anything
> down the call chain assumes that.
> 
> To illustrate my idea a bit
> 

I've got a candidate based on your sketch. It keeps interrupts enabled
for the RT printer thread and the deferred worker. IRQ-disabled direct
sends keep their existing path.

I have one question about retries. I've kept netpoll's retry budget of
about one tick, with BH disabled until deferring to the worker. The
IRQ-enabled RT sender cannot poll, and with the BH lock enabled the wait
holds off local completion work.

Would you instead defer immediately, or enable BH between attempts?

So far, the RT locking tests look good, including on hardware. The
generic change also removes the sleeping-lock reports with macb and ENA
on Ethernet.

Panic handling and record ordering remain open. The non-RT console and
IRQ-disabled atomic paths still need to be addressed.

Thanks,
Karl

  reply	other threads:[~2026-10-11 19:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28  6:42 [PATCH net 0/2] netpoll: fix PREEMPT_RT deferred transmit locking Karl Mehltretter
2026-09-28  6:42 ` [PATCH net 1/2] netpoll: use a raw lock for the deferred transmit queue Karl Mehltretter
2026-09-30 21:43   ` netdev-bot+sashiko
2026-09-28  6:42 ` [PATCH net 2/2] netpoll: avoid blocking on the transmit lock in queue_process Karl Mehltretter
2026-09-29  6:43   ` sashiko-bot
2026-09-30 18:38     ` Karl Mehltretter
2026-09-30 21:43   ` netdev-bot+sashiko
2026-09-30 19:21 ` [PATCH net v2 0/2] netpoll: fix PREEMPT_RT deferred transmit locking Karl Mehltretter
2026-09-30 19:21 ` [PATCH net v2 1/2] netpoll: use a raw lock for the deferred transmit queue Karl Mehltretter
2026-10-01  7:48   ` Sebastian Andrzej Siewior
2026-10-01 23:30     ` Karl Mehltretter
2026-10-09 15:52       ` Sebastian Andrzej Siewior
2026-10-11 19:10         ` Karl Mehltretter [this message]
2026-10-01 23:43   ` Jakub Kicinski
2026-10-02  0:17     ` Karl Mehltretter
2026-09-30 19:21 ` [PATCH net v2 2/2] netpoll: avoid blocking on the transmit lock in queue_process Karl Mehltretter

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=asveuLDEf6a44bkD@gmail.com \
    --to=kmehltretter@gmail.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=bigeasy@linutronix.de \
    --cc=clrkwllms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=stephen@networkplumber.org \
    /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

all inboxes | Powered by JetHome®