Bruce Evans wrote: > Not for cmpxchg8b, at least. It is a remarkably slow instruction. On > AthlonXP's it has an execution latency of 39 cycles. cmpxchg only has an > cmpxchg only has an execution latency of 6 cycles (both without a lock > prefix). I don't know how to avoid using cmpxchg8b short of using a > mutex lock/unlock pair and slightly different semantics, or a generation > count and very different semantics, but without lock prefixes the > mutex pair would be much faster than the cmpxchg8b. Using cmpxchg8b with a lock prefix wouldn't be a good idea anyway. If I remember correctly, the lock cmpxchg8b combination was the cause of the infamous "F00F" bug of old Pentium processors. It causes them to freeze. (FreeBSD has a hack to work around the problem, as you certainly know ... I don't know exactly how it works.) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd It's trivial to make fun of Microsoft products, but it takes a real man to make them work, and a God to make them do anything useful.Received on Fri Apr 13 2007 - 12:53:04 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:08 UTC