From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754673AbcLODAP (ORCPT ); Wed, 14 Dec 2016 22:00:15 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:42395 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752886AbcLODAO (ORCPT ); Wed, 14 Dec 2016 22:00:14 -0500 Message-ID: <5852071B.60202@huawei.com> Date: Thu, 15 Dec 2016 10:59:39 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Ard Biesheuvel CC: Catalin Marinas , Will Deacon , Robert Richter , Mark Rutland , Arnd Bergmann , Rob Herring , , Jeremy Linton , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RESEND PATCH 1/2] arm64: change from CONT_PMD_SHIFT to CONT_PTE_SHIFT References: <1481725151-20549-1-git-send-email-zhongjiang@huawei.com> <1481725151-20549-2-git-send-email-zhongjiang@huawei.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.68] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016/12/14 22:45, Ard Biesheuvel wrote: > On 14 December 2016 at 14:19, zhongjiang wrote: >> From: zhong jiang >> >> I think that CONT_PTE_SHIFT is more reasonable even if they are some >> value. and the patch is not any functional change. >> > This may be the case for 64k pages, but not for 16k pages, and I > actually think add_default_hugepagesz() could be made unconditional, > given that both 64k on 4k kernels and 2 MB on 16k kernels are useful > hugepage sizes that are not otherwise available by default. I agree that we can make add_default_hugepagesz() to be unconditional. but I do not know the history why it did so at that time. The patch just is based on the current kernel. by the way, please review the second patch if you have time. Any comment will be welcomed. Thanks zhongjiang >> Signed-off-by: zhong jiang > Reviewed-by: Ard Biesheuvel > >> --- >> arch/arm64/mm/hugetlbpage.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c >> index 2e49bd2..0a4c97b 100644 >> --- a/arch/arm64/mm/hugetlbpage.c >> +++ b/arch/arm64/mm/hugetlbpage.c >> @@ -323,7 +323,7 @@ static __init int setup_hugepagesz(char *opt) >> static __init int add_default_hugepagesz(void) >> { >> if (size_to_hstate(CONT_PTES * PAGE_SIZE) == NULL) >> - hugetlb_add_hstate(CONT_PMD_SHIFT); >> + hugetlb_add_hstate(CONT_PTE_SHIFT); >> return 0; >> } >> arch_initcall(add_default_hugepagesz); >> -- >> 1.8.3.1 >> > . >