From: Tejun Heo <tj@kernel.org>
To: Jan Beulich <JBeulich@novell.com>
Cc: mingo@elte.hu, andi@firstfloor.org, tglx@linutronix.de,
linux-kernel@vger.kernel.org, hpa@zytor.com
Subject: Re: [GIT PATCH] x86,percpu: fix pageattr handling with remap allocator
Date: Fri, 15 May 2009 17:11:16 +0900 [thread overview]
Message-ID: <4A0D23A4.30006@kernel.org> (raw)
In-Reply-To: <4A0D3A390200007800001081@vpn.id2.novell.com>
Hello,
Jan Beulich wrote:
>> The whole point of doing the remapping is giving each CPU its own PMD
>> mapping for perpcu area, so, yeah, that's the requirement. I don't
>> think the requirement is hidden tho.
>
> No, from looking at the code the requirement seems to only be that you
> get memory allocated from the correct node and mapped by a large page.
> There's nothing said why the final virtual address would need to be large
> page aligned. I.e., with a slight modification to take the NUMA requirement
> into account (I noticed I ignored that aspect after I had already sent that
> mail), the previous suggestion would still appear usable to me.
The requirement is having separate PMD mapping per NUMA node. What
has been implemented is the simplest form of that - one mapping per
CPU. Sure it can be further improved with more knowledge of the
topology. If you're interested, please go ahead.
>>> This would additionally address a potential problem on 32-bits -
>>> currently, for a 32-CPU system you consume half of the vmalloc space
>>> with PAE (on non-PAE you'd even exhaust it, but I think it's
>>> unreasonable to expect a system having 32 CPUs to not need PAE).
>> I recall having about the same conversation before. Looking up...
>>
>> -- QUOTE --
>> Actually, I've been looking at the numbers and I'm not sure if the
>> concern is valid. On x86_32, the practical number of maximum
>> processors would be around 16 so it will end up 32M, which isn't
>> nice and it would probably a good idea to introduce a parameter to
>> select which allocator to use but still it's far from consuming all
>> the VM area. On x86_64, the vmalloc area is obscenely large at 245,
>> ie 32 terabytes. Even with 4096 processors, single chunk is measly
>> 0.02%.
>
> Just to note - there must be a reason we (SuSE/Novell) build our default
> 32-bit kernel with support for 128 CPUs, which now is simply broken.
It's not broken, it will just fall back to 4k allocator. Also, please
take a look at the refreshed patchset, remap allocator is not used
anymore if it's gonna occupy more than 20% (random number from the top
of my head) of vmalloc area.
>> So, yeah, if there are 32bit 32-way NUMA machines out there, it would
>> be wise to skip remap allocator on such machines. Maybe we can
>> implement a heuristic - something like "if vm area consumption goes
>> over 25%, don't use remap".
>
> Possibly, as a secondary consideration on top of the suggested reduction
> of virtual address space consumption.
Yeah, further improvements welcome. No objection whatsoever there.
Thanks.
--
tejun
next prev parent reply other threads:[~2009-05-15 8:12 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-14 12:49 [GIT PATCH] x86,percpu: fix pageattr handling with remap allocator Tejun Heo
2009-05-14 12:49 ` [PATCH 1/4] x86: prepare setup_pcpu_remap() for pageattr fix Tejun Heo
2009-05-14 12:49 ` [PATCH 2/4] x86: simplify cpa_process_alias() Tejun Heo
2009-05-14 14:16 ` Jan Beulich
2009-05-14 15:37 ` Tejun Heo
2009-05-14 16:20 ` [PATCH UPDATED 2/4] x86: reorganize cpa_process_alias() Tejun Heo
2009-05-14 12:49 ` [PATCH 3/4] x86: fix pageattr handling for remap percpu allocator Tejun Heo
2009-05-14 16:21 ` [PATCH UPDATED " Tejun Heo
2009-05-14 12:49 ` [PATCH 4/4] x86: implement percpu_alloc kernel parameter Tejun Heo
2009-05-14 14:28 ` [GIT PATCH] x86,percpu: fix pageattr handling with remap allocator Jan Beulich
2009-05-14 15:55 ` Tejun Heo
2009-05-15 7:47 ` Jan Beulich
2009-05-15 8:11 ` Tejun Heo [this message]
2009-05-15 8:22 ` Jan Beulich
2009-05-15 8:27 ` Tejun Heo
2009-05-14 16:22 ` Tejun Heo
2009-05-15 4:00 ` Tejun Heo
2009-05-15 4:36 ` David Miller
2009-05-15 4:48 ` Tejun Heo
2009-05-16 1:17 ` Suresh Siddha
2009-05-16 15:16 ` Tejun Heo
2009-05-16 19:09 ` Suresh Siddha
2009-05-17 1:23 ` Tejun Heo
2009-05-18 19:20 ` Suresh Siddha
2009-05-18 19:41 ` H. Peter Anvin
2009-05-18 21:07 ` Suresh Siddha
2009-05-19 1:28 ` Tejun Heo
2009-05-20 23:01 ` Suresh Siddha
2009-05-21 0:08 ` Tejun Heo
2009-05-21 0:36 ` Suresh Siddha
2009-05-21 1:46 ` Tejun Heo
2009-05-21 1:48 ` Tejun Heo
2009-05-21 19:10 ` Suresh Siddha
2009-05-21 23:18 ` Tejun Heo
2009-05-22 0:55 ` Suresh Siddha
2009-05-19 9:44 ` Tejun Heo
2009-05-20 7:54 ` Ingo Molnar
2009-05-20 7:57 ` 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=4A0D23A4.30006@kernel.org \
--to=tj@kernel.org \
--cc=JBeulich@novell.com \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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