lkml.org 
[lkml]   [2009]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] percpu: add optimized generic percpu accessors
    On Wed, 21 Jan 2009 03:21:23 -0800
    ebiederm@xmission.com (Eric W. Biederman) wrote:

    > Tejun Heo <tj@kernel.org> writes:
    >
    > > Ingo Molnar wrote:
    > >> The larger point still remains: the kernel dominantly uses static percpu
    > >> variables by a margin of 10 to 1, so we cannot just brush away the static
    > >> percpu variables and must concentrate on optimizing that side with
    > >> priority. It's nice if the dynamic percpu-alloc side improves as well, of
    > >> course.
    > >
    > > Well, the infrequent usage of dynamic percpu allocation is in some
    > > part due to the poor implementation, so it's sort of chicken and egg
    > > problem. I got into this percpu thing because I wanted a percpu
    > > reference count which can be dynamically allocated and it sucked.
    >
    > Counters are our other special case, and counters are interesting
    > because they are individually very small. I just looked and the vast
    > majority of the alloc_percpu users are counters.
    >
    > I just did a rough count in include/linux/snmp.h and I came
    > up with 171*2 counters. At 8 bytes per counter that is roughly
    > 2.7K. Or about two thirds of a 4K page.

    This is crap. only a small fraction of these SNMP counters are
    close enough to the hot path to deserve per-cpu treatment.


    \
     
     \ /
      Last update: 2009-01-21 13:49    [W:0.045 / U:0.256 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site