Re: [PATCH v2 2/4] hugetlbfs: move hugepagesz= parsing to arch independent code

From: Peter Xu
Date: Fri Apr 10 2020 - 15:27:05 EST


On Wed, Apr 01, 2020 at 11:38:17AM -0700, Mike Kravetz wrote:
> Now that architectures provide arch_hugetlb_valid_size(), parsing
> of "hugepagesz=" can be done in architecture independent code.
> Create a single routine to handle hugepagesz= parsing and remove
> all arch specific routines. We can also remove the interface
> hugetlb_bad_size() as this is no longer used outside arch independent
> code.
>
> This also provides consistent behavior of hugetlbfs command line
> options. The hugepagesz= option should only be specified once for
> a specific size, but some architectures allow multiple instances.
> This appears to be more of an oversight when code was added by some
> architectures to set up ALL huge pages sizes.
>
> Signed-off-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>

This could change the error messages for a wrong setup on archs, but I
guess it's not a big deal, assuming even to capture error people will
majorly still look for error lines in general..

Reviewed-by: Peter Xu <peterx@xxxxxxxxxx>

--
Peter Xu