Re: [PATCH] percpu_counter : add percpu_counter_add_fast()
From: Andrew Morton
Date: Thu Oct 21 2010 - 18:43:50 EST
On Sat, 16 Oct 2010 16:19:14 +0200
Eric Dumazet <eric.dumazet@xxxxxxxxx> 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.
--
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/