lkml.org 
[lkml]   [2008]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 05/41] cpu alloc: Percpu_counter conversion
On Fri, 30 May 2008, Rusty Russell wrote:

> On Friday 30 May 2008 13:56:25 Christoph Lameter wrote:
> > Use cpu_alloc instead of allocpercpu.
>
> These patches seem like useless churn.
>
> Plus, the new code is uglier than the old code :(

It drastically reduces the memory size f.e. 4 byte allocations require
SLAB f.e. to allocate a 32 byte chunk. This reduces memory requirements by
32/4 = 8 times.

Plus the per cpu counters allocated in order are likely placed in the same
cacheline (whereas the slab allocators avoid placing multiple objects in
the same cacheline). Reduces cache footprint.



\
 
 \ /
  Last update: 2008-05-30 19:57    [W:0.081 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site