Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1000065imc; Mon, 11 Mar 2019 04:22:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwnOmzAqHkZnWqXznP7X+mKgBe/PWGGBXe382glZ4GQ/7cy+P4dLUM53FO8gg8Cv0HE4nsk X-Received: by 2002:a63:4206:: with SMTP id p6mr30104446pga.26.1552303376015; Mon, 11 Mar 2019 04:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552303376; cv=none; d=google.com; s=arc-20160816; b=agbPDQ04Z1DdYBGbfKNyfY5idUPjmKJqkdqdckNViZY7BKWqS1rJkvwN1dJKqJjC74 IAlRHcDVE7colzWELpBHvqiUVgpnejzqM/S5pbYwCJvtHsfaqbOh5DBYMM892OFaaK61 6oZ0vpvrpw0Q72JG7/y3Oy5zDOxHmbywlXWag9Dm0M7QjkofTDzCsMCCH3+kotXbjk5a qo172uXd8rvTUiuyi49wueoMTZDIfiyFA6icySAVKDQNVbSsT8JS1R7VOjHE1GSVj05W tag4V5bbilDf1w6toFeX12Dis06Q+GHFnYnZsqizDbSujydHdazDXFDaikf3RPXK9HOb yNRw== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=V7KvQJVfMyuHJJopiQ1mG3Lbgtsi0/OmlyDfYBCBs0E=; b=DPlHNij6jS7a76I9ACIjTCvkHdU9nas0rDM+cFuyH0GVf2M3HvDBXrZRwwob5dQB+D Ohm5iVdt5VVsAbpUifmx+0iNOuX/HMzjOO00+AVjHkWOi6uYeVahSuSvclf8MUtID7PW wWSfcpnOde3uxo91QurG7yE/30FKsGSzvdiQnmQTlIp3Nl8SVamSV0DzuvJxNmA8KTew l9yLPqU5VVfqi3hnMtargxwiofTe4K7AswbFl/cQKBc4h2J2qbnCoV9skI/VRdjlJVbK /N09OvVsCf52muTvBwfo3zLCLD7TPAy91yY8OtrHW+Vg553Nd0CWLuFpxxpnxCgXwzJw gjSQ== 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 24si4958005pgl.359.2019.03.11.04.22.40; Mon, 11 Mar 2019 04:22:56 -0700 (PDT) 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 S1727388AbfCKLWK (ORCPT + 99 others); Mon, 11 Mar 2019 07:22:10 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:57124 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727250AbfCKLWJ (ORCPT ); Mon, 11 Mar 2019 07:22:09 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 8D0C5B8C6C6F8FFD30DB; Mon, 11 Mar 2019 19:22:07 +0800 (CST) Received: from localhost (10.202.226.61) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.408.0; Mon, 11 Mar 2019 19:22:03 +0800 Date: Mon, 11 Mar 2019 11:21:52 +0000 From: Jonathan Cameron To: Keith Busch CC: , , , , Greg Kroah-Hartman , Rafael Wysocki , "Dave Hansen" , Dan Williams Subject: Re: [PATCHv7 08/10] acpi/hmat: Register performance attributes Message-ID: <20190311112152.0000639c@huawei.com> In-Reply-To: <20190227225038.20438-9-keith.busch@intel.com> References: <20190227225038.20438-1-keith.busch@intel.com> <20190227225038.20438-9-keith.busch@intel.com> Organization: Huawei X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.61] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 27 Feb 2019 15:50:36 -0700 Keith Busch wrote: > Save the best performace access attributes and register these with the performance > memory's node if HMAT provides the locality table. While HMAT does make > it possible to know performance for all possible initiator-target > pairings, we export only the local pairings at this time. > > Acked-by: Rafael J. Wysocki > Signed-off-by: Keith Busch Jonathan > --- > drivers/acpi/hmat/Kconfig | 5 ++++- > drivers/acpi/hmat/hmat.c | 10 +++++++++- > 2 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/drivers/acpi/hmat/Kconfig b/drivers/acpi/hmat/Kconfig > index 13cddd612a52..95a29964dbea 100644 > --- a/drivers/acpi/hmat/Kconfig > +++ b/drivers/acpi/hmat/Kconfig > @@ -2,7 +2,10 @@ > config ACPI_HMAT > bool "ACPI Heterogeneous Memory Attribute Table Support" > depends on ACPI_NUMA > + select HMEM_REPORTING > help > If set, this option has the kernel parse and report the > platform's ACPI HMAT (Heterogeneous Memory Attributes Table), > - and register memory initiators with their targets. > + register memory initiators with their targets, and export > + performance attributes through the node's sysfs device if > + provided. > diff --git a/drivers/acpi/hmat/hmat.c b/drivers/acpi/hmat/hmat.c > index bb6a11653729..5b469c98a454 100644 > --- a/drivers/acpi/hmat/hmat.c > +++ b/drivers/acpi/hmat/hmat.c > @@ -549,12 +549,20 @@ static __init void hmat_register_target_initiators(struct memory_target *target) > } > } > > +static __init void hmat_register_target_perf(struct memory_target *target) > +{ > + unsigned mem_nid = pxm_to_node(target->memory_pxm); > + node_set_perf_attrs(mem_nid, &target->hmem_attrs, 0); > +} > + > static __init void hmat_register_targets(void) > { > struct memory_target *target; > > - list_for_each_entry(target, &targets, node) > + list_for_each_entry(target, &targets, node) { > hmat_register_target_initiators(target); > + hmat_register_target_perf(target); > + } > } > > static __init void hmat_free_structures(void)