All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>, Mike Rapoport <rppt@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 15/14] arm: Rename PMD_ORDER to PMD_BITS
Date: Mon, 4 Jul 2022 05:32:33 +0100	[thread overview]
Message-ID: <YsJtYYsB/SinnNzI@shell.armlinux.org.uk> (raw)
In-Reply-To: <YsIQKdYiswzq5kTG@casper.infradead.org>

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!

WARNING: multiple messages have this Message-ID (diff)
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>, Mike Rapoport <rppt@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 15/14] arm: Rename PMD_ORDER to PMD_BITS
Date: Mon, 4 Jul 2022 05:32:33 +0100	[thread overview]
Message-ID: <YsJtYYsB/SinnNzI@shell.armlinux.org.uk> (raw)
In-Reply-To: <YsIQKdYiswzq5kTG@casper.infradead.org>

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!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-07-04  4:32 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-03 14:11 [PATCH 00/14] arch: make PxD_ORDER generically available Mike Rapoport
2022-07-03 14:11 ` [PATCH 01/14] csky: drop definition of PTE_ORDER Mike Rapoport
2022-07-03 14:11 ` [PATCH 02/14] csky: drop definition of PGD_ORDER Mike Rapoport
2022-07-03 14:11 ` [PATCH 03/14] mips: Rename PMD_ORDER to PMD_TABLE_ORDER Mike Rapoport
2022-07-03 14:11 ` [PATCH 04/14] mips: Rename PUD_ORDER to PUD_TABLE_ORDER Mike Rapoport
2022-07-03 14:11 ` [PATCH 05/14] mips: drop definitions of PTE_ORDER Mike Rapoport
2022-07-03 14:11 ` [PATCH 06/14] mips: Rename PGD_ORDER to PGD_TABLE_ORDER Mike Rapoport
2022-07-03 14:11 ` [PATCH 07/14] nios2: drop definition of PTE_ORDER Mike Rapoport
2022-07-03 14:11 ` [PATCH 08/14] nios2: drop definition of PGD_ORDER Mike Rapoport
2022-07-03 14:11 ` [PATCH 09/14] loongarch: drop definition of PTE_ORDER Mike Rapoport
2022-07-03 14:11 ` [PATCH 10/14] loongarch: drop definition of PMD_ORDER Mike Rapoport
2022-07-03 14:12 ` [PATCH 11/14] loongarch: drop definition of PUD_ORDER Mike Rapoport
2022-07-03 14:12 ` [PATCH 12/14] loongarch: drop definition of PGD_ORDER Mike Rapoport
2022-07-03 20:50   ` Matthew Wilcox
2022-07-04  3:57     ` WANG Xuerui
2022-07-04  6:37       ` Mike Rapoport
2022-07-03 14:12 ` [PATCH 13/14] parisc: Rename PGD_ORDER to PGD_TABLE_ORDER Mike Rapoport
2022-07-03 14:12 ` [PATCH 14/14] xtensa: drop definition of PGD_ORDER Mike Rapoport
2022-07-03 14:27 ` [PATCH 00/14] arch: make PxD_ORDER generically available Helge Deller
2022-07-04  0:40   ` Huacai Chen
2022-07-04  1:45     ` Guo Ren
2022-07-03 21:14 ` [PATCH 15/14] arm: Rename PMD_ORDER to PMD_BITS Matthew Wilcox (Oracle)
2022-07-03 21:14   ` Matthew Wilcox (Oracle)
2022-07-03 21:16   ` Russell King (Oracle)
2022-07-03 21:16     ` Russell King (Oracle)
2022-07-03 21:54     ` Matthew Wilcox
2022-07-03 21:54       ` Matthew Wilcox
2022-07-04  4:32       ` Russell King (Oracle) [this message]
2022-07-04  4:32         ` Russell King (Oracle)
2022-07-04  6:26         ` Mike Rapoport
2022-07-04  6:26           ` Mike Rapoport
2022-07-04 11:37           ` Russell King (Oracle)
2022-07-04 11:37             ` Russell King (Oracle)
2022-07-04 10:48         ` Matthew Wilcox
2022-07-04 10:48           ` Matthew Wilcox
2022-07-04 11:32           ` Russell King (Oracle)
2022-07-04 11:32             ` Russell King (Oracle)
2022-07-04 14:28             ` Matthew Wilcox
2022-07-04 14:28               ` Matthew Wilcox
2022-07-04 17:22               ` Russell King (Oracle)
2022-07-04 17:22                 ` Russell King (Oracle)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YsJtYYsB/SinnNzI@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.