[lkml]   [2010]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] percpu_counter : add percpu_counter_add_fast()
    On Sat, 16 Oct 2010 16:19:14 +0200
    Eric Dumazet <> wrote:

    > The current way to change a percpu_counter is to call
    > percpu_counter_add(), which is a bit expensive.
    > (More than 40 instructions, possible false sharing, ...)

    This is incorrect. With my compiler it's 25 instructions except in the
    very rare case where a batch overflow occurs.

    And more than half of that is function call entry/exit overhead.

     \ /
      Last update: 2010-10-22 00:47    [W:0.019 / U:12.280 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site