mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "liupeng (DM)" <liupeng256@huawei.com>
To: Mike Kravetz <mike.kravetz@oracle.com>,
	<akpm@linux-foundation.org>, <yaozhenguo1@gmail.com>,
	<linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
	<rdunlap@infradead.org>
Subject: Re: [PATCH] hugetlb: Fix hugepages_setup when deal with pernode
Date: Tue, 29 Mar 2022 11:59:38 +0800	[thread overview]
Message-ID: <d992f076-5eba-929b-e284-57bd5471cd85@huawei.com> (raw)
In-Reply-To: <e94ea60f-9da7-98b7-7d47-1183c0fd2ddc@oracle.com>


On 2022/3/29 10:46, Mike Kravetz wrote:
> Yes, I agree that the change is needed and the current behavior is
> unacceptable.
>
> One remaining question is the change from returning '0' to '1' in the case
> of error.  I do understand this is to prevent the invalid parameter string
> from being passed to init.  It may not be correct/right, but in every other
> case where an invalid parameter in encountered in hugetlb command line
> processing we return "0".  Should we perhaps change all these other places
> to be consistent?  I honestly do not know what is the appropriate behavior
> in these situations.

Thank you for your carefulness and question.

I have checked default_hugepagesz_setup and hugepages_setup will both print
some information before return '0', so there is no need to print again in
"Unknown kernel command line parameters".

Should I send another patch to repair the rest "return 0" in hugetlb?

Some other tests for current linux-master:

cmdline:
hugepagesz=1G hugepages=1 hugepagesz=1G hugepages=2
dmesg:
HugeTLB: hugepagesz=1G specified twice, ignoring
Unknown kernel command line parameters " hugepagesz=1G hugepages=2"

cmdline:
hugepagesz=1Y hugepages=1
dmesg:
HugeTLB: unsupported hugepagesz=1Y
HugeTLB: hugepages=1 does not follow a valid hugepagesz, ignoring
Unknown kernel command line parameters "hugepagesz=1Y hugepages=1"

--
Peng Liu
.

  reply	other threads:[~2022-03-29  3:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24  7:40 Peng Liu
2022-03-24 21:57 ` Mike Kravetz
     [not found]   ` <ec312492-fea9-7130-8be4-1c362c2e84a6@huawei.com>
2022-03-29  2:46     ` Mike Kravetz
2022-03-29  3:59       ` liupeng (DM) [this message]
2022-03-29 17:43         ` Mike Kravetz
2022-03-30  1:01           ` liupeng (DM)
2022-03-31 11:23           ` liupeng (DM)
2022-03-31 21:11             ` Mike Kravetz
2022-04-01  9:56               ` liupeng (DM)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d992f076-5eba-929b-e284-57bd5471cd85@huawei.com \
    --to=liupeng256@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=rdunlap@infradead.org \
    --cc=yaozhenguo1@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®