Re: [PATCH] cleanup and remove some extra spinlocks from rtmutex

Esben Nielsen
2006-08-15T10:05:28Z

On Tue, 15 Aug 2006, Oleg Nesterov wrote:

> On 08/15, Esben Nielsen wrote:
>>
>> On Tue, 15 Aug 2006, Oleg Nesterov wrote:
>>>
>>> task->pi_blocked_on != NULL, we hold task->pi_blocked_on->lock->wait_lock.
>>> Can it go away ?
>>
>> That is correct. But does it make the code more readable?
>
> Well, in my opinion - yes. But yes, it's only my personal feeling :)
>
>> When you read
>> the code you shouldn't need to go into that kind of complicated arguments
>> to see the correctness - unless the code can't be written otherwise.
>
> Sure, this needs a comment.

It is even better if you can read the code without a comment. Good code
doesn't need comments.

Esben

>
> Thanks again,
>
> Oleg.
>