From: Pavel Machek <pavel@ucw.cz>
To: Ingo Molnar <mingo@elte.hu>
Cc: Erich Focht <efocht@ess.nec.de>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-ia64 <linux-ia64@linuxia64.org>
Subject: Re: O(1) scheduler "complex" macros
Date: Fri, 12 Jul 2002 14:39:15 +0200 [thread overview]
Message-ID: <20020712123915.GA108@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.44.0207111137460.7442-100000@localhost.localdomain>
Hi!
> > #define task_running(rq, p) \
> > ((rq)->curr == (p)) && !spin_is_locked(&(p)->switch_lock)
>
> one more implementational note: the above test is not 'sharp' in the sense
> that on SMP it's only correct (the test has no barriers) if the runqueue
> lock is held. This is true for all the critical task_running() uses in
> sched.c - and the cases that use it outside the runqueue lock are
> optimizations so they dont need an exact test.
I believe this is worth a *big fat* comment.
Pavel
--
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
next prev parent reply other threads:[~2002-07-12 14:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-09 17:27 Erich Focht
2002-07-10 18:31 ` Ingo Molnar
2002-07-10 19:30 ` Ingo Molnar
2002-07-10 9:05 ` Erich Focht
2002-07-11 9:31 ` Ingo Molnar
2002-07-10 12:34 ` Erich Focht
2002-07-11 9:39 ` Ingo Molnar
2002-07-12 12:39 ` Pavel Machek [this message]
2002-07-11 9:52 ` Ingo Molnar
2002-07-11 9:25 ` Erich Focht
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=20020712123915.GA108@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=efocht@ess.nec.de \
--cc=linux-ia64@linuxia64.org \
--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
all inboxes | Powered by JetHome®