Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp227094pxb; Tue, 2 Feb 2021 03:45:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxJxit24tcmyGORSSCwfqOXsB3CaG8EAxYMuF/mm5UsDGK/NKLiRotlqqKOHBZzYetUfMT X-Received: by 2002:a17:906:828a:: with SMTP id h10mr22227435ejx.274.1612266335004; Tue, 02 Feb 2021 03:45:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612266334; cv=none; d=google.com; s=arc-20160816; b=gOUFWPTtkWu8ula2sqaXIALmoh8GWPjflzxwepScNarJPrKV7ZyuWJqGrhuEcEW3gc U5d3KpYI+o7lQELaTyGuLaxh2C5538jOTzRDTK9tbJ9eyfp5q1c6TxrTdN9V+aM0paXB by3P9fTKw+JXoEwka8YnKRn/3exdPQwZYUrAmXICnfxueFj3LpDUY6mLNda6+CyZkZGP 6BHwBgVQkJ2eAIlcBJ499qoJooxwC++7PYjUfZQqExCG13JGWVoGR7R730KdtfrzbTL5 36lwquRkSeZiDvAWXPSkI3hNUL3GoKelvjDutThv5XXBMUwqxDUckNXg5pahHsno+Tg9 a7ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=UXhiCuXD8t42R2DIFSIHFpLwqs6Ta9yoIYCPF4QCwaA=; b=Jf8Ei3YUD8q7yk/vZwC/4f9YZ4vpGicMQcSu8M97V2Aho0if8co7aw7cS4OF3SwEoe AhguM5VGw20UvjMrV/EHPEp7TVQkEBCHhwQ5tn9bMniD0hHrKLJSEtxno6m0vOXdW6m5 eVC7B34i74OOfgTcbmPig9rLmlIwuCMy/sZZjv78icKXQPsz/BDjHYr1bdfHZbFG4jDV OEPkNCticE1DOU6BTxgSM01sAhrfKT+RO2nwJ3klWbjzq/OLtSbmXBDgr11tPmmzw092 L97phMQ4ShrsR5GjX8YnWSEMcYUaZ1TvCtdX+zY29gKyw4Nf8V2oe3D/3bP493DFQhBH XSdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z21si14200285edi.577.2021.02.02.03.45.10; Tue, 02 Feb 2021 03:45:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231196AbhBBLn6 (ORCPT + 99 others); Tue, 2 Feb 2021 06:43:58 -0500 Received: from mx2.suse.de ([195.135.220.15]:48386 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230518AbhBBLnq (ORCPT ); Tue, 2 Feb 2021 06:43:46 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B4CE6AD37; Tue, 2 Feb 2021 11:43:05 +0000 (UTC) Date: Tue, 2 Feb 2021 12:43:03 +0100 From: Oscar Salvador To: Dave Hansen Cc: Yang Shi , Dave Hansen , Linux Kernel Mailing List , Linux MM , Yang Shi , David Rientjes , Huang Ying , Dan Williams , David Hildenbrand Subject: Re: [RFC][PATCH 05/13] mm/numa: automatically generate node migration order Message-ID: <20210202114302.GB12139@linux> References: <20210126003411.2AC51464@viggo.jf.intel.com> <20210126003421.45897BF4@viggo.jf.intel.com> <317d4c23-76a7-b653-87a4-bab642fa1717@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <317d4c23-76a7-b653-87a4-bab642fa1717@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 01, 2021 at 11:13:14AM -0800, Dave Hansen wrote: > Sure. Were you thinking of a code comment, or enhanced changelog? > > Let's say there's a system with two sockets each with the same three > classes of memory: fast, medium and slow. Each memory class is placed > in its own NUMA node and the CPUs are attached to the fast memory. That > leaves 6 NUMA nodes (0-5): > > Socket A: 0, 1, 2 > Socket B: 3, 4, 5 > > The migration path for this configuration path would start on the nodes > with the processors and fast memory, progress through medium and end > with the slow memory: > > 0 -> 1 -> 2 -> stop > 3 -> 4 -> 5 -> stop > > This is represented in the node_demotion[] like this: > > { 1, // Node 0 migrates to 1 > 2, // Node 1 migrates to 2 > -1, // Node 2 does not migrate > 4, // Node 3 migrates to 1 > 5, // Node 4 migrates to 2 > -1} // Node 5 does not migrate > > Is that what you were thinking of? I would not mind to have the above explanation in a comment somewhere in the code. -- Oscar Salvador SUSE L3