Announcement

Collapse
No announcement yet.

Profile Guided Optimizations (PGO) Likely Coming To Linux 5.14 For Clang

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

  • #11
    Originally posted by coder View Post
    They've had a beta version of 64-bit native Raspberry Pi OS, for a couple of years now. You need to know where to find it, but it seems pretty stable. I have no idea when they're planning to mainstream it. Runs on the Pi v3 and newer.
    Yes that's true. My point was, it took them quite a while to adopt these new technologies. Rpi 2 had ARMv7 in 2015 while Rpi OS appeared in 2020. The ARMv6 version was called Raspbian. Armbian is the more optimized distro.

    Comment


    • #12
      Reading the thread on lkml, this is initially only for x86_64, but it was submitted without Cc'ing x86 maintainers. Looking at the comments from Peter Z, I think the chances of this getting into 5.14 are slim.

      Comment


      • #13
        This is just another marketing attempt at pushing Clang to become the default compiler for all distros instead of GCC because they hate GNU and what it stands for. I don't care and I'll compile Linux with GCC/anything else until it becomes impossible to do so.

        Comment


        • #14
          Originally posted by r08z View Post
          This is just another marketing attempt at pushing Clang to become the default compiler for all distros instead of GCC because they hate GNU and what it stands for. I don't care and I'll compile Linux with GCC/anything else until it becomes impossible to do so.
          This is just another unwarranted accusations because Unfortunately, there are people who believe in conspiracy theories.
          it's good that I don't care and I will continue to compile anything with any compiler that gives a performance improvement.

          Comment


          • #15
            Originally posted by alex19EP View Post

            This is just another unwarranted accusations because Unfortunately, there are people who believe in conspiracy theories.
            it's good that I don't care and I will continue to compile anything with any compiler that gives a performance improvement.
            Well that's good for you.

            Comment


            • #16
              Originally posted by r08z View Post
              This is just another marketing attempt at pushing Clang to become the default compiler for all distros instead of GCC because they hate GNU and what it stands for.
              Those that believe in meritocracy would believe that the best compiler should win, regardless of the whether it is GCC or LLVM (or something else). Right now, it is clear LLVM is where the action is, and the best results are. Nothing stops you from improving the kernel (and GCC) to make sure it remain a viable choice. I would encourage you to do so (there have been patches floating around for quite some time for GCC LTO of the kernel, so that might be a place for you to start).

              Comment


              • #17
                Originally posted by CommunityMember View Post
                Those that believe in meritocracy would believe that the best compiler should win, regardless of the whether it is GCC or LLVM (or something else). Right now, it is clear LLVM is where the action is, and the best results are. Nothing stops you from improving the kernel (and GCC) to make sure it remain a viable choice. I would encourage you to do so (there have been patches floating around for quite some time for GCC LTO of the kernel, so that might be a place for you to start).
                That is actually not true. Andi Kleen wrote the LTO support for GCC all the way back to kernel 3.7. Torvalds just never wanted it in the kernel. It was then that Google picked it up, used it for LLVM/Clang and pushed it that we now have it in the mainline kernel. Andi Kleen keeps updating the patches for GCC LTO support but so far have these not made it into the kernel. There certainly is a bias here and Torvalds is known for his grudges against GCC.

                I will simply compile the kernel with Clang, knowing that Torvalds hates GCC. It is simply the smarter choice to use Clang as I do not want to get caught up in the fight. I am however aware of the nonsense and choose GCC for most other things, unless again I see a good reason not to.

                As you say, meritocracy should always win, but sometimes it does not and it takes a little time.
                Last edited by sdack; 14 June 2021, 06:34 AM.

                Comment


                • #18
                  Originally posted by sdack View Post
                  That is actually not true. Andi Kleen wrote the LTO support for GCC all the way back to kernel 3.7. Torvalds just never wanted it in the kernel.
                  Well, it was (as it usually is) slightly more complicated, as Linus stated at that time he did not believe LTO had proven it's mettle yet(*). Google showed sometime later (at least with LLVM) that the improvements were there, and they deployed it on many millions of devices in the real world. Proof by existence/benefits tends to be a strong factor in accepting patches.

                  knowing that Torvalds hates GCC
                  I don't think he hates(**) GCC, as much as the kernel community has been burned more than a few times on interesting code generation, and avoiding finding of new ones is not an unreasonable way forward (fool me once, shame on you, fool me twice, shame on me).


                  (*) I think that those initial patches came with certain caveats, like "experimental, don't use", and the data to support the claimed improvements were not there, so those and others were all contributory factors in the rejection, at that time.

                  (**) Hate is often more of an emotional reaction. Dislike, or despise, tends to come with specific reasons.

                  Comment


                  • #19
                    Originally posted by CommunityMember View Post
                    (*) I think that those initial patches came with certain caveats, like "experimental, don't use", and the data to support the claimed improvements were not there, so those and others were all contributory factors in the rejection, at that time.
                    The LLVM/Clang LTO support is marked as experimental. And proof was there in form of benchmarks and these showed quite some interesting gains. So did networking performance increase by 12% or so iirc. Hence my comment regarding network-oriented distros getting the most gain from it. Networking takes mostly place within kernel space and it is to be expected to gain the most from LTO as well as PGO.

                    Torvalds then took up parts of the GCC LTO patches. However not in favour of GCC LTO, but because hidden issues within the kernel had surfaced from its implementation. So parts of the patches were taken up as regular fixes.

                    Comment


                    • #20
                      Originally posted by sdack View Post
                      That is actually not true. Andi Kleen wrote the LTO support for GCC all the way back to kernel 3.7. Torvalds just never wanted it in the kernel. It was then that Google picked it up, used it for LLVM/Clang and pushed it that we now have it in the mainline kernel. Andi Kleen keeps updating the patches for GCC LTO support but so far have these not made it into the kernel. There certainly is a bias here and Torvalds is known for his grudges against GCC.
                      Thats probably because GCC has historically screwed up enough times that its been put on Linus's "observe with care" radar where as Clang's LLVM LTO has proven itself by being shipped in millions (billions?) of androids devices as well as being used in cloud providers, in other words its had plenty of testing.

                      Comment

                      Working...
                      X