[lkml]   [2008]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] alloc_percpu() fails to allocate percpu data
    On Thu, 21 Feb 2008 19:00:03 +0100 Eric Dumazet <> wrote:

    > +#ifndef cache_line_size
    > +#define cache_line_size() L1_CACHE_BYTES
    > +#endif

    argh, you made me look.

    Really cache_line_size() should be implemented in include/linux/cache.h.
    Then we tromp the stupid private implementations in slob.c and slub.c.

    Then we wonder why x86 uses a custom cache_line_size(), but still uses
    L1_CACHE_BYTES for its L1_CACHE_ALIGN().

    Once we've answered that, we look at your

    + /*
    + * We should make sure each CPU gets private memory.
    + */
    + size = roundup(size, cache_line_size());

    and wonder whether it should have used L1_CACHE_ALIGN().

    I think I'd better stop looking.

     \ /
      Last update: 2008-02-23 09:27    [W:0.020 / U:4.576 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site