[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z-pnCLaAp43kJVCM@gmail.com>
Date: Mon, 31 Mar 2025 11:57:28 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Baoquan He <bhe@...hat.com>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, yanjun.zhu@...ux.dev, x86@...nel.org
Subject: Re: [PATCH v2 6/7] x86/mm: remove p4d_leaf definition
* Baoquan He <bhe@...hat.com> wrote:
> There's no p4d huge page support yet, let's use the generic definition.
>
> And also update the BUILD_BUG_ON() in pti_user_pagetable_walk_pmd()
> because p4d_leaf() returns boolean value.
> -#define p4d_leaf p4d_leaf
> -static inline bool p4d_leaf(p4d_t p4d)
> -{
> - /* No 512 GiB pages yet */
> - return 0;
> -}
This comment was also incorrect I believe:
1 PTE entry on x86-64 covers 4K virtual memory, 512 PTE entries make up
a 4K pagetable page, and each level of paging adds another level of 512
pagetable entries:
- level 0: 4K pages
- level 1: 512x 4K = 2MB 'large' pages
- level 2: 512x 2MB = 1GB 'huge' pages
- level 3: 512x 1GB = 512GB 'PGD' pages
- level 4: 512x 512GB = 256TB 'P4D' pages
So the above comment should have said '256 TB' pages, unless there's
some naming weirdness I missed.
Thanks,
Ingo
Powered by blists - more mailing lists