[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YsJtYYsB/SinnNzI@shell.armlinux.org.uk>
Date: Mon, 4 Jul 2022 05:32:33 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Matthew Wilcox <willy@...radead.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>, Mike Rapoport <rppt@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 15/14] arm: Rename PMD_ORDER to PMD_BITS
On Sun, Jul 03, 2022 at 10:54:49PM +0100, Matthew Wilcox wrote:
> On Sun, Jul 03, 2022 at 10:16:45PM +0100, Russell King (Oracle) wrote:
> > On Sun, Jul 03, 2022 at 10:14:41PM +0100, Matthew Wilcox (Oracle) wrote:
> > > This is the number of bits used by a PMD entry, not the order of a PMD.
> >
> > No, it's not the number of bits. A PMD entry doesn't fit in 2 or 3 bits.
> > This is even more confusing.
>
> Well, what is it then? The order of something is PAGE_SIZE << n, and
> that doesn't seem to be what this is.
Where is it defined that "order" means "PAGE_SIZE << n" ?
"order" here is "order of magnitude" and in this case, it is 2^n, just
like order of magnitude in base 10 is 10^n. So strictly, the usage
here is completely correct, but if you describe "order" as "PAGE_SIZE <<
n" that is no longer an order of magnitude, because it doesn't increase
in an order of magnitude (iow, n = 2 isn't PAGE_SIZE * PAGE_SIZE).
Now, if you're trying to tell me that Linux has decided to define
"order" to be something non-standard, I'll accept that, but then we
shouldn't be renaming stuff that is using it in a standard way.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists