All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: Tony Vroon <tony@linx.net>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] percpu: fix unit_map[] verification in pcpu_setup_first_chunk()
Date: Tue, 29 Sep 2009 01:53:06 +0900	[thread overview]
Message-ID: <4AC0E9F2.1020408@kernel.org> (raw)
In-Reply-To: <alpine.DEB.1.10.0909281239100.16040@gentwo.org>

Christoph Lameter wrote:
> On Tue, 29 Sep 2009, Tejun Heo wrote:
> 
>> Christoph, can you please elaborate why nr_cpu_ids < NR_CPUS is
>> broken?
> 
> If its just an internal number that becomes larger than NR_CPUS then
> everything is fine.
> 
> But if a real cpu id (returned by smp_processor_id()) gets larger than
> NR_CPUS then we get into trouble with the parts of the kernel that index
> by cpu id.

It's a unit number.  Each cpu has exactly one unit number assigned to
it but there can be holes, so unit number can legally go over both
nr_cpu_ids and NR_CPUS, so yeap, it's just an internal number used
inside percpu allocator.

Tony, the original patch should be correct.  Please verify.

Thanks.

-- 
tejun

  reply	other threads:[~2009-09-28 16:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24  0:53 [PATCH] percpu: make pcpu_setup_first_chunk() failures more verbose Tejun Heo
2009-09-24 12:49 ` [PATCH] percpu: make allocation " Tejun Heo
2009-09-27 12:49 ` 2.6.31-09194-g0d9df25 Early boot exception Tony Vroon
2009-09-28 16:19   ` [PATCH] percpu: fix unit_map[] verification in pcpu_setup_first_chunk() Tejun Heo
2009-09-28 16:25     ` Christoph Lameter
2009-09-28 16:35       ` Tejun Heo
2009-09-28 16:38         ` Tejun Heo
2009-09-28 16:40           ` Christoph Lameter
2009-09-28 16:53             ` Tejun Heo [this message]
2009-09-28 22:07     ` Tony Vroon
2009-09-29  0:15       ` Tejun Heo

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=4AC0E9F2.1020408@kernel.org \
    --to=tj@kernel.org \
    --cc=cl@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    --cc=tony@linx.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.