lkml.org 
[lkml]   [2007]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/7] allocpercpu: Make it a true per cpu allocator by allocating from a per cpu array
On Thu, 1 Nov 2007, Eric Dumazet wrote:

> Christoph Lameter a écrit :
> > +
> > +enum unit_type { FREE, END, USED };
> > +
> > +static u8 cpu_alloc_map[UNITS_PER_CPU] = { 1, };
>
> You mean END here instead of 1 :)

Sigh. A leftover. This can be removed.

> > +/*
> > + * Allocate an object of a certain size
> > + *
> > + * Returns a per cpu pointer that must not be directly used.
> > + */
> > +static void *cpu_alloc(unsigned long size)
> > +{
>
> We might need to give an alignment constraint here. Some per_cpu users would
> like to get a 64 bytes zone, siting in one cache line and not two :)

Well not sure about that. Alignment is mostly useful on SMP with cacheline
contention. This is a per cpu area that should not be contended.
\
 
 \ /
  Last update: 2007-11-01 14:01    [W:0.051 / U:1.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site