From: Thomas Gleixner <tglx@linutronix.de>
To: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Daniel J Blueman <daniel@numascale.com>,
Denys Vlasenko <dvlasenk@redhat.com>,
Ingo Molnar <mingo@kernel.org>, Len Brown <len.brown@intel.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] x86/apic: Use smaller array for __apicid_to_node[] mapping
Date: Tue, 13 Oct 2015 14:55:58 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.11.1510131442180.25029@nanos> (raw)
In-Reply-To: <561CCF92.1030909@linux.intel.com>
On Tue, 13 Oct 2015, Jiang Liu wrote:
> On 2015/10/12 18:25, Thomas Gleixner wrote:
> > On Mon, 12 Oct 2015, Daniel J Blueman wrote:
> >> Another approach which may be suitable without changing SRAT parsing to be
> >> after the memory allocator is up, is to exploit the associativity of the
> >> bottom APIC ID bits.
> >
> > What's the problem with moving (SRAT/ACPI/whatever) APIC parsing after
> > the memory allocator is up and available?
> Hi Thomas,
> The work flow is as below at boot:
> 1) figure out memory NUMA topology info by walking ACPI table or probing
> AMD northbirdge.
> 2) initialize memory allocation based on memory NUMA topology.
>
> And to make code simple, it also scan CPU NUMA topology in step 1, so
> we could avoid walking ACPI tables twice. On the other hand, there are
> several subsystems having code pattern as follow before booting APs.
> up:
> for_each_possible_cpu(cpu)
> alloc_page_node(size, cpu_to_node(cpu))
> So it's a little hard to find a suitable hook point to delay CPU NUMA
> topology scanning after memory allocator is ready.
Not really. The memory allocator is available very early and long
before smp_prepare_cpus(). So we should try hard to move it after that
point, even if that means that we need to walk the tables twice.
Alternatively, use a bootmem allocation and convert it to a radix tree
when the allocator is up.
Thanks,
tglx
prev parent reply other threads:[~2015-10-13 12:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-02 19:12 [PATCH 1/3] x86/apic: Rename MAX_LOCAL_APIC to MAX_LOCAL_APICID Denys Vlasenko
2015-10-02 19:12 ` [PATCH 2/3] x86/apic: Make apic_version[] smaller Denys Vlasenko
2015-10-02 19:12 ` [PATCH 3/3] x86/apic: Use smaller array for __apicid_to_node[] mapping Denys Vlasenko
2015-10-03 7:44 ` Ingo Molnar
2015-10-03 20:26 ` Denys Vlasenko
2015-10-05 4:32 ` [PATCH v2] " Daniel J Blueman
2015-10-09 14:15 ` Thomas Gleixner
2015-10-09 15:16 ` Jiang Liu
2015-10-09 20:40 ` Thomas Gleixner
2015-10-09 15:35 ` [PATCH 3/3] " Jiang Liu
2015-10-12 10:21 ` Daniel J Blueman
2015-10-12 10:25 ` Thomas Gleixner
2015-10-13 9:32 ` Jiang Liu
2015-10-13 12:55 ` Thomas Gleixner [this message]
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=alpine.DEB.2.11.1510131442180.25029@nanos \
--to=tglx@linutronix.de \
--cc=daniel@numascale.com \
--cc=dvlasenk@redhat.com \
--cc=jiang.liu@linux.intel.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=x86@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®