Thread (1 message) 1 message, 1 author, 2009-01-21

Re: [PATCH] percpu: add optimized generic percpu accessors

From: Eric W. Biederman <hidden>
Date: 2009-01-21 14:14:09
Also in: lkml

Possibly related (same subject, not in this thread)

Stephen Hemminger [off-list ref] writes:
This is crap. only a small fraction of these SNMP counters are
close enough to the hot path to deserve per-cpu treatment.
Interesting.  I was just reading af_inet.c:ipv4_mib_init_net()
to get a feel for what a large consumer of percpu counters looks
like.

I expect the patterns I saw will hold even if the base size is much
smaller.


Your statement reinforces my point that our allocations in a per cpu
area are small and our dynamic per cpu allocator is not really
optimized for small allocations.

In most places what we want are 1-5 counters, which is max 40 bytes.
And our minimum allocation is a full cache line (64-128 bytes) per
allocation.



I'm wondering if dynamic per cpu allocations should work more like
slab.  Have a set of percpu base pointers for an area, and return an
area + offset in some convenient form.

Ideally we would just have one area (allowing us to keep the base
pointer in a register), but I'm not convinced that doesn't fall down
in the face of dynamic allocation.

Eric
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help