From patchwork Mon Sep 7 14:03:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249211 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp3729098ilg; Mon, 7 Sep 2020 07:06:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkoTotj/0X+7N5ss8xzS5PIQX5zTx7py7hn9W7+Y3bc3ghNaXKHBYNOMa1aBy9FcMB9IIz X-Received: by 2002:a50:b946:: with SMTP id m64mr22467229ede.92.1599487570446; Mon, 07 Sep 2020 07:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599487570; cv=none; d=google.com; s=arc-20160816; b=CebVbNjx3FMInXd3p/0JlMBHyvMevQInPzp+kJX72WO0iViuy+OGC3wTW8/v9e+CzC qrK+L1KbP/Q41EpnZXlFcfL9ML4qlk5wWU9vvineMuvgBXYUgymHsdMMZ/Fxycv7oWwG MmusLLYE+euAiW35rsJnETqcSY8UogOPDlJHNzc6q/wS1+9gmHyfevN5KFvssiQBNKjU 7a7fxjRdZnZSqCBxeSXjW86uvPagviBGkmPHdZai/q6OIbfJ0nRe8ChcIZyKaul+oIyO 6tGmcAHHd02bqKxfR8vO0kLl3vQtuD1fo6XqCaj0vMBA5ojUFpcIAo5S98ZAn+HZd/MG 4W8Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=KvTY8Dj5PYOEGGZntMTJIL6k7d4TKtmjpwJGehXTlLk=; b=eV422Osw9BL14JTqQuwhODpAwZvrIaiYf7V3OQodkKZb83CV+nGPnG7663jsLiIyjK uu9T9KKKupYvZ9ex+cj/zaLNpCPMwpHyAWbHOWkWps1x2zhWND2VMQgCvdiE8U5GmjGd DM858OmBSEtIGjn3Xrz9ckeM+fMKjStNbQG2OS3x3mGfW+yMgRffSxVcAYSFWd9Vp0y3 tNPKwzDQxqZMBshg0CYWk3c2DbJnmdO4mUM28JNpuwcOkbuDDNFmBaG4u5yzJDyrt15w TBlNdum1uFLpGPNG4gO4icSedyEacnvfHu9XoycmUtbcKT5D/97OxUuKAtjRkH+40JlI jQDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f4si5017800ejw.300.2020.09.07.07.06.10; Mon, 07 Sep 2020 07:06:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729766AbgIGOFw (ORCPT + 7 others); Mon, 7 Sep 2020 10:05:52 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:58586 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729596AbgIGOFS (ORCPT ); Mon, 7 Sep 2020 10:05:18 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 7246235698C99C02FCBB; Mon, 7 Sep 2020 22:05:01 +0800 (CST) Received: from lhrphicprd00229.huawei.com (10.123.41.22) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 22:04:53 +0800 From: Jonathan Cameron To: , , , , Lorenzo Pieralisi , , Ingo Molnar CC: Bjorn Helgaas , , Thomas Gleixner , , Dan Williams , Brice Goglin , "Sean V Kelley" , , "Hanjun Guo" , Jonathan Cameron Subject: [PATCH v10 1/6] ACPI: Support Generic Initiator only domains Date: Mon, 7 Sep 2020 22:03:02 +0800 Message-ID: <20200907140307.571932-2-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200907140307.571932-1-Jonathan.Cameron@huawei.com> References: <20200907140307.571932-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.123.41.22] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Generic Initiators are a new ACPI concept that allows for the description of proximity domains that contain a device which performs memory access (such as a network card) but neither host CPU nor Memory. This patch has the parsing code and provides the infrastructure for an architecture to associate these new domains with their nearest memory processing node. Signed-off-by: Jonathan Cameron --- drivers/acpi/numa/srat.c | 69 +++++++++++++++++++++++++++++++++++++++- drivers/base/node.c | 3 ++ include/linux/nodemask.h | 1 + 3 files changed, 72 insertions(+), 1 deletion(-) -- 2.19.1 diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index 15bbaab8500b..d27e8585132d 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -130,6 +130,36 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header) } break; + case ACPI_SRAT_TYPE_GENERIC_AFFINITY: + { + struct acpi_srat_generic_affinity *p = + (struct acpi_srat_generic_affinity *)header; + + if (p->device_handle_type == 0) { + /* + * For pci devices this may be the only place they + * are assigned a proximity domain + */ + pr_debug("SRAT Generic Initiator(Seg:%u BDF:%u) in proximity domain %d %s\n", + *(u16 *)(&p->device_handle[0]), + *(u16 *)(&p->device_handle[2]), + p->proximity_domain, + (p->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED) ? + "enabled" : "disabled"); + } else { + /* + * In this case we can rely on the device having a + * proximity domain reference + */ + pr_debug("SRAT Generic Initiator(HID=%.8s UID=%.4s) in proximity domain %d %s\n", + (char *)(&p->device_handle[0]), + (char *)(&p->device_handle[8]), + p->proximity_domain, + (p->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED) ? + "enabled" : "disabled"); + } + } + break; default: pr_warn("Found unsupported SRAT entry (type = 0x%x)\n", header->type); @@ -332,6 +362,41 @@ acpi_parse_gicc_affinity(union acpi_subtable_headers *header, return 0; } +#if defined(CONFIG_X86) || defined(CONFIG_ARM64) +static int __init +acpi_parse_gi_affinity(union acpi_subtable_headers *header, + const unsigned long end) +{ + struct acpi_srat_generic_affinity *gi_affinity; + int node; + + gi_affinity = (struct acpi_srat_generic_affinity *)header; + if (!gi_affinity) + return -EINVAL; + acpi_table_print_srat_entry(&header->common); + + if (!(gi_affinity->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED)) + return -EINVAL; + + node = acpi_map_pxm_to_node(gi_affinity->proximity_domain); + if (node == NUMA_NO_NODE || node >= MAX_NUMNODES) { + pr_err("SRAT: Too many proximity domains.\n"); + return -EINVAL; + } + node_set(node, numa_nodes_parsed); + node_set_state(node, N_GENERIC_INITIATOR); + + return 0; +} +#else +static int __init +acpi_parse_gi_affinity(union acpi_subtable_headers *header, + const unsigned long end) +{ + return 0; +} +#endif /* defined(CONFIG_X86) || defined (CONFIG_ARM64) */ + static int __initdata parsed_numa_memblks; static int __init @@ -385,7 +450,7 @@ int __init acpi_numa_init(void) /* SRAT: System Resource Affinity Table */ if (!acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat)) { - struct acpi_subtable_proc srat_proc[3]; + struct acpi_subtable_proc srat_proc[4]; memset(srat_proc, 0, sizeof(srat_proc)); srat_proc[0].id = ACPI_SRAT_TYPE_CPU_AFFINITY; @@ -394,6 +459,8 @@ int __init acpi_numa_init(void) srat_proc[1].handler = acpi_parse_x2apic_affinity; srat_proc[2].id = ACPI_SRAT_TYPE_GICC_AFFINITY; srat_proc[2].handler = acpi_parse_gicc_affinity; + srat_proc[3].id = ACPI_SRAT_TYPE_GENERIC_AFFINITY; + srat_proc[3].handler = acpi_parse_gi_affinity; acpi_table_parse_entries_array(ACPI_SIG_SRAT, sizeof(struct acpi_table_srat), diff --git a/drivers/base/node.c b/drivers/base/node.c index 508b80f6329b..53383f1f683c 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -980,6 +980,8 @@ static struct node_attr node_state_attr[] = { #endif [N_MEMORY] = _NODE_ATTR(has_memory, N_MEMORY), [N_CPU] = _NODE_ATTR(has_cpu, N_CPU), + [N_GENERIC_INITIATOR] = _NODE_ATTR(has_generic_initiator, + N_GENERIC_INITIATOR), }; static struct attribute *node_state_attrs[] = { @@ -991,6 +993,7 @@ static struct attribute *node_state_attrs[] = { #endif &node_state_attr[N_MEMORY].attr.attr, &node_state_attr[N_CPU].attr.attr, + &node_state_attr[N_GENERIC_INITIATOR].attr.attr, NULL }; diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 27e7fa36f707..3334ce056335 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h @@ -399,6 +399,7 @@ enum node_states { #endif N_MEMORY, /* The node has memory(regular, high, movable) */ N_CPU, /* The node has one or more cpus */ + N_GENERIC_INITIATOR, /* The node has one or more Generic Initiators */ NR_NODE_STATES }; From patchwork Mon Sep 7 14:03:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249237 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp3858654ilg; Mon, 7 Sep 2020 10:15:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyg8+7hG3QtvlQNUiWokTcOQZR6AEqeqslky2l93HuU9L2pGJUZ2aiVddK+bwjSk98unLe3 X-Received: by 2002:a17:907:20d9:: with SMTP id qq25mr17364302ejb.382.1599498940772; Mon, 07 Sep 2020 10:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599498940; cv=none; d=google.com; s=arc-20160816; b=kEEqmSLR1sNoJBzqhSUvV70PxkFOerorWJPAeUAfN/PrskH01JHVtL3VUx/fwZOy1R yn0gReXDrevrFXwmtdyOb5X/np3vo3baegWJH3UP+YEYWJJ/hncVNO4IerzxgHfXp5ji YaejVEVDkUgeRVEgVnIXdwuWuMVAGXO+oy7qbkkRwZ1tTcTFROaXMpi67XHLMyp0wVdW T6iepiwnc5okD5VFGJSM7l+0C2TIyVawMN2UnMMNBpzTeXQOxpHYbcwr0weGjLKAom+t MMIzTk0q5T38tUb+dxmfm2RshWeFMd0OAwaurW7obSDiloZEpIU+X3LV2ymAdyqcQUaA HjpQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=zQvcCDTuChWqKdR57McVWcECXFBhExGQLCMNAFrLOv0=; b=Wz0U/bodFZe8izz69apflpPG/fWGTlkVij2uSiGNRTXAmocDHPTcGistB6fdotO4Uc GoUdhwma4Qh9JgeKU0ZAcq6YIhfnU/HeaTOM96IlqcgyrnZhFF1zU2GsRG/3rjKoixoz PixgwkAHssFctk2blQtg/iA4HLei9UH5gAESDzP3FRWfhciHnonjno9VwuVSAy2Lt4uQ fwf72+p2re+xAVkAVTHI9PdBMr6A5MsePOzrXKnt+J8yjCBN7IOFMAIF/d3E4/N9VoJM 3NpZevUXocXRjvE1YbDQ+fiC4q+RaZ1TPMroQ8+e69/3Oily1mg4I4YGkWx6MkbA0QU/ s//g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r7si6468757ejy.514.2020.09.07.10.15.40; Mon, 07 Sep 2020 10:15:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730639AbgIGRPj (ORCPT + 7 others); Mon, 7 Sep 2020 13:15:39 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:59240 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729763AbgIGOFq (ORCPT ); Mon, 7 Sep 2020 10:05:46 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 1646D9B65E56938C9A4D; Mon, 7 Sep 2020 22:05:38 +0800 (CST) Received: from lhrphicprd00229.huawei.com (10.123.41.22) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 22:05:28 +0800 From: Jonathan Cameron To: , , , , Lorenzo Pieralisi , , Ingo Molnar CC: Bjorn Helgaas , , Thomas Gleixner , , Dan Williams , Brice Goglin , "Sean V Kelley" , , "Hanjun Guo" , Jonathan Cameron Subject: [PATCH v10 2/6] x86: Support Generic Initiator only proximity domains Date: Mon, 7 Sep 2020 22:03:03 +0800 Message-ID: <20200907140307.571932-3-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200907140307.571932-1-Jonathan.Cameron@huawei.com> References: <20200907140307.571932-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.123.41.22] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org In common with memoryless domains we only register GI domains if the proximity node is not online. If a domain is already a memory containing domain, or a memoryless domain there is nothing to do just because it also contains a Generic Initiator. Signed-off-by: Jonathan Cameron --- arch/x86/include/asm/numa.h | 2 ++ arch/x86/kernel/setup.c | 1 + arch/x86/mm/numa.c | 14 ++++++++++++++ 3 files changed, 17 insertions(+) -- 2.19.1 diff --git a/arch/x86/include/asm/numa.h b/arch/x86/include/asm/numa.h index bbfde3d2662f..f631467272a3 100644 --- a/arch/x86/include/asm/numa.h +++ b/arch/x86/include/asm/numa.h @@ -62,12 +62,14 @@ extern void numa_clear_node(int cpu); extern void __init init_cpu_to_node(void); extern void numa_add_cpu(int cpu); extern void numa_remove_cpu(int cpu); +extern void init_gi_nodes(void); #else /* CONFIG_NUMA */ static inline void numa_set_node(int cpu, int node) { } static inline void numa_clear_node(int cpu) { } static inline void init_cpu_to_node(void) { } static inline void numa_add_cpu(int cpu) { } static inline void numa_remove_cpu(int cpu) { } +static inline void init_gi_nodes(void) { } #endif /* CONFIG_NUMA */ #ifdef CONFIG_DEBUG_PER_CPU_MAPS diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 3511736fbc74..9062c146f03a 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -1218,6 +1218,7 @@ void __init setup_arch(char **cmdline_p) prefill_possible_map(); init_cpu_to_node(); + init_gi_nodes(); io_apic_init_mappings(); diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index aa76ec2d359b..fc630dc6764e 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -747,6 +747,20 @@ static void __init init_memory_less_node(int nid) */ } +/* + * Generic Initiator Nodes may have neither CPU nor Memory. + * At this stage if either of the others were present we would + * already be online. + */ +void __init init_gi_nodes(void) +{ + int nid; + + for_each_node_state(nid, N_GENERIC_INITIATOR) + if (!node_online(nid)) + init_memory_less_node(nid); +} + /* * Setup early cpu_to_node. * From patchwork Mon Sep 7 14:03:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249212 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp3730447ilg; Mon, 7 Sep 2020 07:07:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBp2PIIJDGg4ywzVoOencs0WamFUXXwmwyj013FBZKjcrQSIULuNaaFySVz1FLwA1MpFzb X-Received: by 2002:a17:906:4046:: with SMTP id y6mr15811170ejj.148.1599487665257; Mon, 07 Sep 2020 07:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599487665; cv=none; d=google.com; s=arc-20160816; b=URiCz3wac73eNNsbbHzv0R6NTOEnYa3IR7hZyZfkZrmOEZJ5wyBJUtm3RLQv4YTboA 1/h+mE88sibtuFpsUBu40phrNLC+LLERG/ym9R6WqP3+kOc0Wq/rUR7/ErOSyFMmrRAx lsInN1n4IMFK64AkqoEskCHLhhWgYIqTH0SAyLxYnisJf8+f7NCzD2TjP8SD5Vlb/H6x Y24YmVdTawfdlmWiD3zoPLeny+J9aJ0vo6kCB8RtkAebLfPNjSGMu0Gt5YZZmj52y4bN LGd9574ypjMRe3WTEddxTM9DOr3KHQgcj3rSwFNsch0BUfPb3FbSVuDz49TIHK9uXiNa 7N1Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=gPv4NqJXkN1t4/asyK10JyW0MG7CuHU7pT6soeybAdc=; b=wXOqTxdAVHJrrgaKSaHx+52YvGssGtIaxcig8vBOfOlal0e/Cq/i25EhPzEqXevVhC R6jzVt1NboDr68GvCb35AhvNDtqbf0gDsNqcR4yztzDiCX4zkwq/hBzwF6HKfDiSS0xp pLDcH1D+1TzhKkNKLuLsj2F/1WtjSgH7sJRuhpM4bMjS2umewBAyK4UdLbVazT7WPG/W EC6eqlu2LCO8QIDin2shXmK6JQ3cFD4MCrcl2m44WvQVNpib+BPgJ4s0AcBOlS4EvRf4 JwCDdh93yoDdgLD9yGpaCCsnAuwEWO37eLJFmkNc/ddXrOdcW5wH3XbK2lFMh7fR3shu 7KeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j4si9343629eds.475.2020.09.07.07.07.45; Mon, 07 Sep 2020 07:07:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729636AbgIGOHj (ORCPT + 7 others); Mon, 7 Sep 2020 10:07:39 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:11247 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729773AbgIGOGN (ORCPT ); Mon, 7 Sep 2020 10:06:13 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 882418E65DAF15108DEE; Mon, 7 Sep 2020 22:06:11 +0800 (CST) Received: from lhrphicprd00229.huawei.com (10.123.41.22) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 22:06:03 +0800 From: Jonathan Cameron To: , , , , Lorenzo Pieralisi , , Ingo Molnar CC: Bjorn Helgaas , , Thomas Gleixner , , Dan Williams , Brice Goglin , "Sean V Kelley" , , "Hanjun Guo" , Jonathan Cameron Subject: [PATCH v10 3/6] ACPI: Let ACPI know we support Generic Initiator Affinity Structures Date: Mon, 7 Sep 2020 22:03:04 +0800 Message-ID: <20200907140307.571932-4-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200907140307.571932-1-Jonathan.Cameron@huawei.com> References: <20200907140307.571932-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.123.41.22] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Until we tell ACPI that we support generic initiators, it will have to operate in fall back domain mode and all _PXM entries should be on existing non GI domains. This patch sets the relevant OSC bit to make that happen. Signed-off-by: Jonathan Cameron --- drivers/acpi/bus.c | 4 ++++ include/linux/acpi.h | 1 + 2 files changed, 5 insertions(+) -- 2.19.1 diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 54002670cb7a..113c661eb848 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -303,7 +303,11 @@ static void acpi_bus_osc_support(void) capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT; capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PCLPI_SUPPORT; +#ifdef CONFIG_ARM64 + capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_GENERIC_INITIATOR_SUPPORT; +#endif #ifdef CONFIG_X86 + capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_GENERIC_INITIATOR_SUPPORT; if (boot_cpu_has(X86_FEATURE_HWP)) { capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPC_SUPPORT; capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_CPCV2_SUPPORT; diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 1e4cdc6c7ae2..1321518a53d2 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -546,6 +546,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context); #define OSC_SB_PCLPI_SUPPORT 0x00000080 #define OSC_SB_OSLPI_SUPPORT 0x00000100 #define OSC_SB_CPC_DIVERSE_HIGH_SUPPORT 0x00001000 +#define OSC_SB_GENERIC_INITIATOR_SUPPORT 0x00002000 extern bool osc_sb_apei_support_acked; extern bool osc_pc_lpi_support_confirmed; From patchwork Mon Sep 7 14:03:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249213 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp3730941ilg; Mon, 7 Sep 2020 07:08:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/ANt7c+YM2NEYn7myFA9gepA3jrNhZCGn4iqz5m5LFnxsaHb5ZB2ozXruKpAIAGwMWrCQ X-Received: by 2002:a17:906:474f:: with SMTP id j15mr22667700ejs.468.1599487705082; Mon, 07 Sep 2020 07:08:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599487705; cv=none; d=google.com; s=arc-20160816; b=BfKpnk37GeT0CWYnAG0cijb3h+WOKj90kbdL34UQHWGuwcBvPUvW2LUVBIQYzI/lm4 RPr3Fw6P75htE98klcwtlIqK2nIBdpNGr0jtHxVwy8AA+csO8PIwivejKCkCG7z3SgHZ AXoVSaoYsPk15lV9PXx0F0s5E6oOhxZUUZM6+bYq7OSAaPxlz2emmXr1ZU6fpaUC/HgZ RjnnvOFRhNgR0fztzq/BqzMK96WDsq+VlZAuY4TLismGWxJlyHSnRREp2tfH+Cm+rvha 5kjxSVj34sy3hNNxJp+vXTI1KW7CKGNlr+iqN5KE5TB7KGqeIggbBQWT1cdP4E/Trb0t L+vQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WfZpnrYpTOiUwSeE2Uh0jALpRWqeZW3IcniMAlJFu5g=; b=igTdoIQ2Bl+Rt+mKbpJG7qr2WIu/UTkf5F4yJLCDPm8zWS1nWHBo1vMGXNd5fLuwrb N60SDIHVHKZaNiiumnTx7H34h9rgYW8eSr9c0uQPE0L+JvwUOLTPzpGNQXPz/oMmeYHP ah7JhbIPKKV4uu3nYdEJOmSvYbl10n81ASa5jhuw0wIaCqoxQlBwe7zjF19TOltJC4sA HOhptTon8CAFfHoCm0cvYxmygM/BAaCENiJt61g0NZlncz7F7SVSzBQM+HCjf64ytLLV aAwdJaPp5bhTglCStRG1t2AUQswDhLwYGC2PnSBfTBw4pHDarxo86QyxQm34p7rqDmza JWjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j4si9343629eds.475.2020.09.07.07.08.24; Mon, 07 Sep 2020 07:08:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729786AbgIGOHw (ORCPT + 7 others); Mon, 7 Sep 2020 10:07:52 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:60372 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729778AbgIGOGt (ORCPT ); Mon, 7 Sep 2020 10:06:49 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id EA383C92ADD5C0558545; Mon, 7 Sep 2020 22:06:46 +0800 (CST) Received: from lhrphicprd00229.huawei.com (10.123.41.22) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 22:06:39 +0800 From: Jonathan Cameron To: , , , , Lorenzo Pieralisi , , Ingo Molnar CC: Bjorn Helgaas , , Thomas Gleixner , , Dan Williams , Brice Goglin , "Sean V Kelley" , , "Hanjun Guo" , Jonathan Cameron Subject: [PATCH v10 4/6] ACPI: HMAT: Fix handling of changes from ACPI 6.2 to ACPI 6.3 Date: Mon, 7 Sep 2020 22:03:05 +0800 Message-ID: <20200907140307.571932-5-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200907140307.571932-1-Jonathan.Cameron@huawei.com> References: <20200907140307.571932-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.123.41.22] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org In ACPI 6.3, the Memory Proximity Domain Attributes Structure changed substantially. One of those changes was that the flag for "Memory Proximity Domain field is valid" was deprecated. This was because the field "Proximity Domain for the Memory" became a required field and hence having a validity flag makes no sense. So the correct logic is to always assume the field is there. Current code assumes it never is. Signed-off-by: Jonathan Cameron --- Changes for v10: * Reorder the checks so we confirm the version first before taking the ACPI_HMAT_MEMORY_PD_VALID into account. (Bjorn Helgaas) drivers/acpi/numa/hmat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.19.1 diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index 2c32cfb72370..6a91a55229ae 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -424,7 +424,8 @@ static int __init hmat_parse_proximity_domain(union acpi_subtable_headers *heade pr_info("HMAT: Memory Flags:%04x Processor Domain:%u Memory Domain:%u\n", p->flags, p->processor_PD, p->memory_PD); - if (p->flags & ACPI_HMAT_MEMORY_PD_VALID && hmat_revision == 1) { + if ((hmat_revision == 1 && p->flags & ACPI_HMAT_MEMORY_PD_VALID) || + hmat_revision > 1) { target = find_mem_target(p->memory_PD); if (!target) { pr_debug("HMAT: Memory Domain missing from SRAT\n"); From patchwork Mon Sep 7 14:03:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249235 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp3858308ilg; Mon, 7 Sep 2020 10:15:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw02qaifuYe075hk+YkCWv3zD5ZonZEensFZ2/5vLt4faJMAAkspCrtZbZs9m4XKxB4rPEC X-Received: by 2002:a17:906:1106:: with SMTP id h6mr21774786eja.200.1599498911530; Mon, 07 Sep 2020 10:15:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599498911; cv=none; d=google.com; s=arc-20160816; b=D/35rmVI9sYIj6VD2dvGb1k18aEaAf+MRUOWYct4TUDmuZ+OH4xvP10YoRx8mOHEJG TGf0a9M/NY/0hVZFGrMCgAVhQ9uvT2gURU6hr/3om9yAvcS5oPD9Z2FYC9xPeuTLo/Ki itBVb9u47KU8+F3hbAuhpv0w0/y7XwsIlhwHXVQu5N5b2P8B7rD4kobKaJ7cuctwvOi8 BaTDbMORzwQQ0MQ2IIEzsQYnGozSYr9p6wIJTUmH3wcG/EC7ndFEKFfu2C/RYyTWe7qV 43IwuCANPvpMysaiyvAiu5D6UhTgBlM+aRsNIh7f2/My4b1MxM1WErJ9Kir7cHqzJuA7 ZNTg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VA/H3Jx5f3gTy/ABbW2rRx5KAl/PTAe5ZE8ukhpMRdY=; b=V9so3cVYUmoTDrwriJp803s6l6ndvju7yLDdpuZpuZO3edeFAIGdaeoWhz7WSsUQOs IzGLrWNpytuKXBVhFaqQgsz4C8bj6syUQh1oqGlAxEWHMX7jGtKHZZrvmx8w0JAzWzBx pkRAVSyDMbXbUvvIYC2413jGG2EOsRNxMRGtmuxPwxoofw6k7EuO4Lhikg+pr6bEMPjc iGxiCh2/TezHfy+7tenAFD1CpMD7lMo6zWHyDLrMtqHGeG7ZDEagyTDyhRLiRRvufICi ofiCI7SRmDJGYo8IW1NYVC1SIPOgngLqzhSej7EwAfEZtGRtPDcDC3O8wdZaaXEkDl+G Mb5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t14si10112904ejb.435.2020.09.07.10.15.11; Mon, 07 Sep 2020 10:15:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730626AbgIGRO7 (ORCPT + 7 others); Mon, 7 Sep 2020 13:14:59 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:10831 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729665AbgIGOH3 (ORCPT ); Mon, 7 Sep 2020 10:07:29 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 6EE913EE4F8741CD6BFC; Mon, 7 Sep 2020 22:07:24 +0800 (CST) Received: from lhrphicprd00229.huawei.com (10.123.41.22) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 22:07:15 +0800 From: Jonathan Cameron To: , , , , Lorenzo Pieralisi , , Ingo Molnar CC: Bjorn Helgaas , , Thomas Gleixner , , Dan Williams , Brice Goglin , "Sean V Kelley" , , "Hanjun Guo" , Jonathan Cameron Subject: [PATCH v10 5/6] node: Add access1 class to represent CPU to memory characteristics Date: Mon, 7 Sep 2020 22:03:06 +0800 Message-ID: <20200907140307.571932-6-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200907140307.571932-1-Jonathan.Cameron@huawei.com> References: <20200907140307.571932-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.123.41.22] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org New access1 class is nearly the same as access0, but always provides characteristics for CPUs to memory. The existing access0 class provides characteristics to nearest or direct connnect initiator which may be a Generic Initiator such as a GPU or network adapter. This new class allows thread placement on CPUs to be performed so as to give optimal access characteristics to memory, even if that memory is for example attached to a GPU or similar and only accessible to the CPU via an appropriate bus. Suggested-by: Dan Willaims Signed-off-by: Jonathan Cameron --- drivers/acpi/numa/hmat.c | 87 +++++++++++++++++++++++++++++++--------- 1 file changed, 68 insertions(+), 19 deletions(-) -- 2.19.1 diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index 6a91a55229ae..daacb1cb9cee 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -56,7 +56,7 @@ struct memory_target { unsigned int memory_pxm; unsigned int processor_pxm; struct resource memregions; - struct node_hmem_attrs hmem_attrs; + struct node_hmem_attrs hmem_attrs[2]; struct list_head caches; struct node_cache_attrs cache_attrs; bool registered; @@ -65,6 +65,7 @@ struct memory_target { struct memory_initiator { struct list_head node; unsigned int processor_pxm; + bool has_cpu; }; struct memory_locality { @@ -108,6 +109,7 @@ static __init void alloc_memory_initiator(unsigned int cpu_pxm) return; initiator->processor_pxm = cpu_pxm; + initiator->has_cpu = node_state(pxm_to_node(cpu_pxm), N_CPU); list_add_tail(&initiator->node, &initiators); } @@ -215,28 +217,28 @@ static u32 hmat_normalize(u16 entry, u64 base, u8 type) } static void hmat_update_target_access(struct memory_target *target, - u8 type, u32 value) + u8 type, u32 value, int access) { switch (type) { case ACPI_HMAT_ACCESS_LATENCY: - target->hmem_attrs.read_latency = value; - target->hmem_attrs.write_latency = value; + target->hmem_attrs[access].read_latency = value; + target->hmem_attrs[access].write_latency = value; break; case ACPI_HMAT_READ_LATENCY: - target->hmem_attrs.read_latency = value; + target->hmem_attrs[access].read_latency = value; break; case ACPI_HMAT_WRITE_LATENCY: - target->hmem_attrs.write_latency = value; + target->hmem_attrs[access].write_latency = value; break; case ACPI_HMAT_ACCESS_BANDWIDTH: - target->hmem_attrs.read_bandwidth = value; - target->hmem_attrs.write_bandwidth = value; + target->hmem_attrs[access].read_bandwidth = value; + target->hmem_attrs[access].write_bandwidth = value; break; case ACPI_HMAT_READ_BANDWIDTH: - target->hmem_attrs.read_bandwidth = value; + target->hmem_attrs[access].read_bandwidth = value; break; case ACPI_HMAT_WRITE_BANDWIDTH: - target->hmem_attrs.write_bandwidth = value; + target->hmem_attrs[access].write_bandwidth = value; break; default: break; @@ -329,8 +331,12 @@ static __init int hmat_parse_locality(union acpi_subtable_headers *header, if (mem_hier == ACPI_HMAT_MEMORY) { target = find_mem_target(targs[targ]); - if (target && target->processor_pxm == inits[init]) - hmat_update_target_access(target, type, value); + if (target && target->processor_pxm == inits[init]) { + hmat_update_target_access(target, type, value, 0); + /* If the node has a CPU, update access 1*/ + if (node_state(pxm_to_node(inits[init]), N_CPU)) + hmat_update_target_access(target, type, value, 1); + } } } } @@ -567,6 +573,7 @@ static void hmat_register_target_initiators(struct memory_target *target) unsigned int mem_nid, cpu_nid; struct memory_locality *loc = NULL; u32 best = 0; + bool access0done = false; int i; mem_nid = pxm_to_node(target->memory_pxm); @@ -578,7 +585,11 @@ static void hmat_register_target_initiators(struct memory_target *target) if (target->processor_pxm != PXM_INVAL) { cpu_nid = pxm_to_node(target->processor_pxm); register_memory_node_under_compute_node(mem_nid, cpu_nid, 0); - return; + access0done = true; + if (node_state(cpu_nid, N_CPU)) { + register_memory_node_under_compute_node(mem_nid, cpu_nid, 1); + return; + } } if (list_empty(&localities)) @@ -592,6 +603,40 @@ static void hmat_register_target_initiators(struct memory_target *target) */ bitmap_zero(p_nodes, MAX_NUMNODES); list_sort(p_nodes, &initiators, initiator_cmp); + if (!access0done) { + for (i = WRITE_LATENCY; i <= READ_BANDWIDTH; i++) { + loc = localities_types[i]; + if (!loc) + continue; + + best = 0; + list_for_each_entry(initiator, &initiators, node) { + u32 value; + + if (!test_bit(initiator->processor_pxm, p_nodes)) + continue; + + value = hmat_initiator_perf(target, initiator, + loc->hmat_loc); + if (hmat_update_best(loc->hmat_loc->data_type, value, &best)) + bitmap_clear(p_nodes, 0, initiator->processor_pxm); + if (value != best) + clear_bit(initiator->processor_pxm, p_nodes); + } + if (best) + hmat_update_target_access(target, loc->hmat_loc->data_type, best, 0); + } + + for_each_set_bit(i, p_nodes, MAX_NUMNODES) { + cpu_nid = pxm_to_node(i); + register_memory_node_under_compute_node(mem_nid, cpu_nid, 0); + } + } + + /* Access 1 ignores Generic Initiators */ + bitmap_zero(p_nodes, MAX_NUMNODES); + list_sort(p_nodes, &initiators, initiator_cmp); + best = 0; for (i = WRITE_LATENCY; i <= READ_BANDWIDTH; i++) { loc = localities_types[i]; if (!loc) @@ -601,6 +646,10 @@ static void hmat_register_target_initiators(struct memory_target *target) list_for_each_entry(initiator, &initiators, node) { u32 value; + if (!initiator->has_cpu) { + clear_bit(initiator->processor_pxm, p_nodes); + continue; + } if (!test_bit(initiator->processor_pxm, p_nodes)) continue; @@ -611,12 +660,11 @@ static void hmat_register_target_initiators(struct memory_target *target) clear_bit(initiator->processor_pxm, p_nodes); } if (best) - hmat_update_target_access(target, loc->hmat_loc->data_type, best); + hmat_update_target_access(target, loc->hmat_loc->data_type, best, 1); } - for_each_set_bit(i, p_nodes, MAX_NUMNODES) { cpu_nid = pxm_to_node(i); - register_memory_node_under_compute_node(mem_nid, cpu_nid, 0); + register_memory_node_under_compute_node(mem_nid, cpu_nid, 1); } } @@ -629,10 +677,10 @@ static void hmat_register_target_cache(struct memory_target *target) node_add_cache(mem_nid, &tcache->cache_attrs); } -static void hmat_register_target_perf(struct memory_target *target) +static void hmat_register_target_perf(struct memory_target *target, int access) { unsigned mem_nid = pxm_to_node(target->memory_pxm); - node_set_perf_attrs(mem_nid, &target->hmem_attrs, 0); + node_set_perf_attrs(mem_nid, &target->hmem_attrs[access], access); } static void hmat_register_target_device(struct memory_target *target, @@ -734,7 +782,8 @@ static void hmat_register_target(struct memory_target *target) if (!target->registered) { hmat_register_target_initiators(target); hmat_register_target_cache(target); - hmat_register_target_perf(target); + hmat_register_target_perf(target, 0); + hmat_register_target_perf(target, 1); target->registered = true; } mutex_unlock(&target_lock); From patchwork Mon Sep 7 14:03:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249234 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp3858135ilg; Mon, 7 Sep 2020 10:14:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8WoEUd2++7FxGpx6vYjbhNqVIHalZ7NIjtC0NNKCM22XL06gA//BWt6pkl8a/pD4wyh2/ X-Received: by 2002:a17:906:b09a:: with SMTP id x26mr21525241ejy.162.1599498897239; Mon, 07 Sep 2020 10:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599498897; cv=none; d=google.com; s=arc-20160816; b=Kt1FDkEjxp8qLjEnxOaEQhntch6AtmV9Dn9QIqFctQ2TZkVobQY9azj4ohcH7ZUbZG mgY1zStLEXtDES3EGnki1KM6EeTDxUkuP5W1DVo/ZY+hhtU5UxeIMFlGf3hy/YAYkczR nLsW1q1WVSVjtMwtjzji205H1HGO+97BAlrjCBFq7rOx7Al35wyQbkSVdi7kGk9K+sye dM/LZceHS9aJ0n3M8d9PFsA8IA++ik3AuyJwPNadfjg/gu0zNNCf6kOK/Re807H8BB4T Mk45DKsmgOARtU6VgGArdbsiyn4IhqJaRlk2Y/VTF0YOqLMuJGZhxe5dI/Z2BYjCB6zZ TtZQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=G8xrgWR5rYls5kOXa7DaWpW87fT69c2v67WrQ+Qf4nw=; b=leNf0fZ7x3E1EXFQk4e5SBOrBtBnZ7tqvcFiMbGAa8A5K8TaZB3+6qnoM794lqF+UD 0eCVMNyU5n/PpadPyLNTiBVb6B5UkxgRMYFF8P6vwO+nt9V8t+ILTwqdJpLu4i1vEl3v tHldPWrMHUaFKmIybYe5f+8hO1As8krCdMK4vwe2v+zdldzlYTlU5hDvEg6/rjuiE7nw htL0EOS43XfxpNiqIKzAL0apyxWPTNTFizd8ysBjvzX+GUlXJVyaf2/G2iBz0dNzXwF+ o/z7JagkjG8E77tdexrVorCZ6XtjjKXUMo6K1GHgRY8DfF9hHtZd3tvYwFix9xAqYg6X hBxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j13si9553162edp.94.2020.09.07.10.14.56; Mon, 07 Sep 2020 10:14:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729794AbgIGOIj (ORCPT + 7 others); Mon, 7 Sep 2020 10:08:39 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:11248 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729727AbgIGOIA (ORCPT ); Mon, 7 Sep 2020 10:08:00 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 20EE5185D0A4C595AE8E; Mon, 7 Sep 2020 22:07:58 +0800 (CST) Received: from lhrphicprd00229.huawei.com (10.123.41.22) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Sep 2020 22:07:51 +0800 From: Jonathan Cameron To: , , , , Lorenzo Pieralisi , , Ingo Molnar CC: Bjorn Helgaas , , Thomas Gleixner , , Dan Williams , Brice Goglin , "Sean V Kelley" , , "Hanjun Guo" , Jonathan Cameron Subject: [PATCH v10 6/6] docs: mm: numaperf.rst Add brief description for access class 1. Date: Mon, 7 Sep 2020 22:03:07 +0800 Message-ID: <20200907140307.571932-7-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200907140307.571932-1-Jonathan.Cameron@huawei.com> References: <20200907140307.571932-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.123.41.22] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Try to make minimal changes to the document which already describes access class 0 in a generic fashion (including IO initiatiors that are not CPUs). Signed-off-by: Jonathan Cameron --- Documentation/admin-guide/mm/numaperf.rst | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.19.1 diff --git a/Documentation/admin-guide/mm/numaperf.rst b/Documentation/admin-guide/mm/numaperf.rst index 4d69ef1de830..b89bb85eac75 100644 --- a/Documentation/admin-guide/mm/numaperf.rst +++ b/Documentation/admin-guide/mm/numaperf.rst @@ -56,6 +56,11 @@ nodes' access characteristics share the same performance relative to other linked initiator nodes. Each target within an initiator's access class, though, do not necessarily perform the same as each other. +The access class "1" is used to allow differentiation between initiators +that are CPUs and hence suitable for generic task scheduling, and +IO initiators such as GPUs and NICs. Unlike access class 0, only +nodes containing CPUs are considered. + ================ NUMA Performance ================ @@ -88,6 +93,9 @@ The latency attributes are provided in nanoseconds. The values reported here correspond to the rated latency and bandwidth for the platform. +Access class 1, takes the same form, but only includes values for CPU to +memory activity. + ========== NUMA Cache ==========