From: Steven Rostedt <rostedt@goodmis.org>
To: Hillf Danton <dhillf@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] sched: correct testing need_resched in mutex_spin_on_owner()
Date: Tue, 07 Jun 2011 14:34:45 -0400 [thread overview]
Message-ID: <1307471685.9218.7.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <BANLkTim-3qPKAbKfshhkVuBJcVoZKXFXQQ@mail.gmail.com>
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
next prev parent reply other threads:[~2011-06-07 18:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 13:41 Hillf Danton
2011-06-07 13:47 ` Peter Zijlstra
2011-06-07 13:50 ` Peter Zijlstra
2011-06-07 13:59 ` Peter Zijlstra
2011-06-07 14:14 ` Hillf Danton
2011-06-07 14:10 ` Hillf Danton
2011-06-07 14:24 ` Peter Zijlstra
2011-06-07 14:36 ` Hillf Danton
2011-06-07 14:40 ` Peter Zijlstra
2011-06-07 14:47 ` Hillf Danton
2011-06-07 15:08 ` Steven Rostedt
2011-06-07 18:22 ` Hillf Danton
2011-06-07 18:34 ` Steven Rostedt [this message]
2011-06-07 15:20 ` Peter Zijlstra
2011-06-07 15:43 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1307471685.9218.7.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=dhillf@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome