diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2022-02-12 00:38:39 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-14 13:38:35 +0000 |
commit | e722db8de6e6932267457ace2657a19015f3db4a (patch) | |
tree | 46604408fd501b38af9bba9b363e5eebaa9cf1be /drivers/net/wwan/iosm/iosm_ipc_debugfs.c | |
parent | baebdf48c360080710f80699eea3affbb13d6c65 (diff) |
net: dev: Make rps_lock() disable interrupts.
Disabling interrupts and in the RPS case locking input_pkt_queue is
split into local_irq_disable() and optional spin_lock().
This breaks on PREEMPT_RT because the spinlock_t typed lock can not be
acquired with disabled interrupts.
The sections in which the lock is acquired is usually short in a sense that it
is not causing long und unbounded latiencies. One exception is the
skb_flow_limit() invocation which may invoke a BPF program (and may
require sleeping locks).
By moving local_irq_disable() + spin_lock() into rps_lock(), we can keep
interrupts disabled on !PREEMPT_RT and enabled on PREEMPT_RT kernels.
Without RPS on a PREEMPT_RT kernel, the needed synchronisation happens
as part of local_bh_disable() on the local CPU.
____napi_schedule() is only invoked if sd is from the local CPU. Replace
it with __napi_schedule_irqoff() which already disables interrupts on
PREEMPT_RT as needed. Move this call to rps_ipi_queued() and rename the
function to napi_schedule_rps as suggested by Jakub.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wwan/iosm/iosm_ipc_debugfs.c')
0 files changed, 0 insertions, 0 deletions