Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp535879ima; Wed, 6 Feb 2019 04:25:52 -0800 (PST) X-Google-Smtp-Source: AHgI3IZvPHSrHE59fPJ7XHPiHgyr+XPq6yr5WbXLBJV7VGZfQDKpQqSBXpL6EYdqsQWgVmt1Z/Z5 X-Received: by 2002:a63:e5d:: with SMTP id 29mr9291298pgo.237.1549455952154; Wed, 06 Feb 2019 04:25:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549455952; cv=none; d=google.com; s=arc-20160816; b=DokyXEv/thQvj1T72ozW9T15HHU8q/0ueFm1rDkSrjmSlmyO/TUAcyhmp5dvTARFbG KZWOWZhPkdZ/8rrHsAUeJAHds0voJfpoN8XBnRRYiOgIBz56AxzWt4eLy28Kl3GR8Br4 /r6a4XX1BMbr2ZDQi4g53SFpFhBGU+IK1tr1zekI0BUxDoKHJtPE6wF1TjCW3DC/rV3a XEVVKpqzG0baB5IavjCAhE6QE+8AKFeMjB/FAT12CAAbSz9ksUKYmaoGoAImvNAbGjCi M3eQMHpMyhGhGJTZhSH+9+S3s+p+Yh/DqapEXdIaiy/k3wmfQr2nzPFhTbJm3PRSGRyR z++A== 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=mi5KBnxjYb4xRc+HhWLqQr3laG5bEwjglidil618y58=; b=tCtSgTlmUfQ1m9k1/y9+AEOr+A48ZwxbB1yOHrZDkhzgQiVTvYKqISj3zCOUo9sTEb lBGuPyRgnA3lm2IMKFmM82jAvVs0oQznh27IWuHA2UEGa3EdNMgi8tL23ox0nWW8/7LG ASdJEYngBW30IoGcqbnZEWMwBWPiU4tLhr9FtLDaaWjNQLoUQCsFHHCeVgaYoaTUvhBz ww7mBdiiC1Cp14UBvKUTH95B2jZj/tqNAQKGY6+iWkWTaQnM72qmJZvrnIw2iFXeYO5L DIDr9PyliUBSG8KMGdSvBhI8xy4BOMB3ZMBOROXjSTKiLwVqeUSdtnanUiY95tUFN4ej WjBw== 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 h188si6005933pfg.44.2019.02.06.04.25.36; Wed, 06 Feb 2019 04:25:52 -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 S1730286AbfBFMZM (ORCPT + 99 others); Wed, 6 Feb 2019 07:25:12 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:3177 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727697AbfBFMZM (ORCPT ); Wed, 6 Feb 2019 07:25:12 -0500 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 88D5DB51B782B0D4FAD9; Wed, 6 Feb 2019 20:25:09 +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; Wed, 6 Feb 2019 20:25:07 +0800 Date: Wed, 6 Feb 2019 12:24:58 +0000 From: Jonathan Cameron To: Keith Busch CC: , , , Greg Kroah-Hartman , "Rafael Wysocki" , Dave Hansen , "Dan Williams" Subject: Re: [PATCHv5 07/10] acpi/hmat: Register performance attributes Message-ID: <20190206122458.0000793c@huawei.com> In-Reply-To: <20190124230724.10022-8-keith.busch@intel.com> References: <20190124230724.10022-1-keith.busch@intel.com> <20190124230724.10022-8-keith.busch@intel.com> Organization: Huawei X-Mailer: Claws Mail 3.16.0 (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 Thu, 24 Jan 2019 16:07:21 -0700 Keith Busch wrote: > Register the local attached performace access attributes with the memory's performance > 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 and matching pairings at this time. > > Signed-off-by: Keith Busch > --- > drivers/acpi/hmat/Kconfig | 1 + > drivers/acpi/hmat/hmat.c | 14 ++++++++++++++ > 2 files changed, 15 insertions(+) > > diff --git a/drivers/acpi/hmat/Kconfig b/drivers/acpi/hmat/Kconfig > index c9637e2e7514..08e972ead159 100644 > --- a/drivers/acpi/hmat/Kconfig > +++ b/drivers/acpi/hmat/Kconfig > @@ -2,6 +2,7 @@ > config ACPI_HMAT > bool "ACPI Heterogeneous Memory Attribute Table Support" > depends on ACPI_NUMA > + select HMEM_REPORTING > help > If set, this option causes the kernel to set the memory NUMA node > relationships and access attributes in accordance with ACPI HMAT > diff --git a/drivers/acpi/hmat/hmat.c b/drivers/acpi/hmat/hmat.c > index 85fd835c2e23..917e6122b3f0 100644 > --- a/drivers/acpi/hmat/hmat.c > +++ b/drivers/acpi/hmat/hmat.c > @@ -430,6 +430,19 @@ static __init void hmat_register_target_initiators(struct memory_target *target) > hmat_register_if_local(target, initiator); > } > > +static __init void hmat_register_target_perf(struct memory_target *target) > +{ > + unsigned mem_nid = pxm_to_node(target->memory_pxm); > + struct node_hmem_attrs hmem_attrs = { > + .read_bandwidth = target->read_bandwidth, > + .write_bandwidth= target->write_bandwidth, > + .read_latency = target->read_latency, > + .write_latency = target->write_latency, > + }; > + > + node_set_perf_attrs(mem_nid, &hmem_attrs, 0); > +} > + > static __init void hmat_register_targets(void) > { > struct memory_target *target, *tnext; > @@ -439,6 +452,7 @@ static __init void hmat_register_targets(void) > list_for_each_entry_safe(target, tnext, &targets, node) { > list_del(&target->node); > hmat_register_target_initiators(target); > + hmat_register_target_perf(target); > kfree(target); > } >