Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp156320imp; Tue, 19 Feb 2019 20:40:20 -0800 (PST) X-Google-Smtp-Source: AHgI3IaR6RKS2bYpMQURAGqiAGEp8jMP15RleicIAqInEzUO/wuoXQSKJcQPJfntUeBpQt8D5e9J X-Received: by 2002:a17:902:7e49:: with SMTP id a9mr12807672pln.303.1550637620332; Tue, 19 Feb 2019 20:40:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550637620; cv=none; d=google.com; s=arc-20160816; b=ZJF3cqynN3r1f2yNirC7ehmb2QWhM4QjcghOd45FJwbIUdLq78I357FdBuMz5GONV+ beFHgE4jz6LUlkDfD7fuqSfkA6lY5G86wEm5k8E71WbFCzhYLM0OLmrFyVmSk1E7E/ST QOkTNzpUwnB7ez2q2+oV9I1Uf2NFlsNFOl7ty5JfvyiPW457cJ0QtLM67KUl/ToStsUJ TwumWmnMTepnDQ7Y89mW1Jg9VMMGRZZGk7YUnuRRkLViKn4QcF8c83xRaw/eiVIQL8FJ 2fl3eu6Jq8CxO8VYG7RJpMCUjYCaBqsRFFwiigYe/HTE5USKxeynH1l4QJkoDLcXeniw uLZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Cj0KznzWs5dqkkWAOilS7Mp4dDpFdC0jZuz+w76rPWY=; b=Ml7qVKYwesAziT00lRBzs6TnrhMZaxxdN17ZQqTox7miR/d+k1dPK7W/Vq3Wn3IIuW aqf5nzkuo1DTIBE4bSQdKlRSM2jY7rjj/pkqkauABsMqGAqQo20vIWZioC7gmlD+qODc APewz+9kSeSMF/Xxff/fDTOE2YaRxfwq2yzifaCQYzV0pHEXjcxiG01oKjUmNGLXcEyd smOJVvYKEVA3Fj4Giq5goaoWhgjHYxjovJ1SCUB9HMNwmS67pNdV5xhVDAOsxuoAVt0b 9s89AhA0cod1VNO43AMnXuhHu4PTa6TZq55/FYLAYw6YjckiIrXTgOl3gMVYMW+sTcjA u0bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q189si18016681pfb.62.2019.02.19.20.39.54; Tue, 19 Feb 2019 20:40:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730165AbfBTEii (ORCPT + 99 others); Tue, 19 Feb 2019 23:38:38 -0500 Received: from foss.arm.com ([217.140.101.70]:52290 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726952AbfBTEih (ORCPT ); Tue, 19 Feb 2019 23:38:37 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 35A33A78; Tue, 19 Feb 2019 20:38:37 -0800 (PST) Received: from [10.162.40.115] (p8cg001049571a15.blr.arm.com [10.162.40.115]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 49C113F720; Tue, 19 Feb 2019 20:38:33 -0800 (PST) Subject: Re: [RFC PATCH 01/31] mm: migrate: Add exchange_pages to exchange two lists of pages. To: Matthew Wilcox Cc: Zi Yan , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Dave Hansen , Michal Hocko , "Kirill A . Shutemov" , Andrew Morton , Mel Gorman , John Hubbard , Mark Hairgrove , Nitin Gupta , David Nellans References: <20190215220856.29749-1-zi.yan@sent.com> <20190215220856.29749-2-zi.yan@sent.com> <20190217112943.GP12668@bombadil.infradead.org> <65A1FFA0-531C-4078-9704-3F44819C3C07@nvidia.com> <2630a452-8c53-f109-1748-36b98076c86e@suse.cz> <53690FCD-B0BA-4619-8DF1-B9D721EE1208@nvidia.com> <20190218175224.GT12668@bombadil.infradead.org> <1ce6ae99-4865-df62-5f20-cb07ebb95327@arm.com> <20190219125619.GA12668@bombadil.infradead.org> From: Anshuman Khandual Message-ID: <749d5674-9e85-1fe9-4a3b-1d6ad06948b4@arm.com> Date: Wed, 20 Feb 2019 10:08:36 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190219125619.GA12668@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/19/2019 06:26 PM, Matthew Wilcox wrote: > On Tue, Feb 19, 2019 at 01:12:07PM +0530, Anshuman Khandual wrote: >> But the location of this temp page matters as well because you would like to >> saturate the inter node interface. It needs to be either of the nodes where >> the source or destination page belongs. Any other node would generate two >> internode copy process which is not what you intend here I guess. > That makes no sense. It should be allocated on the local node of the CPU > performing the copy. If the CPU is in node A, the destination is in node B > and the source is in node C, then you're doing 4k worth of reads from node C, > 4k worth of reads from node B, 4k worth of writes to node C followed by > 4k worth of writes to node B. Eventually the 4k of dirty cachelines on > node A will be written back from cache to the local memory (... or not, > if that page gets reused for some other purpose first). > > If you allocate the page on node B or node C, that's an extra 4k of writes > to be sent across the inter-node link. Thats right there will be an extra remote write. My assumption was that the CPU performing the copy belongs to either node B or node C.