Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2238460imu; Fri, 23 Nov 2018 06:28:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/UODCcHCvQShBOrarwS0/mFP+1nYe3mVjcA58l70wBQQ0kaTb1XH78yoDytqQjwCdIrHuWA X-Received: by 2002:a63:d047:: with SMTP id s7mr14199411pgi.311.1542983330342; Fri, 23 Nov 2018 06:28:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542983330; cv=none; d=google.com; s=arc-20160816; b=yxnnizqOmwXBhfdl4mJ2x4/5ltPZ/mAbYNbyJE61iJ6Rt/cK7e2ftaJ/1EcMWdfPGZ VIt1+9U4KYwWgg3+c9PcsjGSWWMyJivzfla5myp1lJxF0EZuysBV/1eC0EugzvareLme rHenQZyxwBOKWczUpgnG8CTPOadbZnQNMVR0DU6k16SDJjuuYG29uzxhsqJ9tJmCfS4M D0AnW6sXN9gi7nqDtSyUnM2CFS4FeXIPrC5BojC2BdpqdjfoLL/ZVehRW54B0bCVRa4s zRR4M91ri/ojemL0XJW8CT091Ye/HJ70ZXiyTnbPbwYyFpo25IgWrftHwcGB4oIilo3u SnGA== 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=bxMOQDZksGQgTWyHFMrRtBrqy9ZPJC2nKZT0tdLtFk8=; b=apTHckR3Lx8MAcDjXUgk726VE4y263ce1IhGSEEyOiBbaFrUJWlOjOY7TK8O0A4hdv CvHzk6Rb4qff/O5kCumZXqPV1nYM6VoiFuioQTpkYtjJYVj1s33/17l4vQC8Yf2Qutf/ R4w1B4hTuODDUJvHEEn++cZOxAy9DHZXoyhdg/+57YdG6aI8o4/KRHYWw/cDIlAHAH86 JUbpIrHBFnRkNHZDZugKT45I4H2kEMyzHdZd3pnnocCLDNuGwr4o3H3DsNnmdAAuc8Pv 75Uj4+Klwwqj6c4nsCuFek601v6AhLHFr3n1xUKL/HU6E++FY/cSiHjtdRN9my7uD1sy L3uA== 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 n11si37941595pgj.373.2018.11.23.06.28.32; Fri, 23 Nov 2018 06:28:50 -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 S2436791AbeKWACF (ORCPT + 99 others); Thu, 22 Nov 2018 19:02:05 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:48340 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732181AbeKWACF (ORCPT ); Thu, 22 Nov 2018 19:02:05 -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 6BB303622; Thu, 22 Nov 2018 05:22:45 -0800 (PST) Received: from [10.1.26.189] (p8cg001049571a15.cambridge.arm.com [10.1.26.189]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 09F9E3F5AF; Thu, 22 Nov 2018 05:22:43 -0800 (PST) Subject: Re: [PATCH 2/7] node: Add heterogenous memory performance To: Keith Busch Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-mm@kvack.org, Greg Kroah-Hartman , Rafael Wysocki , Dave Hansen , Dan Williams References: <20181114224921.12123-2-keith.busch@intel.com> <20181114224921.12123-3-keith.busch@intel.com> <91369e94-d389-7cb9-6274-f46c9ec779d3@arm.com> <20181119154604.GC23062@localhost.localdomain> From: Anshuman Khandual Message-ID: <2482fbdf-e672-8d46-edcb-021f7af8d9b7@arm.com> Date: Thu, 22 Nov 2018 18:52:43 +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: <20181119154604.GC23062@localhost.localdomain> 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 11/19/2018 09:16 PM, Keith Busch wrote: > On Mon, Nov 19, 2018 at 09:05:07AM +0530, Anshuman Khandual wrote: >> On 11/15/2018 04:19 AM, 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 >> >> There are other properties like power consumption, reliability which can >> be associated with a particular PA range. Also the set of properties has >> to be extensible for the future. > > Sure, I'm just starting with the attributes available from HMAT, > If there are additional possible attributes that make sense to add, I > don't see why we can't continue appending them if this patch is okay. As I mentioned on the other thread 1) The interface needs to be compact to avoid large number of files 2) Single U64 will be able to handle 8 attributes with 8 bit values 3) 8 bit value needs needs to be arch independent and abstracted out I guess 8 attributes should be good enough for all type of memory in foreseeable future. > >>> 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. >> >> Right but each (memory initiator, memory target) should have these above >> mentioned properties enumerated to have an 'property as seen' from kind >> of semantics. >> >>> >>> 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. >> >> As mentioned above the interface must enumerate a future extensible set >> of properties for each (memory initiator, memory target) pair available >> on the system. > > That seems less friendly to use if forces the application to figure out > which CPU is the best for a given memory node rather than just provide > that answer directly. Why ? The application would just have to scan all possible values out there and decide for itself. A complete set of attribute values for each pair makes the sysfs more comprehensive and gives the application more control over it's choices. > >>> The memory's compute node should be symlinked in sysfs as one of the >>> node's initiators. >> >> Right. IIUC the first patch skips the linking process of for two nodes A >> and B if (A == B) preventing association to local memory initiator. > > Right, CPUs and memory sharing a proximity domain are assumed to be > local to each other, so not going to set up those links to itself. But this will be required for applications to evaluate correctly between possible values from all node pairs.