Messages in this thread | | | Date | Fri, 16 Jan 2009 06:53:35 +0900 | From | Tejun Heo <> | Subject | Re: [PATCH] percpu: add optimized generic percpu accessors |
| |
Ingo Molnar wrote: >>> and "this is preempt safe" semantics. >> Of course. But do any architectures actually _need_ that for a single >> read? > > not for a read i guess - but for the other ops like add/and/or/xor.
FWIW, it prevents cross-cpu cacheline contamination. :-)
>> Maybe. And if so, they can interpose their arch-specific >> implementation. But if the generic version is optimal for them, they >> wouldn't need to.. > > we cannot turn the generic ops into a single instruction so arch methods > are preferable no matter how thick or thin the generic version is. But i > agree that the optimization you suggest could be done.
I think the preemption protection is good to have there for, if nothing else, documentation.
Thanks.
-- tejun
| |