Re: [rfc 00/45] [RFC] CPU ops and a rework of per cpu data handlingon x86_64
From: Christoph Lameter
Date: Mon Nov 19 2007 - 21:13:16 EST
On Mon, 19 Nov 2007, David Miller wrote:
> Although we have a per-cpu area base in a fixed global register
> for addressing, the above isn't beneficial on sparc64 because
> the atomic is much slower than doing a:
>
> local_irq_disable();
> nonatomic_percpu_memory_op();
> local_irq_enable();
>
> local_irq_{disable,enable}() together is about 18 cycles.
> Just the cmpxchg() part of the atomic sequence is at least
> 32 cycles and requires a loop:
>
> while (1) {
> x = ld();
> if (cmpxchg(x, op(x)))
> break;
> }
>
> which bloats up the atomic version even more.
In that case the generic fallbacks can just provide what you already have.
-
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/