Re: [PATCH] rtmutex: multiple candidate owners without unrelatedboosting

From: Lai Jiangshan
Date: Tue Dec 14 2010 - 23:24:44 EST


On 12/15/2010 01:00 AM, Steven Rostedt wrote:
> On Wed, 2010-12-15 at 00:44 +0800, Lai Jiangshan wrote:
>> On Tue, Dec 14, 2010 at 10:01 PM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>>
>>>
>>>>
>>>> This is the motivation of this patch.
>>>>
>>>> An approach(wrong): when C's priority become higher and B, we deprive
>>>> the pending ownership from B and give it to C and wakeup C.
>>>> But this approach may lead to livelock.
>>>
>>> I'm curious to how this can cause a livelock. I'm not doubting you, but
>>> I just woke up, and I'm only half way through my first cup of coffee.
>>>
>>
>> if B is deprived, B has go to sleep again. In rare condition,
>> B,C 's priority are changed frequent, the pending ownership is
>> given to B/ deprived from B and given to C/ deprived from C and given to B
>> ......
>>
>> No task can go forward, it is a kind of livelock.
>
> Hmm, to have C and B change prios frequently, they will need to either
> have someone in some for loop doing chrt on them (which is just bad), or
> have lots of RT tasks constantly blocking on tasks that they own, which
> is also bad. I find this far from a livelock, and any case that does
> this would have more issues than causing a livelock here.
>

Hi, Thomas,

Do you think this is a kind of livelock.
If it is not, I will send a much simpler patch.

Thanks,
Lai.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/