Announcement

Collapse
No announcement yet.

The Performance Impact Of GCC CPU Tuning On The Linux Kernel's Performance

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

  • #21
    Originally posted by Grogan View Post
    This has been going on for ages and I used to do it myself in the Makefile/Kconfig.cpu, and while I didn't quantify it, I don't think it made any difference. Those benchmark results certainly don't change my mind.

    I remember a comment in the source, or Makefiles or somewhere: "Please note that patches adding -march=athlon-xp and friends are pointless at this time"

    I looked at this patch and as I thought, all it's doing is changing -march= for the various CPU types.

    If you look at the verbose compile command output (V=1) it's disabling advanced instructions anyway. -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx etc.

    That's just for the kernel code itself, not for the available instructions when it detects your CPU.
    Why does it disable those instructions?

    Comment


    • #22
      moltonel No downside, unless you use a binary based distro like pretty much everyone.
      It clearly makes sense only for gentoo users, that's why it should stay in gentoo imho.

      Comment


      • #23
        Originally posted by geearf View Post

        Why does it disable those instructions?
        because they use cpu state (SSE/AVX instructions) that the user process owns, and that clobbering would corrupt user state...

        Comment


        • #24
          Originally posted by arjan_intel View Post

          because they use cpu state (SSE/AVX instructions) that the user process owns, and that clobbering would corrupt user state...
          Oooooooooh.
          In simple words, why are those reserved to user space? Is it because it offers no major benefit to kernel space and would only complicate things?

          Thank you!

          Comment


          • #25
            Originally posted by geearf View Post

            Oooooooooh.
            In simple words, why are those reserved to user space? Is it because it offers no major benefit to kernel space and would only complicate things?

            Thank you!
            switching the state is expensive and complicated (and it's done in a few select places, like raid6 code) but as a general thing the gains are not there

            Comment


            • #26
              But, what is not measured, is the *feeling* of running a bleeding edge kernel you have tailored, optimized and built specifically for your machine. With all the sense of accomplishment it surely *feels* faster.

              Unfortunately these benchmarks deprive people of getting that feeling...

              (Tried it a couple of times ages ago, but although a fun exercise I realized the futility of it.)

              Comment


              • #27
                Originally posted by arjan_intel View Post

                switching the state is expensive and complicated (and it's done in a few select places, like raid6 code) but as a general thing the gains are not there
                Thank you for the easy explanations!

                Comment


                • #28
                  `sleep 1h ; gcc Foo.c` benchmark took about an hour on each system tested, must be no difference!

                  That's kinda what's going on here. Most of these benchmarks measure 99% user code and the kennel isn't going to make any appreciate difference. It could be 20% better code in the kernel, but that would just show up as noise in many of these benchmarks.

                  Gcc's tuning, especially of the newest CPUs, really just doesn't do a whole lot. Take a look in the gcc code base, it just doesn't do much.

                  Also, something is up with that Apache benchmark that did show a difference!

                  Comment


                  • #29
                    Now I am curious. Where does ClearLinux stand on this ?

                    Comment


                    • #30
                      Gentoo "muh compilation" is a waste of time and a meme. Clear Linux has the REAL optimization for a entire system. Benchmarks doesn’t lie.

                      Comment

                      Working...
                      X