Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp228578imu; Tue, 27 Nov 2018 11:28:26 -0800 (PST) X-Google-Smtp-Source: AJdET5dMqXDdkmj66y7yFUQFNB1ojyrk+fvp7pG4ylEoRDOXOvAqub7pz6LHOssO1u4pX1kfgKsD X-Received: by 2002:a62:db41:: with SMTP id f62mr34843474pfg.123.1543346906032; Tue, 27 Nov 2018 11:28:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543346906; cv=none; d=google.com; s=arc-20160816; b=UnXhSG1EATP6FwDb/bG4ZieAS3wtc3ms9depok9T4KmOubY5SFrFhDTbObbrTW3e8o IYxrDTCTZSDQt99uDLwwEC/ALDYWPnJL1oKZ6fQWqskkBwBfvS4sR2MXMS0z9q3zYdA4 3Si5Z4gr0oPJkRStBz/2GzeA6PBsJ9hGyuWKPO6zV1ZsL5YI9lsmyXEs5fVJj6IXM6iA UiM1WtsBIYRMXHty2yTVpSMsrnnRdx/JuoRISy7O4KCpDieTsatuA9EjLspEhh+4QlLR jhzav2JHgo9XDtFYIwD/Lj/NYc1I9FLtayRbFx7Bqw7Ee20q4vKed6ugMZQEv8VDolY5 PF+w== 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=S02HXdFeuurazWYTJgtt5Wwu3tY+KwC2Ea6lkd30lQQ=; b=uq7u+aIFp1bz1f815vltQojKdHz8ENH6CPOHvbKJ4Y8rCAOM65i9vT61a+quu6PMV1 FX4tfYzZzzxvvKK3buujGiS3xTrilI/C+hcpp9lyqskUWAdpohPGtHe4hcJ+9Jc5G/iH dUTIDf43WPbQ6GRRz3R90ytnvKuzBA2Qn7Um/uGiT7bmxq87e2r+e0J0AlazOd2pUo4H 6CEQIP32iOcjV9X23OMCYidZcYu+vZeUWIbUfWOXitRVM/ladmLxMhnfmoLIoI59zPko okYHKs5Ek66sPHKKuLsL6NAn6U7O9ZISsNjxqM3B2lP01JCXvdYgdOeYo9gEz6VrEwCF YJFg== 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 f15-v6si4731095pff.131.2018.11.27.11.28.10; Tue, 27 Nov 2018 11:28:26 -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 S1731986AbeK1Eqi (ORCPT + 99 others); Tue, 27 Nov 2018 23:46:38 -0500 Received: from mga09.intel.com ([134.134.136.24]:24189 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726288AbeK1Eqi (ORCPT ); Tue, 27 Nov 2018 23:46:38 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2018 09:47:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,287,1539673200"; d="scan'208";a="277684420" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by orsmga005.jf.intel.com with ESMTP; 27 Nov 2018 09:47:57 -0800 Date: Tue, 27 Nov 2018 10:44:57 -0700 From: Keith Busch To: Dan Williams Cc: Linux Kernel Mailing List , Linux ACPI , Linux MM , Greg KH , "Rafael J. Wysocki" , "Hansen, Dave" Subject: Re: [PATCH 2/7] node: Add heterogenous memory performance Message-ID: <20181127174457.GB6401@localhost.localdomain> References: <20181114224921.12123-2-keith.busch@intel.com> <20181114224921.12123-3-keith.busch@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Mon, Nov 26, 2018 at 11:00:09PM -0800, Dan Williams wrote: > On Wed, Nov 14, 2018 at 2:53 PM Keith Busch wrote: > > > > Heterogeneous memory systems provide memory nodes with latency > > and bandwidth performance attributes that are different from other > > nodes. Create an interface for the kernel to register these attributes > > under the node that provides the memory. If the system provides this > > information, applications can query the node attributes when deciding > > which node to request memory. > > > > When multiple memory initiators exist, accessing the same memory target > > from each may not perform the same as the other. The highest performing > > initiator to a given target is considered to be a local initiator for > > that target. The kernel provides performance attributes only for the > > local initiators. > > > > The memory's compute node should be symlinked in sysfs as one of the > > node's initiators. > > > > The following example shows the new sysfs hierarchy for a node exporting > > performance attributes: > > > > # tree /sys/devices/system/node/nodeY/initiator_access > > /sys/devices/system/node/nodeY/initiator_access > > |-- read_bandwidth > > |-- read_latency > > |-- write_bandwidth > > `-- write_latency > > With the expectation that there will be nodes that are initiator-only, > target-only, or both I think this interface should indicate that. The > 1:1 "local" designation of HMAT should not be directly encoded in the > interface, it's just a shortcut for finding at least one initiator in > the set that can realize the advertised performance. At least if the > interface can enumerate the set of initiators then it becomes clear > whether sysfs can answer a performance enumeration question or if the > application needs to consult an interface with specific knowledge of a > given initiator-target pairing. > > It seems a precursor to these patches is arranges for offline node > devices to be created for the ACPI proximity domains that are > offline-by default for reserved memory ranges. The intention is that all initiators symlinked to the memory node share the initiator_access attributes, as well as itself the node is its own initiator. There's no limit to how many the new kernel interface in patch 1/7 allows you to register, so it's not really a 1:1 relationship. Either instead or in addition to the symlinks, we can export a node_mask in the initiator_access directory for which these access attributes apply if that makes the intention more clear.