Re: [patch] add optimized generic percpu accessors

From: Ingo Molnar
Date: Thu Jan 15 2009 - 08:08:25 EST



* Tejun Heo <tj@xxxxxxxxxx> wrote:

> It is an optimization and a cleanup, and adds the following new
> generic percpu methods:
>
> percpu_read()
> percpu_write()
> percpu_add()
> percpu_sub()
> percpu_or()
> percpu_xor()

nit: add percpu_and() here ;-)

> tj: * fixed generic percpu_sub() definition as Roel Kluin pointed out
> * added percpu_and() for completeness's sake
> * made generic percpu ops atomic against preemption

okay - as long as the optimized versions stay single-instruction i'm a
happy camper.

Ingo
--
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/