Re: [patch 3/4] net: Percpufy frequently used variables -- proto.sockets_allocated



Andrew Morton <akpm@xxxxxxxx> wrote:
>
> Oh, and because vm_acct_memory() is counting a singleton object, it can use
> DEFINE_PER_CPU rather than alloc_percpu(), so it saves on a bit of kmalloc
> overhead.

Actually, I don't think that's true. we're allocating a sizeof(long) with
kmalloc_node() so there shouldn't be memory wastage.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [REVIEW] unit number allocation API
    ... >(for instance DEVFS). ... >For these applications the overhead of rmancan be totally ... >This is a small API I just wrote, targeted specifically for allocating ...
    (freebsd-arch)
  • Re: MEX inline
    ... The overhead is usually substantial because of allocating ... memory, e.g.: ... if you have the source code. ...
    (comp.soft-sys.matlab)