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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_RED,USER_AGENT_SANE_1 autolearn=ham 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 D927AC43470 for ; Tue, 18 May 2021 10:06:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7CB96610FA for ; Tue, 18 May 2021 10:06:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CB96610FA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 80D908D000C; Tue, 18 May 2021 06:06:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7BD698D0001; Tue, 18 May 2021 06:06:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 682F48D000C; Tue, 18 May 2021 06:06:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0184.hostedemail.com [216.40.44.184]) by kanga.kvack.org (Postfix) with ESMTP id 3BF1F8D0001 for ; Tue, 18 May 2021 06:06:46 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D99C0A8C7 for ; Tue, 18 May 2021 10:06:45 +0000 (UTC) X-FDA: 78153922770.21.78DFE41 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf24.hostedemail.com (Postfix) with ESMTP id 4730EA000387 for ; Tue, 18 May 2021 10:06:43 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A5D7A1FB; Tue, 18 May 2021 03:06:44 -0700 (PDT) Received: from [192.168.0.130] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E8F3C3F719; Tue, 18 May 2021 03:06:42 -0700 (PDT) Subject: Re: [PATCH] mm/debug_vm_pgtable: Ensure THP availability via has_transparent_hugepage() To: Christophe Leroy , linux-mm@kvack.org, akpm@linux-foundation.org Cc: "Aneesh Kumar K . V" , linux-kernel@vger.kernel.org References: <1621325590-18199-1-git-send-email-anshuman.khandual@arm.com> <8b9cb771-8fa1-4fc2-bb45-20673240edd8@csgroup.eu> From: Anshuman Khandual Message-ID: <4f1e1a56-2820-cbf4-d5a6-0ed7715afd9b@arm.com> Date: Tue, 18 May 2021 15:37:27 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <8b9cb771-8fa1-4fc2-bb45-20673240edd8@csgroup.eu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Rspamd-Queue-Id: 4730EA000387 Authentication-Results: imf24.hostedemail.com; dkim=none; spf=pass (imf24.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com X-Rspamd-Server: rspam03 X-Stat-Signature: tsrnujxgiwgi43d6a1xz564knprbe71b X-HE-Tag: 1621332403-829776 Content-Transfer-Encoding: quoted-printable 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: On 5/18/21 2:20 PM, Christophe Leroy wrote: >=20 >=20 > Le 18/05/2021 =C3=A0 10:13, Anshuman Khandual a =C3=A9crit=C2=A0: >> On certain platforms, THP support could not just be validated via the = build >> option CONFIG_TRANSPARENT_HUGEPAGE. Instead has_transparent_hugepage()= also >> needs to be called upon to verify THP runtime support. Otherwise the d= ebug >> test might just run into unusable THP helpers like in the case of a 4K= hash >=20 > s/might/will/ Sure, will replace. >=20 >> config on powerpc platform [1]. This just moves all pfn_pmd() and pfn_= pud() >> after THP runtime validation with has_transparent_hugepage() which pre= vents >> the mentioned problem. >> >> [1] https://bugzilla.kernel.org/show_bug.cgi?id=3D213069 >> >> Cc: Aneesh Kumar K.V >> Cc: Christophe Leroy >> Cc: Andrew Morton >> Cc: linux-mm@kvack.org >> Cc: linux-kernel@vger.kernel.org >> Signed-off-by: Anshuman Khandual >=20 > There should be a Fixes:=C2=A0 tag Considering pmd_basic_tests() as the earliest test which is being impacted here, this actually fixes an earlier fix which tried the very same thing but was probably not complete. But it also applies to portions of advanced tests which came later on as well, which should have taken this problem into account. Fixes: 787d563b8642 ("mm/debug_vm_pgtable: fix kernel crash by checking f= or THP support") >=20 >> --- >> This applies on v5.13-rc2 after the following patches. >> >> [1] https://lore.kernel.org/linux-mm/20210419071820.750217-1-liushixin= 2@huawei.com/ >> [2] https://lore.kernel.org/linux-mm/20210419071820.750217-2-liushixin= 2@huawei.com/ >=20 > I can't see any fixes: tag in those patches, and their subject line eve= n targets them to -next. Are they meant to go to 5.13 and stable ? >=20 > If not, how do you coordinate between your patch that must go in 5.13 a= nd in stable, and those two patches ? Shouldn't your patch go first and t= hose other patches be rebased on top ? Right, will rebase this patch on v5.13-rc2 directly without those two patches. Hence this can be merged in v5.13 and backported to stable if required.