From: David Miller <davem@davemloft.net>
To: tj@kernel.org
Cc: sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 12/12]: sparc64: Use new dynamic per-cpu allocator.
Date: Thu, 09 Apr 2009 14:29:23 -0700 (PDT) [thread overview]
Message-ID: <20090409.142923.252620650.davem@davemloft.net> (raw)
In-Reply-To: <49DDE07C.8050101@kernel.org>
From: Tejun Heo <tj@kernel.org>
Date: Thu, 09 Apr 2009 04:48:12 -0700
>
> David Miller wrote:
>> void __init setup_per_cpu_areas(void)
>> {
>> - unsigned long size, i, nr_possible_cpus = num_possible_cpus();
>> - char *ptr;
>> + size_t dyn_size, static_size = __per_cpu_end - __per_cpu_start;
>> + static struct vm_struct vm;
>> + unsigned long delta, cpu;
>> + size_t pcpu_unit_size;
>> + size_t ptrs_size;
>> +
>> + pcpur_size = PFN_ALIGN(static_size + PERCPU_MODULE_RESERVE +
>> + PERCPU_DYNAMIC_RESERVE);
>> + dyn_size = pcpur_size - static_size - PERCPU_MODULE_RESERVE;
>
> Isn't it better to use embedding allocator for !NUMA cases (one less
> TLB entry usage for each CPU)?
Heck, the embedding case would probably be optimal for Niagara NUMA
systems too.
On Niagara systems all of the "possible" cpu numbers are linear and in
order. No holes, gaps, or other stuff like this. So just allocating
big TLB mapping chunks and chopping them up to the individual cpus is
the best scheme possible.
Indeed, these are the kinds of things I plan to experiment with.
next prev parent reply other threads:[~2009-04-09 21:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-09 5:37 David Miller
2009-04-09 6:44 ` Sam Ravnborg
2009-04-09 11:48 ` Tejun Heo
2009-04-09 21:29 ` David Miller [this message]
2009-04-09 21:45 ` 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=20090409.142923.252620650.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sparclinux@vger.kernel.org \
--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
Powered by JetHome