Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1446984pxf; Fri, 12 Mar 2021 09:40:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzoNdz9xOiuVSeZzF9tcd0Cnq+2b4FudC50nNCBb0/2NL2uH7rpqD2tmqBpWPiexcBvLkr X-Received: by 2002:a05:6402:1393:: with SMTP id b19mr15466828edv.333.1615570807469; Fri, 12 Mar 2021 09:40:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615570807; cv=none; d=google.com; s=arc-20160816; b=lgZumnpPfssA4WogxuP52Mx/DHCRaHw7E03RDHQXG5N8q2E6sSOPbYT2MhPbkfQ4S9 AibQQfhYbRiL2D6cdmgKmt5WPDQt0QQfnGxfLZgME0qI3IYALB+plPVm2XvwkprSZv5y Sc1pn16STwnAbTpbUV89Ms8jXoEDvJUWllO9yEeU6/Uyq4l93eQ4JbBV+Vn+vnpcZ6Sz NMXwW8YFNbxUaQJaRulPkyrWPt7RI59cH4quQWVnh+e/lphy8w5UZpx20f4c+cT28Nur PDUzGX9SUO+uZ0GQX3NYUofE6IclT9IDDb9wLwpMoiXB26eg073LgNQ/SJZbN4rfl1n5 rP4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:subject:from; bh=nQU++RCdV1POGdXIHKR4Encf+Q6fx6TiBhEKlwYqCwc=; b=rzwxxKze6UYDy3z5UeZ8eolz7717bWWeAx0VTi3Vf+rrDgeIkCi0YwQKeSydV154iB nRfABgEMoWEyNscTF8igLM7eBv3no37G09U7p2nkH0RGJ/lKruDvgOW75IzuBn4fdX3a JK2BRU/bqSpR8SQT0j2sSJvfpCvqlM007++s6KL5NabCOVuW4bHX0FcYSjP022U+MQJs 13bFg9IW7zT3sr9jHXgk9W+7xgCSw1zC3RkkD0Y6pRDMh9sYbmVypNAb0VSY1tJeUhE6 HK52lkE1oR9FCaB0bnvmHZE2u9DmlIoQs5KDzKvdSTdaGy9JOAkxGv+e18Drn32v/jLH rFhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r18si4437933eds.390.2021.03.12.09.39.44; Fri, 12 Mar 2021 09:40:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232702AbhCLRi2 (ORCPT + 99 others); Fri, 12 Mar 2021 12:38:28 -0500 Received: from foss.arm.com ([217.140.110.172]:58006 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232871AbhCLRiK (ORCPT ); Fri, 12 Mar 2021 12:38:10 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 693401FB; Fri, 12 Mar 2021 09:38:10 -0800 (PST) Received: from [192.168.0.14] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DA57C3F7D7; Fri, 12 Mar 2021 09:38:08 -0800 (PST) From: James Morse Subject: Re: [PATCH 10/24] x86/resctrl: Move the schema names into struct resctrl_schema To: Reinette Chatre , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , shameerali.kolothum.thodi@huawei.com, Jamie Iles , D Scott Phillips OS References: <20201030161120.227225-1-james.morse@arm.com> <20201030161120.227225-11-james.morse@arm.com> <30449b04-c5c8-9790-f36f-5843efdd2924@intel.com> Message-ID: <149b51e9-c6c5-3236-8a27-94846bd784df@arm.com> Date: Fri, 12 Mar 2021 17:38:07 +0000 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <30449b04-c5c8-9790-f36f-5843efdd2924@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Reinette, On 17/11/2020 23:11, Reinette Chatre wrote: > On 10/30/2020 9:11 AM, James Morse wrote: >> Move the names used for the schemata file out of the resource and >> into struct resctrl_schema. This allows one resource to have two >> different names, based on the other schema properties. >> >> This patch copies the names, eventually resctrl will generate them. > > Please remove "This patch". > >> >> Remove the arch code's max_name_width, this is now resctrl's >> problem. >> diff --git a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c >> b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c >> index a65ff53394ed..28d69c78c29e 100644 >> --- a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c >> +++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c > > ... > >> @@ -391,7 +389,7 @@ static void show_doms(struct seq_file *s, struct resctrl_schema >> *schema, int clo >>       bool sep = false; >>       u32 ctrl_val; >>   -    seq_printf(s, "%*s:", max_name_width, r->name); >> +    seq_printf(s, "%*s:", RESCTRL_NAME_LEN, schema->name); > > From what I understand this changes what some users will see. In the original code the > "max_name_width" is computed based on the maximum length of resources supported. Systems > that only support MBA would thus show a schemata of: > > MB:0=100;1=100 > > I expect the above change would change the output to: >     MB:0=100;1=100 Aha! Despite the comment - I've totally miss-understood what this code is doing. Thanks! James