On 2007-Apr-11 17:49:11 -0400, David Schultz <das_at_freebsd.org> wrote: >As I recall, Solaris 10 targets PPro and later processors, whereas >FreeBSD supports everything back to a 486DX. Hence we can't >assume that cmpxchg8b is available. There's a feature bit (CPUID_CX8) that advertises the availability of cmpxchg8b (and maybe some related instructions). My pre-MMX 586 has this bit set so I presume anything later than 486 will support it. (I'm not sure about the low-end VIA, GEODE etc clones). > The last time I remember this >coming up, people argued that we had to do things slow way in the >default kernel for compatibility. I agree that GENERIC should run on lowest-common-denominator hardware (the definition of that is a subject for a different thread). GENERIC performance could be enhanced by using an indirect call for 8-byte atomic instructions and selecting between the cmpxchg8b and alternative implementation as part of the CPU startup (much like i586_bcopy). If CPU_486 is not defined, you code could inline the cmpxchg8b-based variant. -- Peter Jeremy
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:08 UTC