Re: [PATCH net] netpoll: run NAPI poll in softirq context to avoid rq->lock self-deadlock
From: Jakub Kicinski
Date: Thu Jun 11 2026 - 22:11:48 EST
Please trim the pages of slop in the commit message and the comments.
On Wed, 10 Jun 2026 11:36:21 -0700 Vlad Poenaru wrote:
> @@ -194,11 +194,56 @@ void netpoll_poll_dev(struct net_device *dev)
> + local_bh_disable();
> + poll_napi(dev);
> + _local_bh_enable();
tglx, Sebastian, are you okay with using _local_bh_enable() to trick
softirq into not waking ksoftirqd? The problematic path is:
scheduler -> printk -> netconsole -> raise softirq -> scheduler (deadlock)
so the softirq may never get serviced.
In netcons we try to avoid touching the network driver if the Tx path
locks are already held. Ideally we'd do something similar with the
scheduler. Try to do bare minimum if we may be in the scheduler.
Failing that - don't poll the driver if we were called with irqs
already disabled.
Or maybe we only poll from console->write_thread ?