Re: [PATCH] rtmutex: ensure we wake up the top waiter

From: Thomas Gleixner
Date: Thu Feb 02 2023 - 03:07:43 EST


On Tue, Jan 31 2023 at 14:53, Wander Lairson Costa wrote:
> On Tue, Jan 31, 2023 at 02:46:19PM -0300, Wander Lairson Costa wrote:
>> > If you have traces which show the sequence of lock events leading to
>> > this problem, then you should be able to decode the scenario. If you
>> > fail to extract the information, then please provide the traces so we
>> > can stare at them.
>> >
>>
>> Here we go:
>>
>> Let L1 and L2 be two spinlocks.
>>
>> Let T1 be a task holding L1 and blocked on L2. T1, currently, is the top
>> waiter of L2.
>>
>> Let T2 be the task holding L2.
>>
>> Let T3 be a task trying to acquire L1.
>>
>> The following events will lead to a state in which the wait queue of L2
>> isn't empty but nobody holds it.

That explains it nicely. Care to resend with proper explanations in the
changelog?

Thanks,

tglx