PLG Social
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Sunshine (she/her)@lemmy.ca to Linux@programming.devEnglish · 5 months ago

Linux Kernel Patches To Use AMD INVLPGB Instruction Show Huge Speed-Up

www.phoronix.com

external-link
message-square
9
link
fedilink
  • cross-posted to:
  • phoronix@lemmy.world
120
external-link

Linux Kernel Patches To Use AMD INVLPGB Instruction Show Huge Speed-Up

www.phoronix.com

Sunshine (she/her)@lemmy.ca to Linux@programming.devEnglish · 5 months ago
message-square
9
link
fedilink
  • cross-posted to:
  • phoronix@lemmy.world
alert-triangle
You must log in or register to comment.
  • SteveTech@programming.dev
    link
    fedilink
    English
    arrow-up
    16
    ·
    5 months ago

    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 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;
    }
    
  • 𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍@midwest.social
    link
    fedilink
    arrow-up
    12
    ·
    5 months ago

    I can’t keep up with the architecture family lines; is the Ryzen 7 5800 series on the Zen 3 line?

    • Davel23@fedia.io
      link
      fedilink
      arrow-up
      10
      ·
      5 months ago

      Assuming you’re talking about the 5800x, yes.

      • 𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍@midwest.social
        link
        fedilink
        arrow-up
        3
        ·
        5 months ago

        Sweet. They’re laptop CPUs, right? Last year, after more than a decade of owning only laptops, I bought two of those micro-PC boxes - mine were Trigkey, but I saw nearly identical ones under other brand names. 16 cores, expandable RAM and NVME… utterly blew my latest 2y/o laptop out of the water, especially after I put 64GB of RAM in one in an orgy of entering a new market of cheap components.

        And now this. I’m loving it.

        • Davel23@fedia.io
          link
          fedilink
          arrow-up
          1
          ·
          5 months ago

          No, the 5800x and x3d are desktop CPUs.

          • 𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍@midwest.social
            link
            fedilink
            arrow-up
            1
            ·
            5 months ago

            😥

            5800H

  • qaz@lemmy.world
    link
    fedilink
    English
    arrow-up
    9
    ·
    5 months ago

    Some info about the INVLPGB instruction

    • SteveTech@programming.dev
      link
      fedilink
      English
      arrow-up
      10
      ·
      5 months ago

      That’s INVLPG which has been there since the 486. The AMD64 Programmer’s Manual has some info on the differences between INVLPG, INVLPGA, and INVLPGB though.

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    5 months ago

    Huge speed-ups for the will-it-scale tlb_flush2_threads test - presumably not very representative!

    I wonder how much effect it has on real world workloads.

Linux@programming.dev

linux@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linux@programming.dev

A community for everything relating to the GNU/Linux operating system

Also check out:

  • !linux_memes@programming.dev
  • !linuxphones@lemmy.ca

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.86K users / day
  • 1.86K users / week
  • 2.75K users / month
  • 6.6K users / 6 months
  • 1 local subscriber
  • 7.35K subscribers
  • 1.52K Posts
  • 10.1K Comments
  • Modlog
  • mods:
  • Ategon@programming.dev
  • adr1an@programming.dev
  • dwraf_of_ignorance@programming.dev
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org