Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp815024imu; Fri, 16 Nov 2018 10:37:14 -0800 (PST) X-Google-Smtp-Source: AJdET5c5heN/hAS4THi8EMu13gh/cy5CzfSff6TrYjxhcsD7tm2Ye1EYs+HqtvnOVmfo66GhaGBu X-Received: by 2002:a63:c846:: with SMTP id l6mr10889597pgi.78.1542393434277; Fri, 16 Nov 2018 10:37:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542393434; cv=none; d=google.com; s=arc-20160816; b=VNwiJnhmSJPRe16K/Xb9W5olCN/VAqiXidcDmOkt055+ZhUzI7iaxW8BgTJYhBn43Q n3BIOdDOwLFXoXkou1/4KOwIfJ2i0bRymj1jJ5MFQeJ0Q+ElLjryxkvpnmhP00EZolyu RzUFtdfidaYniBCA2uwBiZYcHIRCE/QiZ1f3gl03rhpEs8ONoXKKS6JZ8/AzepC/Uw08 wsKHiO0hXpIaI8wEqVm1xdRO5DycxpKgygstnGqVugmkfTfR1WPi/rJwKc8AcIGhGk6b hCkyWeui2q1EvI4YBRfbBejUNILycyB/emyexKZ3MTETVKsCW7BAhB+GNOJkKbODcn56 PF3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=UA4iCVxg6xZ09uxePiAiBphQX0hWm9f5whd91pavi4Y=; b=DqmiwQ5a9YAmL+W9MsvsewJmSR11UkkCsAFXZFoScINj5lQuzZBLv7InkG9pRvuHUF +jB71RRzrCAj5UmhEN+f1U0BpTTzdCWpXXFP9CaYq6DS70hk95LEljeiyR1B+wofSaff ip6QfOzoW/CnrZzSuqjwDE4Kp+ysVO0U3nRao65ZWbuGr+9go05Tn4lqw45ye+Cc6q0M qn+PUnPguHJDFy+K73pw8eT/W26taSwTXsR2cHs8W5WU8Pcv585/ln3qpGnU9Uz2cqT/ AcXAJqKVGUJfUfhCFthdyKEijgL4KM24nWCH03nK/ORn41Txu6sq8FIAPLz7DHiY80GH Zx3A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j3-v6si31103739plk.23.2018.11.16.10.36.59; Fri, 16 Nov 2018 10:37:14 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390223AbeKQEtx (ORCPT + 99 others); Fri, 16 Nov 2018 23:49:53 -0500 Received: from mga04.intel.com ([192.55.52.120]:24601 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727710AbeKQEtx (ORCPT ); Fri, 16 Nov 2018 23:49:53 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Nov 2018 10:36:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,241,1539673200"; d="scan'208";a="274608130" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by orsmga005.jf.intel.com with ESMTP; 16 Nov 2018 10:36:17 -0800 Date: Fri, 16 Nov 2018 11:32:54 -0700 From: Keith Busch To: Matthew Wilcox Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-mm@kvack.org, Greg Kroah-Hartman , Rafael Wysocki , Dave Hansen , Dan Williams Subject: Re: [PATCH 1/7] node: Link memory nodes to their compute nodes Message-ID: <20181116183254.GD14630@localhost.localdomain> References: <20181114224921.12123-2-keith.busch@intel.com> <20181115135710.GD19286@bombadil.infradead.org> <20181115145920.GG11416@localhost.localdomain> <20181115203654.GA28246@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181115203654.GA28246@bombadil.infradead.org> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 15, 2018 at 12:36:54PM -0800, Matthew Wilcox wrote: > On Thu, Nov 15, 2018 at 07:59:20AM -0700, Keith Busch wrote: > > On Thu, Nov 15, 2018 at 05:57:10AM -0800, Matthew Wilcox wrote: > > > On Wed, Nov 14, 2018 at 03:49:14PM -0700, Keith Busch wrote: > > > > Memory-only nodes will often have affinity to a compute node, and > > > > platforms have ways to express that locality relationship. > > > > > > > > A node containing CPUs or other DMA devices that can initiate memory > > > > access are referred to as "memory iniators". A "memory target" is a > > > > node that provides at least one phyiscal address range accessible to a > > > > memory initiator. > > > > > > I think I may be confused here. If there is _no_ link from node X to > > > node Y, does that mean that node X's CPUs cannot access the memory on > > > node Y? In my mind, all nodes can access all memory in the system, > > > just not with uniform bandwidth/latency. > > > > The link is just about which nodes are "local". It's like how nodes have > > a cpulist. Other CPUs not in the node's list can acces that node's memory, > > but the ones in the mask are local, and provide useful optimization hints. > > So ... let's imagine a hypothetical system (I've never seen one built like > this, but it doesn't seem too implausible). Connect four CPU sockets in > a square, each of which has some regular DIMMs attached to it. CPU A is > 0 hops to Memory A, one hop to Memory B and Memory C, and two hops from > Memory D (each CPU only has two "QPI" links). Then maybe there's some > special memory extender device attached on the PCIe bus. Now there's > Memory B1 and B2 that's attached to CPU B and it's local to CPU B, but > not as local as Memory B is ... and we'd probably _prefer_ to allocate > memory for CPU A from Memory B1 than from Memory D. But ... *mumble*, > this seems hard. Indeed, that particular example is out of scope for this series. The first objective is to aid a process running in node B's CPUs to allocate memory in B1. Anything that crosses QPI are their own. > I understand you're trying to reflect what the HMAT table is telling you, > I'm just really fuzzy on who's ultimately consuming this information > and what decisions they're trying to drive from it. Intended consumers include processes using numa_alloc_onnode() and mbind(). Consider a system with faster DRAM and slower persistent memory. Such a system may group the DRAM in a different proximity domain than the persistent memory, and both are local to yet another proximity domain that contains the CPUs. HMAT provides a way to express that relationship, and this patch provides a user facing abstraction for that information.