Announcement

Collapse
No announcement yet.

Benchmarking The Linux 5.19 Kernel Built With "-O3 -march=native"

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

  • #21
    Originally posted by blae View Post
    It's what ends up in CFLAGS by default, stop it with the bad faith replies
    Your previous post implied that the C code written for the kernel is somehow influenced by the chosen optimisation level and would look different if they had chosen another level. No stupid question from me if you had just said -O2 is the standard optimisation level.
    Every level except -Ofast is totaly fine with the kernel.

    Comment


    • #22
      Honestly it seems like it would have made more sense to use a Zen3 chip than Alder Lake. GCC11 came out a year before the 12900k. I know Intel is better than AMD at getting updates in, but Zen3 was out before GCC11. Additionally the hybrid arch could cause some interference with the processes running on different cores. Also would be nice to compare -O2 --march=native to -O3 —march=native. Obviously everything can’t be tested though.
      edit: My post is more abut the io regression than beating the default.
      Last edited by jeisom; 13 July 2022, 10:40 AM.

      Comment


      • #23
        Originally posted by birdie View Post
        GCC heuristics in terms of generating code for "native" CPUs are not perfect..
        Even if they were perfect, in some cases there are tradeoffs on real systems that can't be predicted from code alone.

        Ideally, we'd see a build with
        Code:
        -O3 -march=native
        with Profile Guided Optimizations.

        Comment


        • #24
          Hoping for a retest with GCC 12 as suggested previously.

          Comment


          • #25
            really don't understand all the dumb "LOL gentoo" comments here, all I'm getting from this is that gcc 11 is terrible at optimizing for alder lake.

            Comment


            • #26
              As a Gentoo user I wanted to say ...
              The time expend on kernel is very little compared with userspace.
              This article didn't benchmark boot time where kernel is run 100% of the time (after firmware/BIOS and before init)
              In my personal experience I gain one or two seconds of boot time after enabling -march=native on the kernel and -O2.
              I need to redo my test again but at that time for me was very clear the gain using systemd-analyze.

              TLDR;
              boot time is better when --march=native on my tests.

              Comment


              • #27
                Hm... What about -O2 -march=native?

                Comment


                • #28
                  Just a question:
                  Doesn’t Michael publish the test suite so anyone can run the same tests?
                  I just wonder why so many people ask him to rerun the tests on every/all variations when they could do it themselves and post results.

                  Comment


                  • #29
                    Looks like in gcc 11 alder lake was tuned like tiger lake. This is what I see in gcc/config/i386/x86-tune.def. Comparing the 11 and the 12 versions of this file, there is a lot of difference. Especially the m_ALDERLAKE definition. I think that in gcc 11 it is treated as an out of order cpu, which does not hold true for anti-performance cores. If my assumptions are true, disabling the anti-performance cores or using gcc 12 will improve -march=native a lot (when compared to -march=generic with the same setup).
                    Last edited by marios; 13 July 2022, 12:03 PM.

                    Comment


                    • #30
                      Originally posted by Radtraveller View Post
                      Just a question:
                      Doesn’t Michael publish the test suite so anyone can run the same tests?
                      I just wonder why so many people ask him to rerun the tests on every/all variations when they could do it themselves and post results.
                      Yep it's all open source. People are lazy?
                      Michael Larabel
                      https://www.michaellarabel.com/

                      Comment

                      Working...
                      X