Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce per cpu access overhead

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Miller <davem@...>
Cc: <akpm@...>, <linux-arch@...>, <linux-kernel@...>, <mathieu.desnoyers@...>, <penberg@...>
Date: Thursday, November 1, 2007 - 6:15 pm

On Thu, 1 Nov 2007, David Miller wrote:


I think I have an idea how to do this. Its a bit x86_64 specific but here 
it goes.

We define a virtual area of NR_CPUS * 2M areas that are each mapped by a
PMD. That means we have a fixed virtual address for each cpus per cpu 
area. 

First cpu is at PER_CPU_START
Second cpu is at PER_CPU_START + 2M

So the per cpu area for cpu n is easily calculated using

PER_CPU_START + cpu << 19

without any lookups.

On bootup we allocate the 2M pages.

After boot is complete we allow the reduction of the size of the per cpu 
areas . Lets say we only need 128k per cpu. Then the remaining pages will
be returned to the page allocator.

We create some sysfs thingy were one can see the current reserves of per 
cpu storage. If one wants to reduce memory then one can write something to 
that to return the remainder of the memory.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce per cp..., Christoph Lameter, (Wed Oct 31, 8:02 pm)
[PATCH 1/7] One less parameter to __d_path, Jan Blunck, (Mon Oct 29, 8:41 am)
Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce pe..., Christoph Lameter, (Wed Oct 31, 8:26 pm)
Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce pe..., Christoph Lameter, (Wed Oct 31, 8:31 pm)
Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce pe..., Christoph Lameter, (Wed Oct 31, 8:53 pm)
Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce pe..., Christoph Lameter, (Wed Oct 31, 9:01 pm)
Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce pe..., Christoph Lameter, (Wed Oct 31, 9:12 pm)
Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce pe..., Christoph Lameter, (Thu Nov 1, 12:16 am)
Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce pe..., Christoph Lameter, (Thu Nov 1, 6:15 pm)
Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce pe..., Christoph Lameter, (Mon Nov 12, 3:14 pm)
Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce pe..., Christoph Lameter, (Mon Nov 12, 3:56 pm)
Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce pe..., Christoph Lameter, (Fri Nov 2, 10:35 am)
Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce pe..., Christoph Lameter, (Fri Nov 2, 11:29 am)
Re: [patch 0/7] [RFC] SLUB: Improve allocpercpu to reduce pe..., Christoph Lameter, (Wed Oct 31, 9:21 pm)