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 A516AC433E0 for ; Tue, 9 Feb 2021 02:10:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 84FA064E25 for ; Tue, 9 Feb 2021 02:10:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84FA064E25 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 EED156B0071; Mon, 8 Feb 2021 21:10:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E74FC6B0072; Mon, 8 Feb 2021 21:10:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DB2218D0001; Mon, 8 Feb 2021 21:10:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0222.hostedemail.com [216.40.44.222]) by kanga.kvack.org (Postfix) with ESMTP id C50D96B0071 for ; Mon, 8 Feb 2021 21:10:07 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 8DD8B183F79AD for ; Tue, 9 Feb 2021 02:10:07 +0000 (UTC) X-FDA: 77797099254.07.steam97_1a184f627603 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 7589C183F7938 for ; Tue, 9 Feb 2021 02:10:07 +0000 (UTC) X-HE-Tag: steam97_1a184f627603 X-Filterd-Recvd-Size: 2244 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Tue, 9 Feb 2021 02:10:06 +0000 (UTC) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DZRBv6Xltz165bN; Tue, 9 Feb 2021 10:08:39 +0800 (CST) Received: from [10.174.179.149] (10.174.179.149) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.498.0; Tue, 9 Feb 2021 10:10:00 +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> From: Miaohe Lin Message-ID: Date: Tue, 9 Feb 2021 10:10:00 +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: <7e1cdef7-e3cd-79c1-c30c-5f5e9e9f85ac@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 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?