Received: by 10.223.164.221 with SMTP id h29csp1274430wrb; Wed, 1 Nov 2017 13:30:25 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SFoooBzSYNcchdIzrmDzzLf8GyRgNRSRP+RwPuI20I+d0qZy7SQst227LaDliI3XzjOILd X-Received: by 10.98.155.219 with SMTP id e88mr1127809pfk.218.1509568224974; Wed, 01 Nov 2017 13:30:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509568224; cv=none; d=google.com; s=arc-20160816; b=iSHRUGeKyT7hRxeSd/ptMe0H0LVk1j+kHpBywyjrQGqob6irlip067GCeLjF8pyov9 9ExDEbBuvLpyFdfDUxNUkY7crAbQNnUm+KVsNSqTSoqlPbEidpWQhVMyh95jHJXdx7K2 +kLtSlvjc5ECZVpIRO6Zk9ARC7/e6MgtM/F+aU8/5YeR2+6Uji0BHhvNjxF/Kd8FOUIf /Miu8b0CaGe/79IUHfeNlOcCRPR3PJFkOUz/i+o8me3aj1rWbKb19H8V5s6MLx4CkQ6j XnIzkoFeSXaIMbvhCilO5eMzVnE7ecVG7JFwMVyphozYm7MDGjeMoIeB4jqqXYWiedzJ xA7w== 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:organization:from:references:cc:to:subject:reply-to :arc-authentication-results; bh=9U1lMsJUC88buPwNIK3lhH9V2pM7LELBpK7WJboGSP8=; b=zQ2fXQuAxAx96qzy1SqfmkOxLS9sddrgOkrkVt2q1iM9EsLIIaSmU8BP6ohcE/dTua HtqOimeno5Hd93x//8ZRnItAmzkvdMQFJYMpZDnNUVWqCZuwJsXUXwe0/Rd44+utEyXD 99GSNPLQ42p5IvWX+2m1hMJDfUuKHSHDbIY3oQ7kYfnqvv69wS1citDjtYiN4RMQC73G qWN6bPWR5u0lGKOXoGc2hgp6fu796iaagrVXO/o+yveoEj1IM+96VYNBDXTNkXaZB3TL fMQwkxopJlVrtC4bDlXtLqIAsl5cVE9cHmqp6YcOVAxMrDkvkayWpvnh5q9Lu2G+jliE zzPA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15si465401pll.42.2017.11.01.13.30.10; Wed, 01 Nov 2017 13:30:24 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755226AbdKAU3b (ORCPT + 99 others); Wed, 1 Nov 2017 16:29:31 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:44091 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755008AbdKAU3a (ORCPT ); Wed, 1 Nov 2017 16:29:30 -0400 Received: by mail-io0-f196.google.com with SMTP id m16so8945934iod.1 for ; Wed, 01 Nov 2017 13:29:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=9U1lMsJUC88buPwNIK3lhH9V2pM7LELBpK7WJboGSP8=; b=lfs6lIRlesJU5REt9NXj/aNiaey1avk+fHOxr/PrYjvyevkZbwGSUAobXFJTrB1SNo 794j8fHsWF6vqO+8ClNdk6KrpPP9zGzF3AnXiuLFsrJxbleYDNTEsclinIwNa5PG/HkB WF/zJ845h8LEHvZ+IFmVx7B03W+Y9FWTyiPzkvnq9fa12lKWObF6lFs9aLuDDyFHyNJr 2iofoLPHFh6nEz6qk/hDeh4riL0CChVAOyqjsjnt6/Gwx2imH+aKBYbkxumkDrqAj7AU Io1LvaC3gm9B5zcnv2G1ewjMpN4PL3caqvM7lc59UGG1R4KAl/IKS4uYdiqP14OLG1+e 9ALw== X-Gm-Message-State: AMCzsaXcytCuSvpakUQZFcJ2q395e4A7QxKosTXRBJJMJ60y6fvMznlZ h/TajMdpK+pyZUGC/chjPbiiTA== X-Received: by 10.107.9.146 with SMTP id 18mr1495998ioj.126.1509568169263; Wed, 01 Nov 2017 13:29:29 -0700 (PDT) Received: from fidelio.ahs3 (c-67-165-232-89.hsd1.co.comcast.net. [67.165.232.89]) by smtp.gmail.com with ESMTPSA id q1sm799032itc.9.2017.11.01.13.29.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Nov 2017 13:29:28 -0700 (PDT) Reply-To: ahs3@redhat.com Subject: Re: [PATCH v3 6/7] arm64: topology: Enable ACPI/PPTT based CPU topology. To: Lorenzo Pieralisi , Jeremy Linton Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com, hanjun.guo@linaro.org, rjw@rjwysocki.net, will.deacon@arm.com, catalin.marinas@arm.com, gregkh@linuxfoundation.org, viresh.kumar@linaro.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, jhugo@codeaurora.org, wangxiongfeng2@huawei.com, Jonathan.Zhang@cavium.com, Jayachandran.Nair@cavium.com, austinwc@codeaurora.org References: <20171012194856.13844-1-jeremy.linton@arm.com> <20171012194856.13844-7-jeremy.linton@arm.com> <20171019155622.GC18883@red-moon> <20171020092210.GB21060@red-moon> From: Al Stone Organization: Red Hat, Inc. Message-ID: <270ae2f5-0af6-1be4-2914-d1ce8d0a5cd0@redhat.com> Date: Wed, 1 Nov 2017 14:29:26 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171020092210.GB21060@red-moon> 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 10/20/2017 03:22 AM, Lorenzo Pieralisi wrote: > On Thu, Oct 19, 2017 at 11:54:22AM -0500, Jeremy Linton wrote: > > [...] > >>>> + cpu_topology[cpu].core_id = topology_id; >>>> + topology_id = setup_acpi_cpu_topology(cpu, 2); >>>> + cpu_topology[cpu].cluster_id = topology_id; >>>> + topology_id = setup_acpi_cpu_topology(cpu, max_topo); >>> >>> If you want a package id (that's just a package tag to group cores), you >>> should not use a large level because you know how setup_acpi_cpu_topology()works, you should add an API that allows you to retrieve the package id >>> (so that you can use th ACPI_PPTT_PHYSICAL_PACKAGE flag consistenly, >>> whatever it represents). >> >> I don't think the spec requires the use of PHYSICAL_PACKAGE... Am I >> misreading it? Which means we need to "pick" a node level to >> represent the physical package if one doesn't exist... > > The specs define a means to detect if a given PPTT node corresponds to a > package (I am refraining from stating again that to me that's not clean > cut what a package is _architecturally_, I think you know my POV by now) > and that's what you need to use to retrieve a packageid for a given cpu, > if I understand the aim of the physical package flag. > > Either that or that flag is completely useless. > > Lorenzo > > ACPI 6.2 - Table 5-151 (page 248) > Physical package > ----------------- > Set to 1 if this node of the processor topology represents the boundary > of a physical package, whether socketed or surface mounted. Set to 0 if > this instance of the processor topology does not represent the boundary > of a physical package. > I've been following the discussion and I'm not sure I understand what the confusion is around having a physical package ID. Since I'm the one that insisted it be in the spec, I'd be glad to clarify anything. My apologies for not saying anything sooner but things IRL have been very complicated of late. What was intended was a simple flag that was meant to tell me if a CPU ID (this could be a CPU, a cluster, a processor container -- I don't really care which) is *also* an actual physical device on a motherboard. That is the only intent; there was no architectural meaning intended at all -- that is what the PPTT structures are for, in conjunction with any DSDT information uncovered later in the boot process. However, in the broader server ecosystem, this can be incredibly useful. There are a significant number of software products sold or supported that base their fees on the number of physical sockets in use. There have been in the past (and may be in the near future) machines where the cost of the lease on the machine is determined by how many physical sockets (or even CPUs) are in use, even if the machine has many more available. Some vendors also include FRU (Field Replaceable Unit) location info in their ACPI tables. So, for example, one or more CPUs or caches might fail in one physical package, which is then reported to a maintenance system of some sort that tells some human which of the physical sockets on what motherboard needs a replacement device, or it's simply noted and shut off until it's time to replace the entire server, or perhaps it's logged and used in an algorithm to predict when the server might fail completely. So, that's why the flag exists in the spec. It seems to make sense to me to have a package ID as part of struct cpu_topology -- it might even be really handy for CPU hotplug. If you don't, it seems to me a whole separate struct would be needed with more cpumasks to show who belongs to what physical package; that might be okay but seems unnecessarily complicated to me. You can also tell me that I have completely missed the point of the discussion so far :-). But if you do, you have to tell me what I missed. Hope this helps clarify... -- ciao, al ----------------------------------- Al Stone Software Engineer Red Hat, Inc. ahs3@redhat.com ----------------------------------- From 1582085242521845840@xxx Mon Oct 23 21:27:42 +0000 2017 X-GM-THRID: 1581082600108245892 X-Gmail-Labels: Inbox,Category Forums