lkml.org 
[lkml]   [2010]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] percpu_counter : add percpu_counter_add_fast()
On Sat, 16 Oct 2010 16:19:14 +0200
Eric Dumazet <eric.dumazet@gmail.com> 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    [from the cache]
©2003-2011 Jasper Spaans