lkml.org 
[lkml]   [2009]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2009-01-15 23:19    [W:0.180 / U:0.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site