From: David Miller <davem@davemloft.net>
To: iconoclasmandheresy@gmail.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: Off-by-one bug on sun4u SMP
Date: Thu, 10 Jun 2010 17:37:16 -0700 (PDT) [thread overview]
Message-ID: <20100610.173716.35035195.davem@davemloft.net> (raw)
In-Reply-To: <AANLkTimw2Hzv1WIJXehqMo4450ftRJWwefQipDM9Zxb4@mail.gmail.com>
From: Ryan Davis <iconoclasmandheresy@gmail.com>
Date: Thu, 10 Jun 2010 11:05:09 -0700
> On at least some sun4u machines, the CPU numbering starts at one not 0.
> This causes an off-by-one bug as other parts of the code assume
> zero-based numbering.
>
> If you set max-cpus in the kernel config to the actual number of CPUs,
> the last CPU will be ignored and unused.
> This is because the CPU numbering starts at 1 but the code to check
> against max-cpus assumes a zero-based numbering.
>
> On my computer: Sun Ultra 60 2x450mhz Ultrasparc.
> Building with max-cpus of 2 ignores the second cpu because 2 (one
> based cpu number) >= 2 (zero based max cpus)
> Rebuilding with a larger max-cpus is a workaround but non optimal.
max-cpus means "one larger than the maximum PHYSICAL cpu number", not
the number of cpus. That's what this setting means, at least on
sparc64.
next prev parent reply other threads:[~2010-06-11 0:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-10 18:05 Ryan Davis
2010-06-11 0:37 ` David Miller [this message]
2010-06-11 4:01 ` Ryan Davis
2010-06-11 5:26 ` David Miller
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=20100610.173716.35035195.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=iconoclasmandheresy@gmail.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®