Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3265394iob; Mon, 16 May 2022 17:34:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlbZRbuz0WaYBBPCCt9YFMGGGEtUaUJDBVr7gQQyG/SYusgF2uITAxRdxvYoEytTmu1EPz X-Received: by 2002:aa7:d3c5:0:b0:42a:ab58:1e50 with SMTP id o5-20020aa7d3c5000000b0042aab581e50mr10371659edr.320.1652747690879; Mon, 16 May 2022 17:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652747690; cv=none; d=google.com; s=arc-20160816; b=TGfO2CHu8kdbaKrnRp7CHl989R5TMWC0Ft4wTVZHvpZ4INFhoTczFEGgmyG0+tEeAi cB2q0I2X+dABr9hgAK9l2L2TQAbla4APSHvhWT7yY+qycWtBizzeXSTq7PSkhZzljJv/ Tz6XEC6ZBq9yWSmyR1uEyOAAj/YBqVJu/+NwXcTPjzW/sMAvwJcs7LGpgRfkwDue+Ltp q6IvG+pzGF8RRmKtixkWj5vDED/eOtaCoiJAQqB0xzw7g54RZMyEu6OMcvYYRPTUA6EL +wsiQWGkzOqWrvKkq1fnC9GLsg9Y7N8c7y1hTiCnw/pN4z8biemL1JdkZuVu71eqjDhd J1Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=8Dy7QsEH4NzVHeNDu5Ndagng92/od6QI0fMu74yG82Y=; b=YPlWjGPSnRU5dmZYaljy4OFMLNAWZVl8vS7bXrNIgoI0GJ6xAzvKye1FdxZZ/v/kUK yLG69OVocucacxezDqp+l60LlI2eC6TJ0/RdYvCFneF0nyvotA9utFqMK8UvbUmfgsDV sRTZJ2zRgKRAn0Ybb0GxrByzRJoCOPdpLgyzJZtgFKGTaX/why5/OkCfCDBfA9/sipvF jAzwzbmSSjZMLVOvvM2wgh58ckNitcREDSoqtPmhHP04tyC47pNYODNqyMJeVWoP1QY5 KCiVVLmfnS2/XIwbKwegYNp1iATENSfwfLp2iGBVVc+/sRHU77E0PI4fBRhe7HVQEoly 141Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r17-20020a05640251d100b00425e6997464si13674092edd.203.2022.05.16.17.34.25; Mon, 16 May 2022 17:34:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239537AbiEPDDG (ORCPT + 99 others); Sun, 15 May 2022 23:03:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239528AbiEPDDC (ORCPT ); Sun, 15 May 2022 23:03:02 -0400 X-Greylist: delayed 63 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sun, 15 May 2022 20:03:00 PDT Received: from esa9.hc1455-7.c3s2.iphmx.com (esa9.hc1455-7.c3s2.iphmx.com [139.138.36.223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7898558D for ; Sun, 15 May 2022 20:02:59 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6400,9594,10348"; a="60951355" X-IronPort-AV: E=Sophos;i="5.91,229,1647270000"; d="scan'208";a="60951355" Received: from unknown (HELO oym-r1.gw.nic.fujitsu.com) ([210.162.30.89]) by esa9.hc1455-7.c3s2.iphmx.com with ESMTP; 16 May 2022 12:01:54 +0900 Received: from oym-m1.gw.nic.fujitsu.com (oym-nat-oym-m1.gw.nic.fujitsu.com [192.168.87.58]) by oym-r1.gw.nic.fujitsu.com (Postfix) with ESMTP id 3D8FB1CFC7C for ; Mon, 16 May 2022 12:01:54 +0900 (JST) Received: from m3004.s.css.fujitsu.com (m3004.s.css.fujitsu.com [10.128.233.124]) by oym-m1.gw.nic.fujitsu.com (Postfix) with ESMTP id 18FD0D996B for ; Mon, 16 May 2022 12:01:53 +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-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SORTED_RECIPS,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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