Sunshine (she/her)@lemmy.ca to Linux@programming.devEnglish · 22 hours agoLinux Kernel Patches To Use AMD INVLPGB Instruction Show Huge Speed-Upwww.phoronix.comexternal-linkmessage-square5fedilinkarrow-up192arrow-down12cross-posted to: phoronix@lemmy.world
arrow-up190arrow-down1external-linkLinux Kernel Patches To Use AMD INVLPGB Instruction Show Huge Speed-Upwww.phoronix.comSunshine (she/her)@lemmy.ca to Linux@programming.devEnglish · 22 hours agomessage-square5fedilinkcross-posted to: phoronix@lemmy.world
minus-squareSteveTech@programming.devlinkfedilinkEnglisharrow-up5·11 hours agoI couldn’t find a hard answer to whether this supports EPYC only, or Ryzen too; so I put together this script to read the CPUID to detect for INVLPGB support according to the AMD64 Programmer’s Manual, and my 7800X3D does not support INVLPGB. (Let me know if I’ve made an error though!) Code #include <stdio.h> #include <stdint.h> int main() { uint32_t eax, ebx, ecx, edx; eax = 0x80000008; __asm__ __volatile__ ( "cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (eax) ); printf("EBX: 0x%x\n", ebx); if (ebx & (1 << 3)) { printf("CPU supports INVLPGB\n"); } else { printf("CPU does not support INVLPGB\n"); } return 0; }
I couldn’t find a hard answer to whether this supports EPYC only, or Ryzen too; so I put together this script to read the CPUID to detect for
INVLPGB
support according to the AMD64 Programmer’s Manual, and my 7800X3D does not supportINVLPGB
.(Let me know if I’ve made an error though!)
Code
#include <stdio.h> #include <stdint.h> int main() { uint32_t eax, ebx, ecx, edx; eax = 0x80000008; __asm__ __volatile__ ( "cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (eax) ); printf("EBX: 0x%x\n", ebx); if (ebx & (1 << 3)) { printf("CPU supports INVLPGB\n"); } else { printf("CPU does not support INVLPGB\n"); } return 0; }