Re: ZFS committed to the FreeBSD base.



Peter Jeremy <peterjeremy@xxxxxxxxxxxxxxxx> writes:
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 Geode is a 486, and does not support it.

The C3 however is a 586. The C3 Ezra and C3 Samuel / Samuel 2 do not
have CX8. I'm not sure about the C3 Nehemiah, I don't have one
running at the moment.

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.

Our native atomic operations are all defined as either macros or
static inline functions in machine/atomic.h, so we can easily make
this choice at compile time based on a config option.

DES
--
Dag-Erling Smørgrav - des@xxxxxx
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: ZFS committed to the FreeBSD base.
    ... cmpxchg8b. ... The Geode is a 486, and does not support it. ... CPU: ...
    (freebsd-current)
  • Re: [GIT PULL] scheduler fixes
    ... can statically determine that cmpxchg8b is fine. ... CONFIG_x86_CMPXCHG64 (enabled by PAE support), ... If we avoid that asm-alternative thing when we can assume the instruction ...
    (Linux-Kernel)
  • Re: C asm to delphi asm
    ... > not have very good support for alignment. ... I believe "cmpxchg8b" ... > directive in the C version) and causes a fault if the data isn't ...
    (borland.public.delphi.language.basm)
  • Re: ZFS committed to the FreeBSD base.
    ... There's a feature bit that advertises the availability of ... cmpxchg8b (and maybe some related instructions). ...
    (freebsd-current)
  • Re: C asm to delphi asm
    ... > Note that cmpxchg8b is ... > already a quite specific instruction and not supported on a 486/ ... > regular Pentium. ... Want native support in Delphi for AMD64/EM64T? ...
    (borland.public.delphi.language.basm)