From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F33D2C43460 for ; Mon, 19 Apr 2021 06:12:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 69EA361151 for ; Mon, 19 Apr 2021 06:12:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69EA361151 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A887F6B0036; Mon, 19 Apr 2021 02:12:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A128E6B006E; Mon, 19 Apr 2021 02:12:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 88AD46B0070; Mon, 19 Apr 2021 02:12:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id 67EF96B0036 for ; Mon, 19 Apr 2021 02:12:31 -0400 (EDT) Received: from smtpin39.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 24E87180AD830 for ; Mon, 19 Apr 2021 06:12:31 +0000 (UTC) X-FDA: 78048097302.39.15A7889 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by imf04.hostedemail.com (Postfix) with ESMTP id B1314135 for ; Mon, 19 Apr 2021 06:12:27 +0000 (UTC) Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FNxGt2rGlzPqhD; Mon, 19 Apr 2021 14:09:26 +0800 (CST) Received: from [10.174.177.208] (10.174.177.208) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Mon, 19 Apr 2021 14:12:23 +0800 Subject: Re: [PATCH -next v2 1/2] mm/debug_vm_pgtable: Move {pmd/pud}_huge_tests out of CONFIG_TRANSPARENT_HUGEPAGE To: Anshuman Khandual , Andrew Morton References: <20210406044900.2178705-1-liushixin2@huawei.com> <4f290e6e-0e44-8f9a-52e8-1e113695abbb@arm.com> CC: , From: Liu Shixin Message-ID: Date: Mon, 19 Apr 2021 14:12:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.208] X-CFilter-Loop: Reflected X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: B1314135 X-Stat-Signature: gdud84jjm7sesxsdzs8m3ytyauk6n7ms Received-SPF: none (huawei.com>: No applicable sender policy available) receiver=imf04; identity=mailfrom; envelope-from=""; helo=szxga05-in.huawei.com; client-ip=45.249.212.191 X-HE-DKIM-Result: none/none X-HE-Tag: 1618812747-820044 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Thanks for your advice. I will fix these patches and resend them as soon as possilble. On 2021/4/19 11:30, Anshuman Khandual wrote: > > On 4/9/21 9:35 AM, Anshuman Khandual wrote: >> On 4/6/21 10:18 AM, Shixin Liu wrote: >>> v1->v2: >>> Modified the commit message. >> Please avoid change log in the commit message, it should be after '---' >> below the SOB statement. >> >>> The functions {pmd/pud}_set_huge and {pmd/pud}_clear_huge ars not dependent on THP. >> typo ^^^^^ s/ars/are >> >> Also there is a checkpatch.pl warning. >> >> WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) >> #10: >> The functions {pmd/pud}_set_huge and {pmd/pud}_clear_huge ars not dependent on THP. >> >> total: 0 errors, 1 warnings, 121 lines checked >> >> As I had mentioned in the earlier version, the commit message should be some >> thing like .. >> >> ---- >> The functions {pmd/pud}_set_huge and {pmd/pud}_clear_huge are not dependent >> on THP. Hence move {pmd/pud}_huge_tests out of CONFIG_TRANSPARENT_HUGEPAGE. >> ---- >> >>> Signed-off-by: Shixin Liu >>> --- >>> mm/debug_vm_pgtable.c | 91 +++++++++++++++++++------------------------ >>> 1 file changed, 39 insertions(+), 52 deletions(-) >>> >>> diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c >>> index 05efe98a9ac2..d3cf178621d9 100644 >>> --- a/mm/debug_vm_pgtable.c >>> +++ b/mm/debug_vm_pgtable.c >>> @@ -242,29 +242,6 @@ static void __init pmd_leaf_tests(unsigned long pfn, pgprot_t prot) >>> WARN_ON(!pmd_leaf(pmd)); >>> } >>> >>> -#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP >>> -static void __init pmd_huge_tests(pmd_t *pmdp, unsigned long pfn, pgprot_t prot) >>> -{ >>> - pmd_t pmd; >>> - >>> - if (!arch_vmap_pmd_supported(prot)) >>> - return; >>> - >>> - pr_debug("Validating PMD huge\n"); >>> - /* >>> - * X86 defined pmd_set_huge() verifies that the given >>> - * PMD is not a populated non-leaf entry. >>> - */ >>> - WRITE_ONCE(*pmdp, __pmd(0)); >>> - WARN_ON(!pmd_set_huge(pmdp, __pfn_to_phys(pfn), prot)); >>> - WARN_ON(!pmd_clear_huge(pmdp)); >>> - pmd = READ_ONCE(*pmdp); >>> - WARN_ON(!pmd_none(pmd)); >>> -} >>> -#else /* CONFIG_HAVE_ARCH_HUGE_VMAP */ >>> -static void __init pmd_huge_tests(pmd_t *pmdp, unsigned long pfn, pgprot_t prot) { } >>> -#endif /* CONFIG_HAVE_ARCH_HUGE_VMAP */ >>> - >>> static void __init pmd_savedwrite_tests(unsigned long pfn, pgprot_t prot) >>> { >>> pmd_t pmd = pfn_pmd(pfn, prot); >>> @@ -379,30 +356,6 @@ static void __init pud_leaf_tests(unsigned long pfn, pgprot_t prot) >>> pud = pud_mkhuge(pud); >>> WARN_ON(!pud_leaf(pud)); >>> } >>> - >>> -#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP >>> -static void __init pud_huge_tests(pud_t *pudp, unsigned long pfn, pgprot_t prot) >>> -{ >>> - pud_t pud; >>> - >>> - if (!arch_vmap_pud_supported(prot)) >>> - return; >>> - >>> - pr_debug("Validating PUD huge\n"); >>> - /* >>> - * X86 defined pud_set_huge() verifies that the given >>> - * PUD is not a populated non-leaf entry. >>> - */ >>> - WRITE_ONCE(*pudp, __pud(0)); >>> - WARN_ON(!pud_set_huge(pudp, __pfn_to_phys(pfn), prot)); >>> - WARN_ON(!pud_clear_huge(pudp)); >>> - pud = READ_ONCE(*pudp); >>> - WARN_ON(!pud_none(pud)); >>> -} >>> -#else /* !CONFIG_HAVE_ARCH_HUGE_VMAP */ >>> -static void __init pud_huge_tests(pud_t *pudp, unsigned long pfn, pgprot_t prot) { } >>> -#endif /* !CONFIG_HAVE_ARCH_HUGE_VMAP */ >>> - >>> #else /* !CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD */ >>> static void __init pud_basic_tests(struct mm_struct *mm, unsigned long pfn, int idx) { } >>> static void __init pud_advanced_tests(struct mm_struct *mm, >>> @@ -412,9 +365,6 @@ static void __init pud_advanced_tests(struct mm_struct *mm, >>> { >>> } >>> static void __init pud_leaf_tests(unsigned long pfn, pgprot_t prot) { } >>> -static void __init pud_huge_tests(pud_t *pudp, unsigned long pfn, pgprot_t prot) >>> -{ >>> -} >>> #endif /* CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD */ >>> #else /* !CONFIG_TRANSPARENT_HUGEPAGE */ >>> static void __init pmd_basic_tests(unsigned long pfn, int idx) { } >>> @@ -433,14 +383,51 @@ static void __init pud_advanced_tests(struct mm_struct *mm, >>> } >>> static void __init pmd_leaf_tests(unsigned long pfn, pgprot_t prot) { } >>> static void __init pud_leaf_tests(unsigned long pfn, pgprot_t prot) { } >>> +static void __init pmd_savedwrite_tests(unsigned long pfn, pgprot_t prot) { } >>> +#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ >>> + >>> +#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP >>> static void __init pmd_huge_tests(pmd_t *pmdp, unsigned long pfn, pgprot_t prot) >>> { >>> + pmd_t pmd; >>> + >>> + if (!arch_vmap_pmd_supported(prot)) >>> + return; >>> + >>> + pr_debug("Validating PMD huge\n"); >>> + /* >>> + * X86 defined pmd_set_huge() verifies that the given >>> + * PMD is not a populated non-leaf entry. >>> + */ >>> + WRITE_ONCE(*pmdp, __pmd(0)); >>> + WARN_ON(!pmd_set_huge(pmdp, __pfn_to_phys(pfn), prot)); >>> + WARN_ON(!pmd_clear_huge(pmdp)); >>> + pmd = READ_ONCE(*pmdp); >>> + WARN_ON(!pmd_none(pmd)); >>> } >>> + >>> static void __init pud_huge_tests(pud_t *pudp, unsigned long pfn, pgprot_t prot) >>> { >>> + pud_t pud; >>> + >>> + if (!arch_vmap_pud_supported(prot)) >>> + return; >>> + >>> + pr_debug("Validating PUD huge\n"); >>> + /* >>> + * X86 defined pud_set_huge() verifies that the given >>> + * PUD is not a populated non-leaf entry. >>> + */ >>> + WRITE_ONCE(*pudp, __pud(0)); >>> + WARN_ON(!pud_set_huge(pudp, __pfn_to_phys(pfn), prot)); >>> + WARN_ON(!pud_clear_huge(pudp)); >>> + pud = READ_ONCE(*pudp); >>> + WARN_ON(!pud_none(pud)); >>> } >>> -static void __init pmd_savedwrite_tests(unsigned long pfn, pgprot_t prot) { } >>> -#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ >>> +#else /* !CONFIG_HAVE_ARCH_HUGE_VMAP */ >>> +static void __init pmd_huge_tests(pmd_t *pmdp, unsigned long pfn, pgprot_t prot) { } >>> +static void __init pud_huge_tests(pud_t *pudp, unsigned long pfn, pgprot_t prot) { } >>> +#endif /* CONFIG_HAVE_ARCH_HUGE_VMAP */ >>> >>> static void __init p4d_basic_tests(unsigned long pfn, pgprot_t prot) >>> { >>> >> With changes to the commit message as suggested earlier. >> >> Reviewed-by: Anshuman Khandual >> > Hello Shixin, > > Wondering if you are planning to respin the series ? > > - Anshuman > . >