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 BF86EC433F5 for ; Mon, 16 May 2022 03:01:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 321556B0073; Sun, 15 May 2022 23:01:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D0386B0075; Sun, 15 May 2022 23:01:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 198196B0078; Sun, 15 May 2022 23:01: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 06F446B0073 for ; Sun, 15 May 2022 23:01:57 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id C3C39327A0 for ; Mon, 16 May 2022 03:01:56 +0000 (UTC) X-FDA: 79470106632.12.758E61F Received: from esa5.hc1455-7.c3s2.iphmx.com (esa5.hc1455-7.c3s2.iphmx.com [68.232.139.130]) by imf26.hostedemail.com (Postfix) with ESMTP id E98DB1400C3 for ; Mon, 16 May 2022 03:01:52 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6400,9594,10348"; a="72477291" X-IronPort-AV: E=Sophos;i="5.91,229,1647270000"; d="scan'208";a="72477291" Received: from unknown (HELO yto-r4.gw.nic.fujitsu.com) ([218.44.52.220]) by esa5.hc1455-7.c3s2.iphmx.com with ESMTP; 16 May 2022 12:01:55 +0900 Received: from yto-m2.gw.nic.fujitsu.com (yto-nat-yto-m2.gw.nic.fujitsu.com [192.168.83.65]) by yto-r4.gw.nic.fujitsu.com (Postfix) with ESMTP id 0654ED3EAD for ; Mon, 16 May 2022 12:01:53 +0900 (JST) Received: from m3004.s.css.fujitsu.com (m3004.s.css.fujitsu.com [10.128.233.124]) by yto-m2.gw.nic.fujitsu.com (Postfix) with ESMTP id 56E33DADA0 for ; Mon, 16 May 2022 12:01:52 +0900 (JST) Received: from localhost.localdomain (unknown [10.125.5.220]) by m3004.s.css.fujitsu.com (Postfix) with ESMTP id 1E01D200B29C; Mon, 16 May 2022 12:01: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: Mon, 16 May 2022 11:41:22 +0900 Message-Id: <20220516024122.71543-1-yamamoto.rei@jp.fujitsu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220513140141.3b2accfc8fbae08ec4177781@linux-foundation.org> References: <20220513140141.3b2accfc8fbae08ec4177781@linux-foundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: E98DB1400C3 X-Stat-Signature: hxsd31e4dte7my5j7e1nd5fd8jpkwyrm Authentication-Results: imf26.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=fujitsu.com; spf=pass (imf26.hostedemail.com: domain of yamamoto.rei@jp.fujitsu.com designates 68.232.139.130 as permitted sender) smtp.mailfrom=yamamoto.rei@jp.fujitsu.com X-HE-Tag: 1652670112-722823 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 Fri, 13 May 2022 14:01:41 -0700 Andrew Morton wrote: > On Fri, 13 May 2022 13:11:12 +0900 Rei Yamamoto wrote: > >> 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, I added the above to the changelog. > > The patch applies OK to older kernels (I tried v5.10). So I guess we > put a cc:stable in this, so it gets backported? Sounds great. I think that's fine. Thanks, Rei