From: ebiederm@xmission.com (Eric W. Biederman)
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <ak@suse.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: [PATCH 2/2] Allow percpu variables to be page-aligned
Date: Tue, 10 Apr 2007 16:22:12 -0600 [thread overview]
Message-ID: <m16483yinf.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <461BC4B8.40902@goop.org> (Jeremy Fitzhardinge's message of "Tue, 10 Apr 2007 10:09:12 -0700")
Jeremy Fitzhardinge <jeremy@goop.org> writes:
> Let's allow page-alignment in general for per-cpu data (wanted by Xen, and
> Ingo suggested KVM as well).
>
> Because larger alignments can use more room, we increase the max per-cpu
> memory to 64k rather than 32k: it's getting a little tight.
The second paragraph of the comment is dated. You are not changing the per-cpu
memory size at all now.
The code itself looks sane.
Although we should probably fail the module load if the requested alignment
is to great, but that is just picking nits, and is no worse than what we
do today.
Eric
> ===================================================================
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -346,10 +346,10 @@ static void *percpu_modalloc(unsigned lo
> unsigned int i;
> void *ptr;
>
> - if (align > SMP_CACHE_BYTES) {
> - printk(KERN_WARNING "%s: per-cpu alignment %li > %i\n",
> - name, align, SMP_CACHE_BYTES);
> - align = SMP_CACHE_BYTES;
> + if (align > PAGE_SIZE) {
> + printk(KERN_WARNING "%s: per-cpu alignment %li > %li\n",
> + name, align, PAGE_SIZE);
> + align = PAGE_SIZE;
> }
>
> ptr = __per_cpu_start;
next prev parent reply other threads:[~2007-04-10 22:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-10 17:09 [PATCH 2/2] Allow percpu variables to be page-aligned Jeremy Fitzhardinge
2007-04-10 22:22 ` Eric W. Biederman [this message]
2007-04-10 22:49 ` Jeremy Fitzhardinge
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=m16483yinf.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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