From: Robert Love <rml@tech9.net>
To: kevin@koconnor.net
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: lock order in O(1) scheduler
Date: 10 Jan 2002 00:51:03 -0500 [thread overview]
Message-ID: <1010641864.3225.298.camel@phantasy> (raw)
In-Reply-To: <20020110001002.A13456@arizona.localdomain>
In-Reply-To: <20020110001002.A13456@arizona.localdomain>
On Thu, 2002-01-10 at 00:10, kevin@koconnor.net wrote:
> I was unable to figure out what the logic of the '(smp_processor_id() <
> p->cpu)' test is.. (Why should the CPU number of the process being awoken
> matter?) My best guess is that this is to enforce a locking invariant -
> but if so, isn't this test backwards? If p->cpu > current->cpu then
> p->cpu's runqueue is locked first followed by this_rq - locking greatest to
> least, where the rest of the code does least to greatest..
OK, I replied I was unsure of the validity, but looking this over, I now
suspect it is wrong.
The test should be (smp_processor_id() > p->cpu). Thus it would be safe
to lock this_rq since it is of a lower cpu id than p's rq.
Robert Love
prev parent reply other threads:[~2002-01-10 5:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-10 5:10 lock order in O(1) scheduler kevin
2002-01-10 5:26 ` Robert Love
2002-01-10 5:29 ` David S. Miller
2002-01-10 5:49 ` Robert Love
2002-01-10 5:38 ` Davide Libenzi
2002-01-10 6:29 ` kevin
2002-01-10 13:11 ` Ingo Molnar
2002-01-10 5:51 ` Robert Love [this message]
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=1010641864.3225.298.camel@phantasy \
--to=rml@tech9.net \
--cc=kevin@koconnor.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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