From: Denys Vlasenko <dvlasenk@redhat.com>
To: Jiang Liu <jiang.liu@linux.intel.com>, Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Len Brown <len.brown@intel.com>, X86 ML <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: x86_64: MAX_LOCAL_APIC way too big?
Date: Fri, 25 Sep 2015 21:44:41 +0200 [thread overview]
Message-ID: <5605A429.3080308@redhat.com> (raw)
In-Reply-To: <56057CCC.4010409@linux.intel.com>
On 09/25/2015 06:56 PM, Jiang Liu wrote:
> On 2015/9/26 0:16, Denys Vlasenko wrote:
>> 32 thousand APICs? That's a lot. Especially
>> considering that event with CONFIG_MAXSMP=y,
>> NR_CPUS is "only" 8096.
>>
>> After a quick glance through code, it looks like
>> such a big value causes several data arrays to be
>> quite oversized:
>>
>> phys_cpu_present_map is 4 kbytes (one bit per apicid)
>> __apicid_to_node is 64 kbytes
>> apic_version is 128 kbytes (!!!)
>>
...
>> Maybe we can reduce MAX_LOCAL_APIC?
>> Why it has to be this big in the first place?
>>
>> IIRC: APIC id at first was just a 8-bit quantity,
>> then x2apic mode it was extended to 32 bits.
>>
>> On "usual" systems, apic ids simply go from zero
>> to maximum logical CPU number, mirroring CPU ids.
> Hi Denys,
> The above assumption is risky with modern
> x86 platforms. APIC ids are assigned by firmware,
> and may be discrete.
I guess it means a new CONFIG option will be needed then,
for such machines. I'll send an RFC patch now.
next prev parent reply other threads:[~2015-09-25 19:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 16:16 x86_64: MAX_LOCAL_APIC way too big? Denys Vlasenko
2015-09-25 16:56 ` Jiang Liu
2015-09-25 19:44 ` Denys Vlasenko [this message]
2015-09-26 6:08 ` Ingo Molnar
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=5605A429.3080308@redhat.com \
--to=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=tglx@linutronix.de \
--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