[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whhYRMS7Xc9k_JBdrGvp++JLmU0T2xXEgn046hWrj7q8Q@mail.gmail.com>
Date: Mon, 4 Aug 2025 16:55:09 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Alex Williamson <alex.williamson@...hat.com>
Cc: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] VFIO updates for v6.17-rc1
On Mon, 4 Aug 2025 at 15:22, Alex Williamson <alex.williamson@...hat.com> wrote:
>
> Li Zhe (6):
> mm: introduce num_pages_contiguous()
WHY?
There is exactly *ONE* user, why the heck do we introduce this
completely pointless "helper" function, and put it in a core header
file like it was worth it?
And it's not like that code is some kind of work of art that we want
to expose everybody to *anyway*. It's written in a particularly stupid
way that means that it's *way* more expensive than it needs to be.
And then it's made "inline" despite the code generation being
horrible, which makes it all entirely pointless.
Yes, I'm grumpy. This pull request came in late, I'm already
traveling, and then I look at it and it just makes me *angry* at how
bad that code is, and how annoying it is.
My builds are already slower than usual because they happen on my
laptop while traveling, I do *not* need to see this kind of absolutely
disgusting code that does stupid things that make the build even
slower.
So I refuse to pull this kind of crap.
If you insist on making my build slower and exposing these kinds of
helper functions, they had better be *good* helper functions.
Hint: absolutely nobody cares about "the pages crossed a sparsemem
border. If your driver cares about the number of contiguous pages, it
might as well say "yeah, they are contiguous, but they are in
different sparsemem chunks, so we'll break here too".
And at that point all you care about is 'struct page' being
contiguous, instead of doing that disgusting 'nth_page'.
And then - since there is only *one* single user - you don't put it in
the most central header file that EVERYBODY ELSE cares about.
And you absolutely don't do it if it generates garbage code for no good reason!
Linus
Powered by blists - more mailing lists