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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69B2DC433FE for ; Fri, 13 May 2022 04:31:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C29926B0078; Fri, 13 May 2022 00:31:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BB2246B007B; Fri, 13 May 2022 00:31:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A2AFA6B007D; Fri, 13 May 2022 00:31:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 8E1F76B0078 for ; Fri, 13 May 2022 00:31:57 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 5DE821203D4 for ; Fri, 13 May 2022 04:31:57 +0000 (UTC) X-FDA: 79459447074.09.31E28F0 Received: from esa12.hc1455-7.c3s2.iphmx.com (esa12.hc1455-7.c3s2.iphmx.com [139.138.37.100]) by imf24.hostedemail.com (Postfix) with ESMTP id E0E9B1800DA for ; Fri, 13 May 2022 04:31:47 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6400,9594,10345"; a="52298861" X-IronPort-AV: E=Sophos;i="5.91,221,1647270000"; d="scan'208";a="52298861" Received: from unknown (HELO oym-r4.gw.nic.fujitsu.com) ([210.162.30.92]) by esa12.hc1455-7.c3s2.iphmx.com with ESMTP; 13 May 2022 13:31:54 +0900 Received: from oym-m3.gw.nic.fujitsu.com (oym-nat-oym-m3.gw.nic.fujitsu.com [192.168.87.60]) by oym-r4.gw.nic.fujitsu.com (Postfix) with ESMTP id A7C99E07E1 for ; Fri, 13 May 2022 13:31:53 +0900 (JST) Received: from m3004.s.css.fujitsu.com (m3004.s.css.fujitsu.com [10.128.233.124]) by oym-m3.gw.nic.fujitsu.com (Postfix) with ESMTP id E7946D9471 for ; Fri, 13 May 2022 13:31:52 +0900 (JST) Received: from localhost.localdomain (unknown [10.125.5.220]) by m3004.s.css.fujitsu.com (Postfix) with ESMTP id 935B2203EEC0; Fri, 13 May 2022 13:31:52 +0900 (JST) From: Rei Yamamoto To: akpm@linux-foundation.org Cc: aquini@redhat.com, ddutile@redhat.com, linmiaohe@huawei.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mgorman@techsingularity.net, vvghjk1234@gmail.com, yamamoto.rei@jp.fujitsu.com Subject: Re: [PATCH] mm, compaction: fast_find_migrateblock() should return pfn in the target zone Date: Fri, 13 May 2022 13:11:12 +0900 Message-Id: <20220513041112.31609-1-yamamoto.rei@jp.fujitsu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220512134945.fe74df5e322b98ae4046ce15@linux-foundation.org> References: <20220512134945.fe74df5e322b98ae4046ce15@linux-foundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: E0E9B1800DA Authentication-Results: imf24.hostedemail.com; dkim=none; spf=pass (imf24.hostedemail.com: domain of yamamoto.rei@jp.fujitsu.com designates 139.138.37.100 as permitted sender) smtp.mailfrom=yamamoto.rei@jp.fujitsu.com; dmarc=pass (policy=none) header.from=fujitsu.com X-Rspam-User: X-Stat-Signature: 17qkkjap9bs683g3nuk8sctmasn1exjf X-HE-Tag: 1652416307-260879 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 Thu, 12 May 2022 13:49:45 -0700 Andrew Morton wrote: > On Thu, 12 May 2022 13:27:33 +0900 Rei Yamamoto wrote: > >> >> Thank you for your review. >> >> The runtime effect is that compaction become unintended behavior. >> >> For example, pages not in the target zone are added to cc->migratepages list in isolate_migratepages_block(). >> >> As a result, pages migrate between nodes unintentionally. >> > >> > Many thanks for clarifying. :) Is this worth a Fixes tag or even CC stable? >> > >> > Thanks! >> >> Thank you for your reply. >> >> If add a Fixes tag, I think the following commit: >> Fixes: 70b4459 ("mm, compaction: use free lists to quickly locate a migration source") >> >> Andrew, how do you think about this? > > Thanks, I added that and also a paragraph describing the effect of the bug: > > https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-compaction-fast_find_migrateblock-should-return-pfn-in-the-target-zone.patch > > I assume this problem isn't sufficiently serious to require a -stable > backport of the fix? This would be a serious problem for older kernels without commit a984226, because it can corrupt the lru list by handling pages in list without holding proper lru_lock. Thanks, Rei