From: Bjorn Helgaas <bjorn_helgaas@hp.com>
To: William Lee Irwin III <wli@holomorphy.com>,
torvalds@transmeta.com, linux-kernel@vger.kernel.org,
Andreas Schwab <schwab@suse.de>
Subject: Re: [PATCH] Fix CPU bitmask truncation
Date: Fri, 20 Dec 2002 10:00:21 -0700 [thread overview]
Message-ID: <200212201000.21223.bjorn_helgaas@hp.com> (raw)
In-Reply-To: <20021220111523.GA7644@holomorphy.com>
On Friday 20 December 2002 4:15 am, William Lee Irwin III wrote:
> Actually, this looks like a non-issue from userspace on the IA64 boxen
> I can get to. akpm pointed out that this seemed to pass his testing,
> and on deeper inspection, IA64 userspace did not find this to be an issue.
>
> Bjorn, could you explain on what toolchains and/or architectures you had
> this issue? It sounds serious and/or real enough yet I can't actually
> make this happen myself.
This was an issue with gcc 2.96 on a 64-way IA64 box. I don't have
access to one at the moment, but as I remember, without the 2.4 changes:
- ((p)->cpus_runnable & (p)->cpus_allowed & (1 << cpu))
+ ((p)->cpus_runnable & (p)->cpus_allowed & (1UL << cpu))
nothing would get scheduled on CPUs 32-63. I guess those changes
aren't controversial, though.
The question of whether this was strictly necessary:
- cpus_runnable: -1, \
- cpus_allowed: -1, \
+ cpus_runnable: ~0UL, \
+ cpus_allowed: ~0UL, \
I don't specifically recall, and a quick test suggests that it really
doesn't matter. Since cpus_runnable and cpus_allowed are declared
unsigned long, I think ~0UL is a more direct expression of what is
desired, but maybe that's just a personal preference.
Bjorn
next prev parent reply other threads:[~2002-12-20 16:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-16 19:13 Bjorn Helgaas
2002-12-20 10:30 ` William Lee Irwin III
2002-12-20 11:15 ` William Lee Irwin III
2002-12-20 17:00 ` Bjorn Helgaas [this message]
2002-12-25 21:43 ` Alan Cox
2002-12-25 21:54 ` Linus Torvalds
2002-12-20 12:17 ` Andreas Schwab
2002-12-20 17:12 ` William Lee Irwin III
2002-12-20 18:23 ` Jeremy Fitzhardinge
2002-12-20 20:00 ` Andreas Schwab
2002-12-20 22:57 ` Anton Blanchard
2002-12-20 23:36 ` William Lee Irwin III
2002-12-20 23:42 ` Anton Blanchard
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=200212201000.21223.bjorn_helgaas@hp.com \
--to=bjorn_helgaas@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schwab@suse.de \
--cc=torvalds@transmeta.com \
--cc=wli@holomorphy.com \
/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®