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 A0129C433F5 for ; Fri, 13 May 2022 21:01:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AF1648D0007; Fri, 13 May 2022 17:01:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A79DB8D0002; Fri, 13 May 2022 17:01:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8F3C18D0007; Fri, 13 May 2022 17:01:44 -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 76FCE8D0002 for ; Fri, 13 May 2022 17:01:44 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 4584712065C for ; Fri, 13 May 2022 21:01:44 +0000 (UTC) X-FDA: 79461941328.18.FB23B7E Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf05.hostedemail.com (Postfix) with ESMTP id BB3611000BA for ; Fri, 13 May 2022 21:01:23 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BEDA461F5C; Fri, 13 May 2022 21:01:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D309BC34113; Fri, 13 May 2022 21:01:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1652475702; bh=K30XMESHglCJLbQuyFBmL05TFQc8cKlakkW76H42nlc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Il8ZJG9tgo+mG6W51u/73e0HJDadPxdS1p8DITFOz144F+OCYHqklMgcUw2adM+Zy BLGfrMgtrDmLLE7GNtTq9f3uwGH2tV4+mcKus8lOKgLCVo05V1UIhgeZ/BuJah8Msb 7+I0nMgMMs8m2K00P/7JlVqCUuj/qRTnkOjwjmSM= Date: Fri, 13 May 2022 14:01:41 -0700 From: Andrew Morton To: Rei Yamamoto 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 Subject: Re: [PATCH] mm, compaction: fast_find_migrateblock() should return pfn in the target zone Message-Id: <20220513140141.3b2accfc8fbae08ec4177781@linux-foundation.org> In-Reply-To: <20220513041112.31609-1-yamamoto.rei@jp.fujitsu.com> References: <20220512134945.fe74df5e322b98ae4046ce15@linux-foundation.org> <20220513041112.31609-1-yamamoto.rei@jp.fujitsu.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: b3xiskbnu7gztmggn5bhbah7z9y8eee4 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: BB3611000BA X-Rspam-User: Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=Il8ZJG9t; dmarc=none; spf=pass (imf05.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1652475683-774898 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 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?