Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp814539pxf; Thu, 8 Apr 2021 13:14:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzxhJBwDAB7h4KsyVf0vtDZ7bfy11f1Rm0Nhwn9E5lD0S9MG5iNMPSAxBviI7j87DVW8PJ X-Received: by 2002:a17:906:7194:: with SMTP id h20mr12100937ejk.432.1617912862216; Thu, 08 Apr 2021 13:14:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617912862; cv=none; d=google.com; s=arc-20160816; b=rSehNjQEmaTdxgjnFsI5GT4zyAg/oyQWEPUIVTpYjcgzRr80W6EBTvcuGxwWPmMiWc 1GbZpbRmBLRxd2dHtajtVHpE+s5c4TFhn56u53ADd6sxmn23leNivnzm9orhqg/G1c0H DpDW1hCNaFsDG3NzkNCRm/+NY79RkVnGH4Bl4z1DTGn4bZxUiX5xvqdvZylni8D4fzzz DHy14NLb7QGAEDUYJi6PvunyByJ6/GLvJhj6lBSnkDiWm2s5HMW4Yix52FloalKfdDCy zaChl7NsGXlOBMVzA3kLCQLCLOm4VHB+/Qqa5PDtbhWbd1kyzUzb6TgigyClVvw74Ub9 4zdg== 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=xP3opsSyWdbph/oVA58HjwVerWzBop7tbDvqgRYUk+U=; b=RHiBZEU1P23S0Bit5ASZoEPocgDeiF8oaAnfcjtKiW+XoqLl1Nf79/o1u7Wc6gxAfY 1kGN+QYxPY09bFI0ui2i1DAFVE0ItChZiyE5O3KAGylTcKeUqT5VoHkcXBABixlSuCqk 9aLhD4e1OyNNfDYyZEk9udWY0y+ow9qeRAmQf6dwG74U85iBT6y5gN40D3IxS/sAwch8 LUoc7jZGUu6Rkj8pn9UZquWi1Ptie2hCrPmQ/8jbDxJO2Yqia82d8p4HOJGGVbleaXkD vuGYHghcBt90Djtq5Hvh1x5/LumBZUUFpxz0l6YzEgSMEKe4Cxq4jVu93un5inhkgKf5 WgJg== 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 by28si484438edb.412.2021.04.08.13.13.53; Thu, 08 Apr 2021 13:14:22 -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 S231732AbhDHUNP (ORCPT + 99 others); Thu, 8 Apr 2021 16:13:15 -0400 Received: from mga17.intel.com ([192.55.52.151]:39834 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230522AbhDHUNO (ORCPT ); Thu, 8 Apr 2021 16:13:14 -0400 IronPort-SDR: ZuNRDsM7tic3xvfByCA5TShiz5wTNV4Drg2P+6TpoY0goUrEgHiE72RW0/QYTq4I2a7Rrwuh5d +EAmHrQBzm+Q== X-IronPort-AV: E=McAfee;i="6000,8403,9948"; a="173708040" X-IronPort-AV: E=Sophos;i="5.82,207,1613462400"; d="scan'208";a="173708040" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 13:13:02 -0700 IronPort-SDR: Kg/e5hybWEdrP9XMToUwuG+GabS9yvdyTe5SKbIzit7KRFZoD1+sVF2rP/R+YoDVkg2suDOG+M kz2tdeEX8TGg== X-IronPort-AV: E=Sophos;i="5.82,207,1613462400"; d="scan'208";a="422399429" Received: from rchatre-mobl3.amr.corp.intel.com (HELO [10.212.185.130]) ([10.212.185.130]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 13:13:01 -0700 Subject: Re: [PATCH v2 02/24] x86/resctrl: Split struct rdt_domain 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-3-james.morse@arm.com> <9cb3f9c9-8295-6e40-9f98-1944b9b3c59b@intel.com> From: Reinette Chatre Message-ID: <905a2bbf-f117-4b20-b875-dc1133d83f0d@intel.com> Date: Thu, 8 Apr 2021 13:13:01 -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: 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 4/8/2021 10:20 AM, James Morse wrote: > On 31/03/2021 22:36, Reinette Chatre wrote: >> On 3/12/2021 9:58 AM, 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/. >>> >>> Split struct rdt_domain up too. Move everything that that is particular >> >> s/that that/that/ >> >>> to resctrl into a new header file. resctrl code paths touching a 'hw' >>> struct indicates where an abstraction is needed. >> >> Similar to previous patch it would help to explain how this split was chosen. For example, >> why are the CPUs to which a resource is associated not considered a hardware property? > > Similarly, because the meaning of those CPUs doesn't differ or change between architectures. Got it. This seems to be a repeat of the discussion about patch 1. Please note that the description of rdt_hw_domain in this patch reads "hw attributes of a group of CPUs that share a resource". This can be understood to mean that the struct contains attributes discovered from hardware. > I've expanded the middle paragraph in the commit message to explain why the arch specific > things are arch specific: > | Continue by splitting struct rdt_domain, into an architecture private > | 'hw' struct, which contains the common resctrl structure that would be > | used by any architecture. > | > | The hardware values in ctrl_val and mbps_val need to be accessed via > | helpers to allow another architecture to convert these into a different > | format if necessary. > | > | After this split, filesystem code code paths touching a 'hw' struct > | indicates where an abstraction is needed. > > and similarly changed the kernel doc comment. Thank you. I assume this includes changing the "hw attributes of a group of CPUs that share a resource" I mention above. > > Let me know if you prefer some other struct name. > I am ok with current naming. Other folks may have better ideas. Thank you Reinette