Thread (60 messages) 60 messages, 10 authors, 2024-01-20

Re: [PATCH net-next 15/24] net: Use nested-BH locking for XDP redirect.

From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-01-18 16:38:15
Also in: bpf, lkml

On Thu, 18 Jan 2024 09:27:54 +0100 Sebastian Andrzej Siewior wrote:
On 2024-01-17 18:04:47 [-0800], Jakub Kicinski wrote:
quoted
Oh, and I'm bringing it up here, because CONFIG_RT can throw
in "need_resched()" into the napi_rx_has_budget(), obviously.  
need_resched() does not work on PREEMPT_RT the way you think. This
context (the NAPI poll callback) is preemptible and (by default) runs at
SCHED_FIFO 50 (within a threaded IRQ) so a context switch can happen at
any time by a task with higher priority.
If threadA gets preempted and owns a lock that threadB, with higher
priority, wants then threadA will get back on CPU, inherit the priority
of the threadB and continue to run until it releases the lock.

If this is the per-CPU BH lock (which I want to remove) then it will
continue until all softirqs complete.
So there's no way for a process to know on RT that someone with higher
prio is waiting for it to release its locks? :(
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help