lkml.org 
[lkml]   [2010]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [thiscpuops upgrade 08/10] percpu: generic this_cpu_cmpxchg() and this_cpu_cmpxchg_double support
On 11/26/2010 06:01 PM, Eric Dumazet wrote:
>> What I'm afraid of is generic code switching to use it in very hot
>> paths when a lot of archs can't actually do it leading to performance
>> regressions. Is this something which is available on most archs?
>>
>
> I would say cmpxchg() has the same problem, some arches dont have a
> native instruction, yet we use it in some paths.

Yeah, well, there's difference between some not having it and only
x86_64 having it. cmpxchg was already rather well received when it
was added even though it wasn't available on all archs. I'm not
against it but think we should use some caution here and think about
the impact of unoptimized cases which can be pretty common (preemption
toggling isn't too expensive but irq toggling can be quite).

Thanks.

--
tejun


\
 
 \ /
  Last update: 2010-11-26 18:11    [W:0.078 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site