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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 543A4C433EF for ; Mon, 13 Sep 2021 12:59:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D0C9760FDA for ; Mon, 13 Sep 2021 12:59:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D0C9760FDA Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 489376B0071; Mon, 13 Sep 2021 08:59:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4388C6B0072; Mon, 13 Sep 2021 08:59:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 326DD900002; Mon, 13 Sep 2021 08:59:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0231.hostedemail.com [216.40.44.231]) by kanga.kvack.org (Postfix) with ESMTP id 216316B0071 for ; Mon, 13 Sep 2021 08:59:46 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D8B2025F27 for ; Mon, 13 Sep 2021 12:59:45 +0000 (UTC) X-FDA: 78582557130.14.409437C Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf25.hostedemail.com (Postfix) with ESMTP id 7BA33B00008E for ; Mon, 13 Sep 2021 12:59:45 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 283BD21D0D; Mon, 13 Sep 2021 12:59:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1631537984; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=G/tlWcoP9A24cTc3rdiSQ4RXTgCKXNy2vtw4XLRi7lQ=; b=hdc8wWXwUuu5JM2kELvLjga+XS6q8+5HeAU1zR087Qrv7NwPkNuT1Wfg51WVw8WH4bgNRO pNWNww1Gpvn7Lf5TCNCYGBv3CM3d0SKE/NOh6rUok6Um8FhJpsdUSK5OquDAN8+osWv7Ic JVvKvbu5PrTXsQtirlDvqg0ltwJuwnU= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id C7FF2A3B88; Mon, 13 Sep 2021 12:59:42 +0000 (UTC) Date: Mon, 13 Sep 2021 14:59:42 +0200 From: Michal Hocko To: Miaohe Lin Cc: David Hildenbrand , akpm@linux-foundation.org, vbabka@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm/page_isolation: fix potential missing call to unset_migratetype_isolate() Message-ID: References: <20210913115125.33617-1-linmiaohe@huawei.com> <6cb372ff-0b68-2143-913e-04ab3e6b4160@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6cb372ff-0b68-2143-913e-04ab3e6b4160@huawei.com> Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=hdc8wWXw; spf=pass (imf25.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 7BA33B00008E X-Stat-Signature: mcuppp7dmqj6991nipxg4hic5tqgxmir X-HE-Tag: 1631537985-968706 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 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 > > 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. -- Michal Hocko SUSE Labs