Announcement

Collapse
No announcement yet.

With AMD Zen 4, It's Surprisingly Not Worthwhile Disabling CPU Security Mitigations

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

  • #41
    Originally posted by creative View Post
    Ubuntu is one hell of an OS, I use Manjaro. Plenty of people talk about it the same like Ubuntu. What some people don't know is some Ubuntu lovers out there have been using Linux since its' inception.
    How much of what's good about Ubuntu really just due to Debian, upstream?

    My first revelation was using Raspbian on my first gen Pi. Before that, I hadn't realized how much of the core stuff in Ubuntu was simply inherited from Debian.

    Given that I use Kubuntu, I imagine it wouldn't be too hard for me to move upstream or to another Debian derivative.

    BTW, I also use Ubuntu 20.04 on my ODROID N2. However, what's odd about that is the kernel (and possibly other packages) are much older than on the desktop.

    Comment


    • #42
      Originally posted by Anux View Post
      Maybe you're looking at it from the wrong angle. If they build in hardware mitigations for unsave code these hardware instructions might run slower. All that is masked by just being faster overall.
      In one sense, possibly things like maybe flushing cache or branch predictor state on context-switch, that's probably what they're doing. However, the software mitigations often require extra CPU instructions to accomplish these things and optimizing those down to nothing would be pretty impressive.

      It does make me wonder how much of AMD's purported IPC gains would remain, if comparing against unmitigated Zen 3. No doubt some, but I'll bet it would eat into their margin. Same for Intel.
      Last edited by coder; 01 October 2022, 03:48 PM.

      Comment


      • #43
        Just a wild guess:
        AMD talked about using "AI" in their branch predictor in marketing materials mutliple times, since Zen 1.
        This could mean, they are using something like a decision tree internally which is "trained" on some common workloads. This decision tree is translated into a netlist and implemented in hardware via transistors. Decision trees can be implemented pretty efficiently in transistor logic and can be evaluated in parallel, so that would be a good choice.

        Maybe they "trained" the decision tree on common workloads like a windows kernel (which probably has some mitigations comparable to the linux kernel) running selenium..
        So branch prediction works pretty efficiently for chrome/v8 with mitigations enabled, but has a lot of misspredictions for mitigations disabled, as this was not part of the training set of "common workloads".

        Comment


        • #44
          Originally posted by Anux View Post
          Maybe you're looking at it from the wrong angle. If they build in hardware mitigations for unsave code these hardware instructions might run slower. All that is masked by just being faster overall.
          And someone above already mentioned branch prediction.
          Most of these mitigations involve extra steps on top of the regular instructions, so that's why I'm thinking this is weird. It's not like they're different instructions altogether.

          Comment


          • #45
            Originally posted by coder View Post
            How much of what's good about Ubuntu really just due to Debian, upstream?
            That's a good question. You are asking the wrong person though.

            Comment


            • #46
              I was surprised Zen 4 is still weak to Spectre, I'd have expected that to be fixed already.

              Comment


              • #47
                Originally posted by coder View Post
                How much of what's good about Ubuntu really just due to Debian, upstream?
                Today I don't know, but back when Ubuntu came in 2004 it was night and day between Ubuntu and Debian. Or rather what Ubuntu did to Debian back then was to introduce sane defaults and a configuration and mix of applications that made sense for the general public while you on Debian had to do all that manually (at least back then, I have no idea how a Debian desktop out of the box in 2022 is). They also introduced releases in sync with Gnome while with Debian you had to choose between 10 yo packages and bleeding edge.

                Comment


                • #48
                  Originally posted by atomsymbol View Post

                  Basically, the results mean that there is a mitigations=off performance bug in the Linux kernel.
                  Unless it's branch prediction that's causing that behaviour, in which case mitigations=off is the bug because it's become an explicit "trigger mispredictions" switch.

                  Them pipelines're pretty deep.

                  Comment


                  • #49
                    Originally posted by ssokolow View Post
                    Unless it's branch prediction that's causing that behaviour, in which case mitigations=off is the bug because it's become an explicit "trigger mispredictions" switch.
                    Unable to decrypt meaning.

                    Comment


                    • #50
                      Originally posted by geearf View Post
                      I was surprised Zen 4 is still weak to Spectre, I'd have expected that to be fixed already.
                      It *has* been fixed. That's why we're seeing this behavior.

                      Comment

                      Working...
                      X