Announcement

Collapse
No announcement yet.

Linux Developers Are Once Again Trying To Enable Intel FSGSBASE For Better Performance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Linux Developers Are Once Again Trying To Enable Intel FSGSBASE For Better Performance

    Phoronix: Linux Developers Are Once Again Trying To Enable Intel FSGSBASE For Better Performance

    For years there have been patches floating around for helping the performance of context switching sensitive workloads going back to "Ivy Bridge" CPUs but without ever crossing the finish line to get this "FSGSBASE" support merged. But now in 2020 it's once again being attempted...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Good to know.. I was using these patches on the 5.4 kernel and older, but the v9 patch version from 10/04/19 doesn't compile with the 5.5 kernel and up.

    Comment


    • #3
      Originally posted by perpetually high View Post
      Good to know.. I was using these patches on the 5.4 kernel and older, but the v9 patch version from 10/04/19 doesn't compile with the 5.5 kernel and up.
      Were there actual performance improvements? and with what kind of workloads? thanks!

      Comment


      • #4
        Originally posted by kmare View Post
        Were there actual performance improvements? and with what kind of workloads? thanks!
        If only there were benchmarks. Oh wait, there were, as shown here: https://www.phoronix.com/scan.php?pa...fsgsbase&num=1

        Comment


        • #5
          Originally posted by kmare View Post

          Were there actual performance improvements? and with what kind of workloads? thanks!
          So I posted this comment last time Michael wrote about it, but in terms of anything noticeable, I can't say that I did.

          The pts/ctx-clock also showed the same number of context switches. At least Michael's preliminary benchmarks showed improvements in some areas so that's good.

          Comment


          • #6
            Apparently AMD zen and possibly bulldozer can benefit from this too ?
            grep fsgsbase /proc/cpuinfo is showing support on my ryzen.

            Comment


            • #7
              Originally posted by Soul_keeper View Post
              Apparently AMD zen and possibly bulldozer can benefit from this too ?
              grep fsgsbase /proc/cpuinfo is showing support on my ryzen.
              Yes, AMD has supported fsgsbase/swapgs etc instructions since Bulldozer. I haven't tested the performance impact myself.

              Comment


              • #8
                Where does Windows stand on this ? We get to know quite a number of details of what's going on in the kernel land courtesy Phoronix among other media. Since Windows is closed-source, I wonder what it is like in that land.
                Last edited by sarfarazahmad; 15 April 2020, 01:26 AM.

                Comment


                • #9
                  So, if I understand this correctly, the benchmarks should show a bigger performance improvement if the userland applications actually make use of the newly accessible FS and GS registers?

                  Comment


                  • #10
                    Originally posted by Lycanthropist View Post
                    So, if I understand this correctly, the benchmarks should show a bigger performance improvement if the userland applications actually make use of the newly accessible FS and GS registers?
                    If I remember correctly (from when I was coding x86 assembly many years ago), the FS and GS registers are used to offset memory access, by user space. However the value stored in them can not be directly accessed by user space, needing a kernel helper for that. At least one of them (I forget which), is normally used by glibc to point to the base address for thread local storage. I also seem to remember that wine might need the other one for some windows emulation trickery in 32-bit mode.

                    So this patch would simply dispense with the need of going through the kernel to read/write these registers.

                    Comment

                    Working...
                    X