LKML Archive on
help / color / mirror / Atom feed
From: Rusty Russell <>
To: "Eric W. Biederman" <>
Cc: Andrew Morton <>,
	Ingo Molnar <>, Andi Kleen <>,
	lkml - Kernel Mailing List <>
Subject: Re: [PATCH] Allow per-cpu variables to be page-aligned
Date: Wed, 21 Mar 2007 22:44:16 +1100	[thread overview]
Message-ID: <1174477457.11680.170.camel@localhost.localdomain> (raw)
In-Reply-To: <>

On Wed, 2007-03-21 at 03:21 -0600, Eric W. Biederman wrote:
> Do we really want to allow modules to be able to allocate page sized
> per cpu memory.

Hi Eric!

	They always could, of course, they just wouldn't get correct alignment.
I think the principle of least surprise says that if we support this, it
will also work in modules...

>   If my memory servers on how this code works we will wind
> up allocating 1 page of per cpu memory for every module that allocates a
> per cpu variable.  128 bytes sucks 4k is an order of magnitude worse.

Not quite.  We allocate a total amount of per-cpu memory at boot, then
anything left over gets used for per-cpu vars in modules.

Looking at the module per-cpu code again, the rounding up of the memory
used by the kernel seems unnecessary though.  I'll try ripping that

> On x86_64 we are only reserving 8K for modules...

Really?  I can't see that.

It did look like the x86-64 setup_per_cpu_areas should be moved into
common code though (it's numa-aware).  Maybe that breaks some platforms.

It means the x86 cpu_pda initialization would have to be done in
smp_prepare_boot_cpu tho...


  reply	other threads:[~2007-03-21 11:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-21  6:10 Rusty Russell
2007-03-21  6:30 ` [PATCH 0/4] i386 GDT cleanups Rusty Russell
2007-03-21  6:32   ` [PATCH 1/4] i386 GDT cleanups: Use per-cpu variables for GDT, PDA Rusty Russell
2007-03-21  6:35     ` [PATCH 2/4] i386 GDT cleanups: Use per-cpu GDT immediately upon boot Rusty Russell
2007-03-21  6:36       ` [PATCH 3/4] i386 GDT cleanups: clean up cpu_init() Rusty Russell
2007-03-21  6:53         ` [PATCH 4/4] i386 GDT cleanups: cleanup GDT Access Rusty Russell
2007-03-21  9:31       ` [PATCH 2/4] i386 GDT cleanups: Use per-cpu GDT immediately upon boot Eric W. Biederman
2007-03-21 11:55         ` Rusty Russell
2007-03-21 16:51           ` Eric W. Biederman
2007-03-21 23:58             ` Rusty Russell
2007-03-22  8:10               ` Sébastien Dugué
2007-03-22  9:24                 ` Rusty Russell
2007-03-22 15:59                   ` [PATCH] i386 GDT cleanups: Rename boot_gdt_table to boot_gdt Sébastien Dugué
2007-03-23  7:19                     ` Rusty Russell
2007-03-23 14:15                     ` Andi Kleen
2007-03-21  9:21 ` [PATCH] Allow per-cpu variables to be page-aligned Eric W. Biederman
2007-03-21 11:44   ` Rusty Russell [this message]
2007-03-21 16:49     ` Eric W. Biederman
2007-03-22  0:09       ` Rusty Russell

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1174477457.11680.170.camel@localhost.localdomain \ \ \ \ \ \ \
    --subject='Re: [PATCH] Allow per-cpu variables to be page-aligned' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).