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=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 78DA2C433DB for ; Tue, 9 Feb 2021 06:19:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BA0C664E54 for ; Tue, 9 Feb 2021 06:19:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA0C664E54 Authentication-Results: mail.kernel.org; dmarc=none (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 3D1426B006E; Tue, 9 Feb 2021 01:19:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 381346B0070; Tue, 9 Feb 2021 01:19:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 296998D0001; Tue, 9 Feb 2021 01:19:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0140.hostedemail.com [216.40.44.140]) by kanga.kvack.org (Postfix) with ESMTP id 117816B006E for ; Tue, 9 Feb 2021 01:19:28 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C6546B78C for ; Tue, 9 Feb 2021 06:19:27 +0000 (UTC) X-FDA: 77797727574.03.war97_4f1716227605 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 8A5B928A4EC for ; Tue, 9 Feb 2021 06:19:27 +0000 (UTC) X-HE-Tag: war97_4f1716227605 X-Filterd-Recvd-Size: 2523 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Feb 2021 06:19:26 +0000 (UTC) Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DZXk91psxzMWrY; Tue, 9 Feb 2021 14:17:37 +0800 (CST) Received: from [10.174.179.149] (10.174.179.149) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Tue, 9 Feb 2021 14:19:17 +0800 Subject: Re: [PATCH] mm/hugetlb: Remove redundant VM_BUG_ON_PAGE on putback_active_hugepage() To: Mike Kravetz , CC: , References: <20210208083739.33178-1-linmiaohe@huawei.com> <7e1cdef7-e3cd-79c1-c30c-5f5e9e9f85ac@oracle.com> <90572a26-a55c-10d1-3c7e-bcdea1f32fe2@oracle.com> From: Miaohe Lin Message-ID: <6082fd02-b78e-804c-a240-ed3bd2a91c34@huawei.com> Date: Tue, 9 Feb 2021 14:19:02 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <90572a26-a55c-10d1-3c7e-bcdea1f32fe2@oracle.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.149] X-CFilter-Loop: Reflected 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: Hi: On 2021/2/9 11:39, Mike Kravetz wrote: > On 2/8/21 6:10 PM, Miaohe Lin wrote: >> Hi: >> On 2021/2/9 9:26, Mike Kravetz wrote: >>> On 2/8/21 12:37 AM, Miaohe Lin wrote: >>>> PageHead(page) is implicitly checked in set_page_huge_active() via the >>>> PageHeadHuge(page) check. So remove this explicit one. >>> >>> I do not disagree with the code change. However, this commit message >>> is not accurate. set_page_huge_active() no longer exists in the tree >>> you are changing. It was replaced with SetHPageMigratable. Also, the >>> VM_BUG_ON_PAGE(!PageHeadHuge(page), page) was removed in the process. >>> So, there is no redundant check. >>> >>> However, a quick audit of calling code reveals that all callers know they >>> are operating on a hugetlb head page. >>> >> >> So I should change the commit log like: >> >> All callers know they are operating on a hugetlb head page. So this VM_BUG_ON_PAGE >> can't catch anything useful. >> >> and send a v2. Right? > > Correct, > Will do. Thanks a lot.