[lkml]   [2005]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 2/2] mm: Reimplementation of alloc_percpu
On Tue, 2005-01-18 at 00:06 +0530, Ravikiran G Thirumalai wrote:
> Here's the alloc_percpu reimplementation changed to
> - Use qsort
> (GFP_HIGHZERO would have been ideal)
> - Changed currency size to sizeof (int) from sizeof (void *) for better
> utilization for small objects
> The allocator can be easily modified to use __per_cpu_offset[] table at a later
> stage by:
> 1. Allocating ALIGN(__per_cpu_end - __per_cpu_start, PAGE_SIZE) for the
> static percpu areas and populating __per_cpu_offset[] offset table
> 2. Making PCPU_BLKSIZE same as the static per cpu area size above
> 3. Serving dynamic percpu requests from modules etc from blocks by
> returning ret -= __per_cpu_offset[0] from a percpu block. This way
> modules need not have a limit on static percpu areas.

Unfortunately ia64 breaks (3). They have pinned TLB entries covering
64k, which they put the static per-cpu data into. This is used for
local_inc, etc, and David Mosberger loved that trick (this is why my
version allocated from that first reserved block for modules' static
per-cpu vars).

Hope that clarifies,
A bad analogy is like a leaky screwdriver -- Richard Braakman

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:09    [W:0.031 / U:8.600 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site