Received: by 2002:a05:6a10:e90b:0:0:0:0 with SMTP id gt11csp748878pxb; Wed, 31 Mar 2021 14:40:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7L+Fd1LnFg7lTFNX0daE7b/y9kHxZquaROZbxj7mjSAX9v58BzDohytp5HRmHbDH2MMWD X-Received: by 2002:a17:906:ada:: with SMTP id z26mr5839176ejf.438.1617226845250; Wed, 31 Mar 2021 14:40:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617226845; cv=none; d=google.com; s=arc-20160816; b=zA3rTkPELwcb7gdscupePKw2sE7iFQhF4xT4MMXHQU6cFVa6KXnSCWoFFkAyS6GdZf r/s8v3DoqzDlyhX/EO4KmRYasor1lbAB9aZhPrX4+FHf1Uo8pH6NvMb1jAUmSwxahhPm Snw2WnaBYCyme6xxrh/UEyuRusLIVZ7++3dXpUPm5rAiM3EdEGhVn0gQ2X1+vwe+c9k0 RbUkyO3NuymmxESHQR7a+bPzrO/Qyup2ezBHNAOpecEPvm53FeTcdn98yx4CGbpGJ6vh vvA4dDqHKa41Xe7xpZtyX9LLGbMtIriUN3CVlxZYrJv7Lb6N6OvcEzR4R5d3BUbnoMbI frOw== 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:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=6t4XpAsNYLyiZpwHuvOd9N091Sy/CoTRO/iNfRYx8os=; b=gztx711Z1IyImm3xw8UdAFnGLtYFa2a+dqDadWryG9zCk5FIAvsO0FyxAF5sP6w5np wqsc/iv1k9z4tQmNenBKS6Ko1b3GuhZs+0fil1+xNQJY7SulXwoHhKoCIsSFhpI2HsEr EjgYksS5Sx2ZQhZvfQb0f8tAJMLqe+thL3Q2EXDOEYh1pfVp29ytdhLN5ih9N4dyRF3f WgEQRaUBpzFCWK19YbkgGM6TEfZCW1oooV0zydYta05O6bi8VjafgCclv7GMPaXgbHYL /To7nBkC7tOeLA2QspAm9A0oTIwrGMnJ3cbVRWbySFU4Ji6UJYjmBOOt7+hONCtMSiCM 9x7g== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d8si2943289edy.246.2021.03.31.14.40.23; Wed, 31 Mar 2021 14:40:45 -0700 (PDT) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232718AbhCaVjX (ORCPT + 99 others); Wed, 31 Mar 2021 17:39:23 -0400 Received: from mga18.intel.com ([134.134.136.126]:8206 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbhCaVjN (ORCPT ); Wed, 31 Mar 2021 17:39:13 -0400 IronPort-SDR: Kgy/PqLNF4NoNHVmrzhKYUVEp8ETMx4elyWNEfnzVDYu6noChz9fQigslMfOe/o5Tb65L749N1 NB0O0mkWEJMw== X-IronPort-AV: E=McAfee;i="6000,8403,9940"; a="179629597" X-IronPort-AV: E=Sophos;i="5.81,295,1610438400"; d="scan'208";a="179629597" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2021 14:39:12 -0700 IronPort-SDR: XvTn2FJpFtXBQLuiJg6yOjQIjGzmROuVLmgSrrWRsSCPuMTMlAcBO55lxgNOKe4TVnujBmTsdN bchhyS7PKoTw== X-IronPort-AV: E=Sophos;i="5.81,295,1610438400"; d="scan'208";a="377433317" Received: from rchatre-mobl3.amr.corp.intel.com (HELO [10.212.177.63]) ([10.212.177.63]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2021 14:39:11 -0700 Subject: Re: [PATCH v2 07/24] x86/resctrl: Store the effective num_closid in the schema To: James Morse , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , shameerali.kolothum.thodi@huawei.com, Jamie Iles , D Scott Phillips OS References: <20210312175849.8327-1-james.morse@arm.com> <20210312175849.8327-8-james.morse@arm.com> From: Reinette Chatre Message-ID: <0d16823c-58b4-1c01-b621-7fdc4ba84333@intel.com> Date: Wed, 31 Mar 2021 14:39:11 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210312175849.8327-8-james.morse@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi James, On 3/12/2021 9:58 AM, James Morse wrote: > The resctrl_schema struct holds properties that vary with the style of > configuration that resctrl applies to a resource. > > There are already two values for the hardware's num_closid, depending on > whether the architecture presents the L3 or L3CODE/L3DATA resources. > > As the way CDP changes the number of control groups that resctrl can create > is part of the user-space interface, it should be managed by the filesystem s/create is part of/create as part of/ ? > parts of resctrl. This allows the architecture code to only describe the > value the hardware supports. > > Add num_closid to resctrl_schema. This is the value seen by the filesystem, > and when the CDP resources are merged, will be different to the value > described by the arch code when CDP is enabled. > > These functions operate on the num_closid value that is exposed to > user-space: > rdtgroup_parse_resource() > rdtgroup_schemata_show() > rdt_num_closids_show() > closid_init() > > These are changed to use the schema value instead. > > schemata_list_create() sets this value, and reaches into the architecture > specific structure to get the value. This will eventually be replaced with > a helper. > > Reviewed-by: Jamie Iles > Signed-off-by: James Morse ... > diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h > index c6f749f54765..0ff10468940b 100644 > --- a/include/linux/resctrl.h > +++ b/include/linux/resctrl.h > @@ -165,10 +165,12 @@ struct rdt_resource { > * @list: Member of resctrl's schema list > * @conf_type: Whether this entry is for code/data/both > * @res: The rdt_resource for this entry > + * @num_closid: Number of CLOSIDs available for this resource It is not clear what "this resource" is. This description is essentially the same as its copy found in rdt_hw_resource. Could you please improve these descriptions to capture the differences between the two num_closid values? Thank you Reinette