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 EC193C433F5 for ; Thu, 12 May 2022 02:20:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 741508D0003; Wed, 11 May 2022 22:20:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F1F78D0001; Wed, 11 May 2022 22:20:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5E0CE8D0003; Wed, 11 May 2022 22:20:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 4C73A8D0001 for ; Wed, 11 May 2022 22:20:04 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 22F253047F for ; Thu, 12 May 2022 02:20:04 +0000 (UTC) X-FDA: 79455485928.11.2FFE225 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf13.hostedemail.com (Postfix) with ESMTP id A151C200AA for ; Thu, 12 May 2022 02:19:45 +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 3CE4060E26; Thu, 12 May 2022 02:20:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 478C9C34113; Thu, 12 May 2022 02:20:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1652322001; bh=JfwZ2pwW5nLhYNwObsjPgvyS/UJ8orNHcTY7KYaw6sA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cHpUR9Lw7xgMxAuGTStnfVwconAUReWk29VSvUL9d2P/lW6z8GT3yZUm8pfV8IFrE r3E9xK4S/iEMQY7PR6fBC7j5bWPOKgg369M3bT5xzYs/X7RfkoyzzWtbPRUVfK8ICu X1H/OCcuhNb3UoITPP27qQvN9eYeik2vUO0gQ/T0= Date: Wed, 11 May 2022 19:20:00 -0700 From: Andrew Morton To: Rei Yamamoto Cc: linmiaohe@huawei.com, aquini@redhat.com, ddutile@redhat.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: <20220511192000.d4851d55c5560e720e1e2914@linux-foundation.org> In-Reply-To: <20220512014736.16376-1-yamamoto.rei@jp.fujitsu.com> References: <07e0ceb8-a637-b011-bbf6-ba760a0b12e4@huawei.com> <20220512014736.16376-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-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: A151C200AA Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=cHpUR9Lw; spf=pass (imf13.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspam-User: X-Stat-Signature: o4wiqfyiy1mcseerrrmpo3egn1sw8jse X-HE-Tag: 1652321985-176432 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 10:47:36 +0900 Rei Yamamoto wrote: > ... > > > Sorry, I think you're right. And could you please add the runtime effect of this issue? > > > > Anyway, this patch looks good to me now. Thanks! > > 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. Thanks. I updated the changelog thusly: : At present, pages not in the target zone are added to cc->migratepages : list in isolate_migratepages_block(). As a result, pages may migrate : between nodes unintentionally. : : Avoid returning a pfn outside the target zone in the case that it is : not aligned with a pageblock boundary. Otherwise : isolate_migratepages_block() will handle pages not in the target zone.