Re: [RT BUG] Stall caused by eventpoll, rwlocks and CFS bandwidth controller

Jan Kiszka
2025-04-15T05:35:54Z

On 14.04.25 17:05, Sebastian Andrzej Siewior wrote:
> On 2025-04-14 20:20:04 [+0530], K Prateek Nayak wrote:
>> Note: I could not reproduce the splat with !PREEMPT_RT kernel
>> (CONFIG_PREEMPT=y) or with small loops counts that don't exhaust the
>> cfs bandwidth.
>
> Not sure what this has to do with anything.
> On !RT the read_lock() in the timer can be acquired even with a pending
> writer. The writer keeps spinning until the main thread is gone. There
> should be no RCU boosting but the RCU still is there, too.
>
> On RT the read_lock() in the timer block, the write blocks, too. So
> every blocker on the lock is scheduled out until the reader is gone. On
> top of that, the reader gets RCU boosted with FIFO-1 by default to get
> out.

There is no boosting of the active readers on RT as there is no
information recorded about who is currently holding a read lock. This is
the whole point why rwlocks are hairy with RT, I thought.

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center