Announcement

Collapse
No announcement yet.

GCC 10 Enters Its Fourth Stage Of Development, 20 Bugs Of Highest Priority

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

  • GCC 10 Enters Its Fourth Stage Of Development, 20 Bugs Of Highest Priority

    Phoronix: GCC 10 Enters Its Fourth Stage Of Development, 20 Bugs Of Highest Priority

    Following the long-awaited GCC transition from SVN to Git that took place this weekend, the GNU Compiler Collection is kicking off this week by transitioning to "stage four" development on the GCC 10 compiler...

    http://www.phoronix.com/scan.php?pag...-Four-Compiler

  • #2
    Experimenting a bit with it, a Linux Kernel would not boot with a GCC 10 build from the weekend.

    Comment


    • #3
      Originally posted by ms178 View Post
      Experimenting a bit with it, a Linux Kernel would not boot with a GCC 10 build from the weekend.
      Did you debug it? What kind of error happened? Are you able to do some kind of regression testing?

      I really hope this will make GCC development faster and better.

      Comment


      • #4
        Originally posted by timofonic View Post

        Did you debug it? What kind of error happened? Are you able to do some kind of regression testing?

        I really hope this will make GCC development faster and better.
        Sorry, debugging GCC is not exectly my area of expertise. I just experimented with several GCC builds, Kernel settings, compiler flags and even building the Kernel with Clang 9.0.1. And by the way, I got a nice increase in performance when going from the standard openSUSE Tumbleweed Kernel 5.4.7 to my heavily customized 5.4.11 rc-1 build (from 27 FPS to 36 FPS in the Company of Heroes 2 benchmark with Proton and ACO, with GCC 9.2.1 and Clang performing similar). The GCC 10 build was from January 11th from Martin Liska's repo. I am regularly testing it and it didn't boot with GCC10 for some months now. The build process runs fine though, it just won't boot afterwards.

        Comment


        • #5
          Originally posted by ms178 View Post
          by the way, I got a nice increase in performance when going from the standard openSUSE Tumbleweed Kernel 5.4.7 to my heavily customized 5.4.11 rc-1 build (from 27 FPS to 36 FPS in the Company of Heroes 2 benchmark with Proton and ACO, with GCC 9.2.1 and Clang performing similar).
          What did you tweak?

          Comment


          • #6
            Originally posted by xorbe View Post

            What did you tweak?
            Tweaking the kernel settings for low-latency desktop use and disabling lots of unneeded stuff for my setup, patching in the BMQ scheduler, aggressive compiler settings beyond -O3 -march=native plus GRAPHITE optimizations (or using POLLY with LLVM/Clang), that sort of thing. It is a bit too much to list it all in more detail.

            Comment


            • #7
              Originally posted by ms178 View Post

              Tweaking the kernel settings for low-latency desktop use and disabling lots of unneeded stuff for my setup, patching in the BMQ scheduler, aggressive compiler settings beyond -O3 -march=native plus GRAPHITE optimizations (or using POLLY with LLVM/Clang), that sort of thing. It is a bit too much to list it all in more detail.
              Can you share your patches, diffs, config files and such? Or better yet, a repo in GitLab or GitHub? Thanks in advance.

              Comment


              • #8
                Originally posted by timofonic View Post

                Can you share your patches, diffs, config files and such? Or better yet, a repo in GitLab or GitHub? Thanks in advance.
                There is certainly room for more improvements, but here are the basic steps I do:

                1) You can try to experiment with BMQ (http://cchalpha.blogspot.com/2019/12...1-release.html) and https://github.com/graysky2/kernel_gcc_patch, but I would consider both to be optional, I also got missing symbol errors with BMQ on 5.4.11 but that could have been related to the GCC10 toolchain, I couldn't pinpoint it exactly.

                2) Kernel settings with probably the most impact: 1000 Hz tick rate (default: 250 Hz), performance governor (default: ondemand), preemptible kernel (low-latency) (default: voluuntary kernel preemption); I also disable some security related features (NSA / APPARMOR / TOMOYO) and configure many different other things, but mainly for the purpose to optimize the size of the kernel, you might have other priorities here and it also comes down how flexible you want to be with your kernel. I optimize for the hardware I run on.

                3) I usually modifiy the top level makefile and x86/makefile but also the following line should do the trick and you'll get an installable rpm-pkg in the end (if you are on deb-based distribution you should use deb-pkg target instead): make KCFLAGS="-O3 -march=native -mtune=native -feliminate-unused-debug-types -fno-semantic-interposition -falign-functions=32 -floop-nest-optimize -fgraphite-identity -fipa-pta -flive-range-shrinkage -fno-math-errno -fno-trapping-math -mtls-dialect=gnu2 -std=gnu89" KCPPFLAGS="-O3 -march=native -mtune=native -falign-functions=32 -feliminate-unused-debug-types -fno-semantic-interposition -ftree-loop-distribution -floop-nest-optimize -fgraphite-identity" KLDFLAGS="-O2 -mtune=native -march=native -Wl,--as-needed -fopenmp" rpm-pkg

                [The build targets are what makes it very convenient process, there are different more involved methods to build a kernel, e.g. Clear Linux has a package builder where you would need to tweak some files to get it to compile with your custom compiler flags.]

                I usually use -std=gnu17 instead, but this is not officially supported yet and this only works if I disable certain problematic drivers (hence I don't recommend this option).

                Comment


                • #9
                  By the way, if someone could point to a how-to to get LTO working with the kernel would be appreciated. I tried Andi Kleen's patches before but couldn't make it work... ... also there might be better tweaks I haven't talked about here, feel free to share them.

                  Comment


                  • #10
                    Originally posted by ms178 View Post
                    And by the way, I got a nice increase in performance when going from the standard openSUSE Tumbleweed Kernel 5.4.7 to my heavily customized 5.4.11 rc-1 build (from 27 FPS to 36 FPS in the Company of Heroes 2 benchmark with Proton and ACO, with GCC 9.2.1 and Clang performing similar).
                    at first i read it as you are claiming compiler has anything to do with this fps increase

                    Comment

                    Working...
                    X