Announcement

Collapse
No announcement yet.

Linus Torvalds Isn't Happy With Some Of The Bcachefs Code For Linux 6.9

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

  • #51
    Originally posted by NotMine999 View Post

    You are you speaking of in this quote? Linus? or Kent?

    Inquiring minds want to know.
    Kent of course. Linus is the goat.

    Comment


    • #52
      Ahh I love this forum 😂

      Comment


      • #53
        This is gold. The next time someone attempts to write a shared library code in our codebase I'll say this in the code review: "Your foo_and_bar stuff is just horrendous interfaces with no explanations. The interfaces are disgusting. Keep it in your own code where it belongs, don't try to make it some generic library thing!"​

        Comment


        • #54
          Originally posted by danger View Post
          This is gold. The next time someone attempts to write a shared library code in our codebase I'll say this in the code review: "Your foo_and_bar stuff is just horrendous interfaces with no explanations. The interfaces are disgusting. Keep it in your own code where it belongs, don't try to make it some generic library thing!"​
          They had previous discussions about things being wrong, and same wrongness was attempted to be pushed out to generic. Kent thought XFS wanting to use it was justification enough, Linus point of view is that the code and concept must be beautiful, and until that happens it must live in the driver.

          If Linus is right here, it is truly ugly to do 128bit math when 64 is enough to achieve the same.

          Comment


          • #55
            Originally posted by ckafi View Post
            I can respect Linus' objections about the interfaces, but I don't see what's so insane about the math implementations. The computations are entirely correct, they're neatly optimized, and there's even a PDF linked with the derivations for each formula. What more do you want? Is it just because it's 128-bit math? Also, no, MAD is not a valid substitution, because there's no way (at least to my knowledge) to increment it on-line.
            I believe it is the same old problem as always: theory versus practical application. Formulas for solving a problem may be valid in theory (on paper), but their implementation in code becomes wasteful. It can sometimes be enough to use only integer types instead of floating point types, or to use 8 or 16 bit instead of 64 or 128 bit, or to use a metric based on addition and multiplication instead of one based on division, square roots or logarithms, and so on ... Computers are meant to be deterministic and we always first try to solve problems discretely without using probability. When a new file system then needs 128-bit floating point math to implement statistical functions before it all works then I would get sceptical, too. Statistics just do not strike me as the final solution to computational problems, because they rarely.

            Comment


            • #56
              Originally posted by sdack View Post
              I believe it is the same old problem as always: theory versus practical application. Formulas for solving a problem may be valid in theory (on paper), but their implementation in code becomes wasteful. It can sometimes be enough to use only integer types instead of floating point types, or to use 8 or 16 bit instead of 64 or 128 bit, or to use a metric based on addition and multiplication instead of one based on division, square roots or logarithms, and so on ... Computers are meant to be deterministic and we always first try to solve problems discretely without using probability. When a new file system then needs 128-bit floating point math to implement statistical functions before it all works then I would get sceptical, too. Statistics just do not strike me as the final solution to computational problems, because they rarely.
              This has nothing to do with probability. Mean and variance are deterministic metrics. As far as I can tell it's used to measure write times and transaction durations for the journal. Also Linus corrected himself, as he meant "Mean Absolute Deviation" with MAD, which uses division as well. That only leaves to sticking points: a) 128-bits and b) square roots. Neither of which should be called "insane". God forbid Linus ever looks into a graphics engine.

              Comment


              • #57
                Originally posted by ckafi View Post
                This has nothing to do with probability. Mean and variance are deterministic metrics. ...
                Nonsense. Everything you just wrote is wrong. A deviation measures the variation of a probability distribution. A metric measures the distance of two points in a metric space.

                Often formulas that use the square root can be transformed by transforming the data. I.e. a test like R >= SQRT(X^2 + Y^2 + Z^2) used in measuring distances can be transformed into R^2 >= X^2 + Y^2 + Z^2. It is faster and can be implemented with integers. You would know this if you did write graphics code.

                Comment


                • #58
                  Originally posted by sdack View Post
                  A metric measures the distance of two points in a metric space.
                  If you had scrolled down on that Wikipedia summary page, you would've read the sentence "The word metric is often used to mean a descriptive statistic​".

                  Originally posted by sdack View Post
                  A deviation measures the variation of a probability distribution.
                  You should think about re-taking a statistics 101 course. Yes, the underlying distribution of a characteristic in a population is probabilistic, as well as the error when observing, but once you have your sample, I can't think of a single descriptor that isn't fully deterministic. It's like saying 'ls -l' isn't deterministic, because the ctime of files follows a probability distribution. Here, I'll spare you looking stuff up on Wikipedia:
                  This generally means that descriptive statistics, unlike inferential statistics, is not developed on the basis of probability theory [...]
                  ​
                  Originally posted by sdack View Post
                  Often formulas that use the square root can be transformed by transforming the data. I.e. a test like R >= SQRT(X^2 + Y^2 + Z^2) used in measuring distances can be transformed into R^2 >= X^2 + Y^2 + Z^2. It is faster and can be implemented with integers. You would know this if you did write graphics code.
                  The word "often" does a lot of heavy lifting here. I dare you to find any graphics code using either vectors or quarternions that isn't literally littered with square roots. If you look at Godot for example, you can find almost 1500 calls to sqrt. Some of them even on gasp 128 bit values.

                  Comment


                  • #59
                    Originally posted by ckafi View Post
                    ...
                    I do not care for your excuses and whatever nonsense you tell yourself. When you write nonsense will you get lectured, whether you like this or not. Your response now only tells me you're an idiot who is not worth my time. If you want to have a conversation with people will you need to do better than this.
                    Last edited by sdack; 19 March 2024, 10:55 AM.

                    Comment


                    • #60
                      It must be nice to suffer under the delusion of being "the wise one", so you don't have to use any arguments when you try to "lecture" someone. I hope for you that you treat people offline better than this, otherwise you will find yourself very lonely one day.
                      Last edited by ckafi; 19 March 2024, 04:43 PM.

                      Comment

                      Working...
                      X