Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3907209pxj; Tue, 15 Jun 2021 11:09:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBp/tUOyGhS5kQ2ODeC8qvfT0FqksmduQdpOoj1lwQ58QUF3FG/m9+D1UYHEXMWxhdxRfM X-Received: by 2002:a17:906:b24a:: with SMTP id ce10mr881723ejb.83.1623780543104; Tue, 15 Jun 2021 11:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623780543; cv=none; d=google.com; s=arc-20160816; b=0Bs7Ya7I9v7ulfq1J2rx8DdRrdVI5S3tWP8kCAL39/IJZkG5iatlWLyg/YV8Sabkep YaUJj1rziCDNqxV6VHaKvWr9Vxq6jrbZEen+p1RozVNNc7/8UcBtKQRnfB7PyGA/pa5l YrVFBtK8BQcJVxvwBrvyW+kwKwKaTSCBTSLKu53DZ7bRnUlJkyGV8OM4cb2c4iqbkoi5 31ql6XmS2XqVTaEfTThSEJWpnuyNlJ0mrxsQWIjyYfcQ1qlcDU83ByCQDgrPyxSzHe/7 1GfjG5cICNqHRQrTDjiMnrFiEuzp+Nw5bm/uW0wpG3VwSxjPqz84ZLNOFFYQSOkBL5w1 qwKg== 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=cUJb7wzBqKkI6leui3lquARkP//gCNMKca4/DsnGUgQ=; b=ufLfTIMGuALokkYl3rFy4UGY0YxXe9REM/xP2uOwQmXAu7pP8S+qGjZMyb0JqyxTZM 3e0vfoNHXIRKpihKPDOBbr4dyn40q1+nLbgjoYaHCwWpe9uORrrFTc9VNm6T/GBt7OrP lr8x3FuLxM2rJaGfkYkyk3EYGFHdeb4D+/t6fAdX5rNntaqVEMgxA2EL77gOVL+15noM 4yflUrKFsac/z+A2RxH3YpC6s0K4u81pcBhzOLMuSm8YpPs6x5SHtgeKlxoJx5uKwg6U z6Yu8+16Egtr7g/64h3eQfvSYoc0NKPAFILAVMaqTcqcSny3i8qkfR0g14ymU7G0zJDJ nDNg== 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 r12si14926049edo.370.2021.06.15.11.08.39; Tue, 15 Jun 2021 11:09:03 -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 S230000AbhFOSJf (ORCPT + 99 others); Tue, 15 Jun 2021 14:09:35 -0400 Received: from mga14.intel.com ([192.55.52.115]:52197 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbhFOSJc (ORCPT ); Tue, 15 Jun 2021 14:09:32 -0400 IronPort-SDR: 8n2KEIkAJjqESnr/C5AbX648ylJ/2f2lQXDmitxLrxQrp4DA1Hh+1zXEy0vVv0Q8zV8qyezsg/ wr1VoEyaoZwQ== X-IronPort-AV: E=McAfee;i="6200,9189,10016"; a="205862421" X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="205862421" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2021 11:07:27 -0700 IronPort-SDR: l17N2PZlkqbXrxLTnLXGRVq5xI5edKcK94Sphr+nDQ63Sy2VK4fvUPxECDS1wkCLfO2VgFUTmL lG35A/9JR/nw== X-IronPort-AV: E=Sophos;i="5.83,275,1616482800"; d="scan'208";a="554528532" Received: from rchatre-mobl3.amr.corp.intel.com (HELO [10.212.184.247]) ([10.212.184.247]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2021 11:07:26 -0700 Subject: Re: [PATCH v4 01/24] x86/resctrl: Split struct rdt_resource 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 , lcherian@marvell.com References: <20210614200941.12383-1-james.morse@arm.com> <20210614200941.12383-2-james.morse@arm.com> From: Reinette Chatre Message-ID: Date: Tue, 15 Jun 2021 11:07:26 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210614200941.12383-2-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 6/14/2021 1:09 PM, James Morse wrote: > resctrl is the defacto Linux ABI for SoC resource partitioning features. > > To support it on another architecture, it needs to be abstracted from > the features provided by Intel RDT and AMD PQoS, and moved to /fs/. > struct rdt_resource contains a mix of architecture private details > and properties of the filesystem interface user-space users. "user-space users" -> "user-space uses" ? ... > +struct rdt_parse_data; > + > +/** > + * struct rdt_resource - attributes of a resctrl resource > + * @rid: The index of the resource > + * @alloc_enabled: Is allocation enabled on this machine > + * @mon_enabled: Is monitoring enabled for this feature > + * @alloc_capable: Is allocation available on this machine > + * @mon_capable: Is monitor feature available on this machine > + * @num_rmid: Number of RMIDs available. > + * @cache_level: Which cache level defines scope of this resource > + * @cache: If the component has cache controls, their properties. > + * @membw: If the component has bandwidth controls, their properties. > + * @domains: All domains for this resource > + * @name: Name to use in "schemata" file. > + * @data_width: Character width of data when displaying. > + * @default_ctrl: Specifies default cache cbm or memory B/W percent. > + * @format_str: Per resource format string to show domain value > + * @parse_ctrlval: Per resource function pointer to parse control values > + * Unexpected space here. > + * @evt_list: List of monitoring events > + * @fflags: flags to choose base and info files > + */ > +struct rdt_resource { > + int rid; > + bool alloc_enabled; > + bool mon_enabled; > + bool alloc_capable; > + bool mon_capable; > + int num_rmid; > + int cache_level; > + struct resctrl_cache cache; > + struct resctrl_membw membw; > + struct list_head domains; > + char *name; > + int data_width; > + u32 default_ctrl; > + const char *format_str; > + int (*parse_ctrlval)(struct rdt_parse_data *data, > + struct rdt_resource *r, > + struct rdt_domain *d); > + struct list_head evt_list; > + unsigned long fflags; > + > +}; > + > #endif /* _RESCTRL_H */ > Reinette