Thread (30 messages) 30 messages, 9 authors, 2020-03-26

Re: [PATCH 1/4] hugetlbfs: add arch_hugetlb_valid_size

From: Dave Hansen <hidden>
Date: 2020-03-26 23:11:00
Also in: linux-doc, linux-mm, linux-riscv, linux-s390, linuxppc-dev, lkml, sparclinux

On 3/26/20 2:56 PM, Mike Kravetz wrote:
Perhaps it would be best to check hugepages_supported() when parsing
hugetlb command line options.  If not enabled, throw an error.  This
will be much easier to do after moving all command line parsing to
arch independent code.
Yeah, that sounds sane.
Is that a sufficient way to address this concern?  I think it is a good
change in any case.
(Thanks to Kirill for pointing this out.)

So, it turns out the x86 huge page enumeration is totally buggered.
X86_FEATURE_PSE is actually meaningless on 64-bit (and 32-bit PAE).  All
CPUs architecturally support 2MB pages regardless of X86_FEATURE_PSE and
the state of CR4.PSE.

So, on x86_64 at least, hugepages_supported() should *always* return 1.

1GB page support can continue to be dependent on X86_FEATURE_GBPAGES.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help