lkml.org 
[lkml]   [2011]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched: correct testing need_resched in mutex_spin_on_owner()
From
Date
On Wed, 2011-06-08 at 02:22 +0800, Hillf Danton wrote:

> After hours chewing __mutex_lock_common() and mutex_spin_on_owner(),
> and what you and Peter said, the owner is on different CPU from the waiter,
> and the patched need_resched is simply meaning the waiter is no longer
> willing to wait for whatever reasons.
>
> It is really unlucky tonight:(

Please don't get discouraged.

We just want you to spend a bit more time looking at the code. Do what I
do when something looks wrong. Try to figure out what the author was
doing and why it may actually be correct. You may find out that the code
is indeed correct.

When I see code that looks wrong, I first think my assumptions are
incorrect, and I try to prove myself wrong. Only when I fail to do that,
do I send a patch or bring it up to the author. And then, I do it in
such a way that the author of the code may still have the ability to
prove me wrong. And several times, an author will tell me something that
I overlooked, and the original code stays as is.

Don't take it personally, this is just a learning phase. ;)

-- Steve




\
 
 \ /
  Last update: 2011-06-07 20:37    [W:0.186 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site