From: Yinghai Lu <yinghai@kernel.org>
To: Tejun Heo <tj@kernel.org>
Cc: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
penberg@kernel.org, tglx@linutronix.de, rientjes@google.com,
mingo@elte.hu, linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/numa] x86: Unify cpu/apicid <-> NUMA node mapping between 32 and 64bit
Date: Mon, 31 Jan 2011 11:55:22 -0800 [thread overview]
Message-ID: <AANLkTikfLF55g2MoicWvsOnStT98q2bj5M+LnwiyPhti@mail.gmail.com> (raw)
In-Reply-To: <20110131155330.GL7459@htj.dyndns.org>
On Mon, Jan 31, 2011 at 7:53 AM, Tejun Heo <tj@kernel.org> wrote:
> Hello, Yinghai.
>
> On Fri, Jan 28, 2011 at 12:33:00PM -0800, Yinghai Lu wrote:
>> > +#ifdef CONFIG_NUMA
>> > +extern int __cpuinit numa_cpu_node(int apicid);
>>
>> cpu or apicid?
>
> Should have been @cpu. Will send a patch to update it.
>
>> > +int __cpuinit numa_cpu_node(int cpu)
>> > +{
>> > + int apicid = early_per_cpu(x86_cpu_to_apicid, cpu);
>> > +
>> > + if (apicid != BAD_APICID)
>> > + return __apicid_to_node[apicid];
>> > + return NUMA_NO_NODE;
>> > +}
>>
>> it should be changed to cpu_to_node_via_apicid(), it could return
>> not onlined node, aka node without memory.
>>
>> So don't mess it up with cpu_to_node()
>
> Hmmm... are you saying that the name is too confusing with
> cpu_to_node() and should be renamed to cpu_to_node_via_apicid()? In
> that case, I agree but wish the name were something which represents
> what it does as _via_apicid postfix doesn't really tell much. Any
> better idea?
yes.
wonder if there is other good name better than cpu_to_node_via_apicid...
Yinghai
next prev parent reply other threads:[~2011-01-31 19:55 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-23 13:37 [PATCHSET] x86: unify x86_32 and 64 NUMA init paths, take#5 Tejun Heo
2011-01-23 13:37 ` [PATCH 01/16] x86: Kill unused static boot_cpu_logical_apicid in smpboot.c Tejun Heo
2011-01-24 19:50 ` Yinghai Lu
2011-01-28 14:37 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 02/16] x86: Drop x86_32 MAX_APICID Tejun Heo
2011-01-24 19:48 ` Yinghai Lu
2011-01-28 14:37 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 03/16] x86: Make default_send_IPI_mask_sequence/allbutself_logical() 32bit only Tejun Heo
2011-01-24 19:55 ` Yinghai Lu
2011-01-28 14:37 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 04/16] x86: Replace cpu_2_logical_apicid[] with early percpu variable Tejun Heo
2011-01-24 19:58 ` Yinghai Lu
2011-01-24 20:04 ` Tejun Heo
2011-01-28 14:38 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 05/16] x86: Always use x86_cpu_to_logical_apicid for cpu -> logical apic id Tejun Heo
2011-01-28 14:38 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 06/16] x86: Kill apic->cpu_to_logical_apicid() Tejun Heo
2011-01-28 14:39 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 07/16] x86: Add apic->x86_32_early_logical_apicid() Tejun Heo
2011-01-28 14:39 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 08/16] x86: Implement the default x86_32_early_logical_apicid() Tejun Heo
2011-01-28 14:39 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 09/16] x86: Implement x86_32_early_logical_apicid() for bigsmp_32 Tejun Heo
2011-01-28 14:40 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 10/16] x86: Implement x86_32_early_logical_apicid() for summit_32 Tejun Heo
2011-01-28 14:40 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 11/16] x86: Implement x86_32_early_logical_apicid() for numaq_32 Tejun Heo
2011-01-28 14:40 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 12/16] x86: Replace apic->apicid_to_node() with ->x86_32_numa_cpu_node() Tejun Heo
2011-01-28 14:41 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 13/16] x86: Unify cpu/apicid <-> NUMA node mapping between 32 and 64bit Tejun Heo
2011-01-28 14:41 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-28 20:33 ` Yinghai Lu
2011-01-31 15:53 ` Tejun Heo
2011-01-31 19:55 ` Yinghai Lu [this message]
2011-01-23 13:37 ` [PATCH 14/16] x86: Unify CPU -> " Tejun Heo
2011-01-28 14:42 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 15/16] x86: Unify node_to_cpumask_map handling " Tejun Heo
2011-01-28 14:42 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-23 13:37 ` [PATCH 16/16] x86: Unify NUMA initialization " Tejun Heo
2011-01-28 14:42 ` [tip:x86/numa] " tip-bot for Tejun Heo
2011-01-28 13:45 ` [PATCHSET] x86: unify x86_32 and 64 NUMA init paths, take#5 Tejun Heo
2011-01-28 15:29 ` Ingo Molnar
2011-01-28 16:22 ` [PATCH] x86: fix build failure on X86_UP_APIC Tejun Heo
2011-01-28 16:58 ` [tip:x86/numa] x86: Fix " tip-bot for 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=AANLkTikfLF55g2MoicWvsOnStT98q2bj5M+LnwiyPhti@mail.gmail.com \
--to=yinghai@kernel.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=tglx@linutronix.de \
--cc=tj@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;
as well as URLs for NNTP newsgroup(s).