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=-7.2 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 DDD50C433F5 for ; Tue, 14 Sep 2021 03:09:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 593EF6112E for ; Tue, 14 Sep 2021 03:09:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 593EF6112E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id A739A900002; Mon, 13 Sep 2021 23:09:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9FA8D6B0071; Mon, 13 Sep 2021 23:09:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 89A15900002; Mon, 13 Sep 2021 23:09:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0089.hostedemail.com [216.40.44.89]) by kanga.kvack.org (Postfix) with ESMTP id 7364B6B006C for ; Mon, 13 Sep 2021 23:09:53 -0400 (EDT) Received: from smtpin35.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 39AC7269AC for ; Tue, 14 Sep 2021 03:09:53 +0000 (UTC) X-FDA: 78584699466.35.36282A5 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf28.hostedemail.com (Postfix) with ESMTP id 3079E90000A1 for ; Tue, 14 Sep 2021 03:09:52 +0000 (UTC) Received: from dggeme703-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4H7pBC0cQdz8yW6; Tue, 14 Sep 2021 11:05:23 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) by dggeme703-chm.china.huawei.com (10.1.199.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.8; Tue, 14 Sep 2021 11:09:48 +0800 Subject: Re: [PATCH v2] mm/page_isolation: fix potential missing call to unset_migratetype_isolate() To: Michal Hocko , Andrew Morton CC: David Hildenbrand , , , References: <20210913115125.33617-1-linmiaohe@huawei.com> <6cb372ff-0b68-2143-913e-04ab3e6b4160@huawei.com> From: Miaohe Lin Message-ID: <1d0e15ab-4a1f-0820-26c2-4b9949164dfa@huawei.com> Date: Tue, 14 Sep 2021 11:09:47 +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: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggeme703-chm.china.huawei.com (10.1.199.99) X-CFilter-Loop: Reflected Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=huawei.com; spf=pass (imf28.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 3079E90000A1 X-Stat-Signature: 5tshke38f7rnxefrih3gfotj4ej3cktk X-HE-Tag: 1631588992-658022 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 2021/9/13 20:59, Michal Hocko wrote: > On Mon 13-09-21 20:43:35, Miaohe Lin wrote: >> On 2021/9/13 20:20, David Hildenbrand wrote: >>> On 13.09.21 14:12, Michal Hocko wrote: >>>> On Mon 13-09-21 19:51:25, Miaohe Lin wrote: >>>>> In start_isolate_page_range() undo path, pfn_to_online_page() just checks >>>>> the first pfn in a pageblock while __first_valid_page() will traverse the >>>>> pageblock until the first online pfn is found. So we may miss the call to >>>>> unset_migratetype_isolate() in undo path and pages will remain isolated >>>>> unexpectedly. Fix this by calling undo_isolate_page_range() and this will >>>>> also help to simplify the code further. >>>> >>>> I like the clean up part but is this a real problem that requires CC >>>> stable? Have you ever seen this to be a real problem? It looks like >>>> something based on reading the code. >> >> I'm sorry but I haven't seen this to be a real problem. It's a theoretical bug. > > Make it clear in the changelog Will do. > >>> We discussed that it isn't an issue anymore (we never call it on >>> memory holes), but might have been an issue on older kernels, back >>> when we didn't have the "memory holes" check in the memory offlining >>> path in place. >> >> So is the Cc:stable needed in this case? > > I do not think so. Even if this was happening in the practice then the > practical consequences would be pretty minor, right? (few pageblocks > stay isolated thus unavailable). > > I do realize that the stable tree is in a hoarding mode for quite some > years but my general approach has been (in line with the documentation) > to mark and backport only fixes that really do matter. So even the Fixes tag should be removed ? Many thanks. >