lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1290791776.2855.262.camel@edumazet-laptop>
Date:	Fri, 26 Nov 2010 18:16:16 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Christoph Lameter <cl@...ux.com>, akpm@...ux-foundation.org,
	Pekka Enberg <penberg@...helsinki.fi>,
	linux-kernel@...r.kernel.org,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [thiscpuops upgrade 08/10] percpu: generic this_cpu_cmpxchg()
 and this_cpu_cmpxchg_double support

Le vendredi 26 novembre 2010 à 18:07 +0100, Tejun Heo a écrit :
> 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).
> 


x86_32 has it too

x86_64 uses cmpxchg16b, while x86_32 uses cmpxhg8b


And I guess it will be used in contexts we had to disable irqs, so it
will be faster on x86, and same cost on other arches.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ