Announcement

Collapse
No announcement yet.

Changing One "If" To "While" Caused An Unexpected Shift In A Kernel Benchmark This Week

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

  • Changing One "If" To "While" Caused An Unexpected Shift In A Kernel Benchmark This Week

    Phoronix: Changing One "If" To "While" Caused An Unexpected Shift In A Kernel Benchmark This Week

    Several months back you may recall that Linux 5.9 kernel regression we noted that in turn was bisected to code introduced by Linus Torvalds around page lock fairness. That was ultimately worked out in time with allowing a control over the page lock (un)fairness to address the regressed workloads while being fair enough to satisfy his original change. But now this week for Linux 5.11, Linus Torvalds has again altered the behavior. It then ended up causing a PostgreSQL database server performance regression but fortunately any impact should be very minimal and hopefully not appearing in any real-world situation...

    http://www.phoronix.com/scan.php?pag...-Fairness-5.11

  • #2
    If I change a "if" to anything else, stuff normally breaks and "if" I tested I will know before my colleges do

    Comment


    • #3
      Originally posted by slalomsk8er View Post
      If I change a "if" to anything else, stuff normally breaks and "if" I tested I will know before my colleges do
      Low quality post. Why not read the article and post something relevant?

      Comment


      • #4
        Originally posted by dirlewanger88 View Post

        Low quality post. Why not read the article and post something relevant?
        Did read the article and nice case of pot calling the kettle black

        Comment


        • #5
          what a joke

          Comment


          • #6
            Originally posted by dirlewanger88 View Post

            Low quality post. Why not read the article and post something relevant?
            The joke serves 2 points, 1 is the actual joke the other is the valid criticism you are supposed to do (because of human error).

            Comment


            • #7
              Originally posted by slalomsk8er View Post
              If I change a "if" to anything else, stuff normally breaks and "if" I tested I will know before my colleges do
              Being able to replace if with while is pretty common.

              Comment


              • #8
                In the news: changing a conditional code, which runs 0 or 1 times, to a loop which may run from 0 to N times until the condition is no longer true, MAY INCREASE THE TIME THIS CODE TAKES. Who would have thought?

                In other news: the Sun rose in the east today.

                Comment


                • #9
                  Originally posted by turboNOMAD View Post
                  In the news: changing a conditional code, which runs 0 or 1 times, to a loop which may run from 0 to N times until the condition is no longer true, MAY INCREASE THE TIME THIS CODE TAKES. Who would have thought?

                  In other news: the Sun rose in the east today.
                  It probably doesn't loop more then once, most of the time.

                  The difference is one jmp instruction. That may change alignment of code, the size of the code the cpu "transpiles" for itself, and another thing i forgot now.
                  So it's probably as linus said.

                  Comment


                  • #10
                    Originally posted by gens View Post
                    It probably doesn't loop more then once, most of the time.
                    I think so too. My guess it that PostgreSQL benchmark mentioned in the article is one of the few cases when it does, due to nature of its workload. I don't think it has to do anything with code alignment. Never seen noticeable performance changes due to one extra instruction, although I am more familiar with such micro-optimizations for controllers such as STM32, it's been some years since I did this wizardry on x86.

                    Comment

                    Working...
                    X