From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:52772 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726708AbgDJT1D (ORCPT ); Fri, 10 Apr 2020 15:27:03 -0400 Received: by mail-qt1-f197.google.com with SMTP id n89so2674867qte.15 for ; Fri, 10 Apr 2020 12:27:00 -0700 (PDT) Date: Fri, 10 Apr 2020 15:26:56 -0400 From: Peter Xu Subject: Re: [PATCH v2 2/4] hugetlbfs: move hugepagesz= parsing to arch independent code Message-ID: <20200410192656.GE3172@xz-x1> References: <20200401183819.20647-1-mike.kravetz@oracle.com> <20200401183819.20647-3-mike.kravetz@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200401183819.20647-3-mike.kravetz@oracle.com> Sender: linux-s390-owner@vger.kernel.org List-ID: To: Mike Kravetz Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-doc@vger.kernel.org, Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , "David S . Miller" , Thomas Gleixner , Ingo Molnar , Dave Hansen , Jonathan Corbet , Longpeng , Christophe Leroy , Mina Almasry , Andrew Morton 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 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 -- Peter Xu