[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7196b6b5-53df-9898-471a-ae481395e97c@oracle.com>
Date: Wed, 18 Mar 2020 19:42:56 -0700
From: Mike Kravetz <mike.kravetz@...cle.com>
To: Randy Dunlap <rdunlap@...radead.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linuxppc-dev@...ts.ozlabs.org, linux-riscv@...ts.infradead.org,
linux-s390@...r.kernel.org, sparclinux@...r.kernel.org,
linux-doc@...r.kernel.org
Cc: Albert Ou <aou@...s.berkeley.edu>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Vasily Gorbik <gor@...ux.ibm.com>,
Jonathan Corbet <corbet@....net>,
Catalin Marinas <catalin.marinas@....com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
Ingo Molnar <mingo@...hat.com>,
Palmer Dabbelt <palmer@...belt.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Paul Mackerras <paulus@...ba.org>,
Thomas Gleixner <tglx@...utronix.de>,
Longpeng <longpeng2@...wei.com>, Will Deacon <will@...nel.org>,
"David S.Miller" <davem@...emloft.net>
Subject: Re: [PATCH 4/4] hugetlbfs: clean up command line processing
On 3/18/20 5:20 PM, Randy Dunlap wrote:
> Hi Mike,
>
> On 3/18/20 3:06 PM, Mike Kravetz wrote:
>> With all hugetlb page processing done in a single file clean up code.
>> - Make code match desired semantics
>> - Update documentation with semantics
>> - Make all warnings and errors messages start with 'HugeTLB:'.
>> - Consistently name command line parsing routines.
>> - Add comments to code
>> - Describe some of the subtle interactions
>> - Describe semantics of command line arguments
>>
>> Signed-off-by: Mike Kravetz <mike.kravetz@...cle.com>
>> ---
>> Documentation/admin-guide/mm/hugetlbpage.rst | 26 +++++++
>> mm/hugetlb.c | 78 +++++++++++++++-----
>> 2 files changed, 87 insertions(+), 17 deletions(-)
>
>
>> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
>> index cc85b4f156ca..2b9bf01db2b6 100644
>> --- a/mm/hugetlb.c
>> +++ b/mm/hugetlb.c
>
>> @@ -3214,8 +3238,15 @@ static int __init hugetlb_nrpages_setup(char *s)
>>
>> return 1;
>> }
>> -__setup("hugepages=", hugetlb_nrpages_setup);
>> +__setup("hugepages=", hugepages_setup);
>>
>> +/*
>> + * hugepagesz command line processing
>> + * A specific huge page size can only be specified once with hugepagesz.
>> + * hugepagesz is followed by hugepages on the commnad line. The global
>
> typo: command
Thanks
>
>> + * variable 'parsed_valid_hugepagesz' is used to determine if prior
>> + * hugepagesz argument was valid.
>> + */
>> static int __init hugepagesz_setup(char *s)
>> {
>> unsigned long long size;
>
>
> Does any of this need to be updated? (from Documentation/admin-guide/kernel-parameters.txt)
>
> hugepagesz= [HW,IA-64,PPC,X86-64] The size of the HugeTLB pages.
> On x86-64 and powerpc, this option can be specified
> multiple times interleaved with hugepages= to reserve
> huge pages of different sizes. Valid pages sizes on
> x86-64 are 2M (when the CPU supports "pse") and 1G
> (when the CPU supports the "pdpe1gb" cpuinfo flag).
>
No functional changes should be expected/seen as a result of these patches.
So the documentation here is basically OK. However, it is out of date as
more architectures are supported. In addition, the statement "this option
can be specified multiple times interleaved with hugepages= to reserve
huge pages of different sizes." may need a little clarification. As mentioned
elsewhere, hugepagesz= can only be specified once per huge page size.
I'll make some updates in v2.
--
Mike Kravetz
Powered by blists - more mailing lists