Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp480745iob; Fri, 13 May 2022 06:04:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcP1UDn9N85O/VReqr3XxtjWxd8mU8NTxFtyxS7O80l7/+rfHLZsVKhs56ZfeNu0C+/8hy X-Received: by 2002:a17:907:72cc:b0:6f4:cc8a:2bcd with SMTP id du12-20020a17090772cc00b006f4cc8a2bcdmr4246460ejc.532.1652447069381; Fri, 13 May 2022 06:04:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652447069; cv=none; d=google.com; s=arc-20160816; b=yz4PPNOVohQzxVmZ05dSk7O6brgoEoYyHJzMkse0UjStVW777CNBrhvcCMg9N82lL4 f1KuuspL+Gfa2nA+QCuaD4T4MVR6AS5PKWBfg/tM8fjd+DvsJIYww8XBZ9wJ/NuPZo8b BRrPv65VyQ729eS9sdIUMIgLViDBBcwhjG9M3weY/JSLtXuTYwd9idZYrVFV8FdYAd7B zhs7HEvVXUncK9VTcNSVGqf92kiXF2c3FKM9WpCztLe0/i7jsMD06p48sSQJT39gUB5N aJXYYS9uGpsr8EOA2ZaJsDfShogxqkV28lGmfjBXptuJI8f2WQznXgi8DxpG+dcsvJqn 0tKw== 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:subject:cc:to:from:date :dkim-signature; bh=GWF+a+x9l+Jtk4tOr1NXzLdWohiOJNhpa7Vc+xdm37A=; b=S+OGiM1HE4xrAGZgCpR+KhncAkc3KqHKXsJeQevFEjmTR2v6AYWXpg5jL8RmpKtFOB cquQLYbpn2rNFHv7DdSEIMm7hGCdRMywJgBUM9CKQFv77FEHomfpjsOkLec0OTZHK3WV RbL4KvdovPZ+3tGL3eqaAcwUD9n2RoaKg2Kk2RTVxpfFRFFWofZyQ7qv5qxEyf6v9ddK p0ijHbiwMVM83/ov9pIJHcLghFKKINzGGSgEpeUl+EAKNcj3SjDLfPWJLr+Lhpzv2zj4 Wsew3Qdhz6ySC1+ZOdbbeG31U5ovUVoqXJnNFPnKI0z68ShX9oMP34CPS7VmAt5JfHDA hG/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=cHpUR9Lw; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z19-20020a170906945300b006f38a179611si1717524ejx.580.2022.05.13.06.04.01; Fri, 13 May 2022 06:04:29 -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; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=cHpUR9Lw; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240587AbiELCUR (ORCPT + 99 others); Wed, 11 May 2022 22:20:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239106AbiELCUE (ORCPT ); Wed, 11 May 2022 22:20:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D58453B6E for ; Wed, 11 May 2022 19:20:02 -0700 (PDT) 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 3654160C7D for ; 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-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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.