Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5919205rdb; Thu, 14 Dec 2023 03:38:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqH4MW2tmKvDjvAlHhbFFnlE1H6iaKt7p8vvMsTwNzNQ/a0blx47Bfedl4Fok1PYWrktN2 X-Received: by 2002:a05:6a20:9381:b0:190:d456:fb2f with SMTP id x1-20020a056a20938100b00190d456fb2fmr9956128pzh.96.1702553909143; Thu, 14 Dec 2023 03:38:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702553909; cv=none; d=google.com; s=arc-20160816; b=Qe+1EjhF/sYED4ILP52MTN2PbdpbSzXTbjd77NLYDJ/5AMFZxTULoy3d/zfDjxhvKS wgWlfQD4x5v+NpFpSwjuk7uD1dILA4VyVvjytYufQA0JwXQr/H+SgkOS25yHDUj/jjoJ x5bhSxQgyQz+1+752siRqH+PAVD7wMXrdVAQ7NCsu9mXdUhb572Jm94582fUAkHP1FOw NgiP5HFvXaAalmhqsjWP4JfVvZ3JiFiuSeUSC6LqQ9C/RjytzH7szwWkHl3LCKAe1SA1 dN0V8kEwX5J1fA3jRY81qNfO7ydxuUHyzH4f/GK4yJIcmKkde5fmsbWoTe8yoVB3mKGl nDeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=eCoAoBgUajtgtUGvFdD9ZzNATk8JwftlKR9ykJFbKLM=; fh=HBNJCb1O5m4cQgWGcwqoKY3KTbKsr5rANYvH6uVWzvA=; b=P5n1awxUEnqdCYIFWn1W23OgcrE+XIR29NA++RITr2h8aTUQP8QDQnhKlxivaUZmHh 14NSo6Gsz7NOHyPDlEqXy5dDW5IzF7cZiBzJQ1jf5ohAb8ZLEgxRPV2E2JQBsTbpj6th bTdsjXyswU9n6vgy5RGfRTNnxA+rSXiEXqsisWGKAPywLuoVgYCI/kONmY3vtf7CecC7 s08AWqzG8yUQhgK1L8YvSB+ygDopqvG1RlPinX4OO1lS+kvlBV/v3S2M7F9qFfUq7nF7 r9YSvVVD1ZklNTOIWHDSPMjjOF5o5GUQA/JbyeALfLh/lgkU0I+6hMlOPRrdpmlXVL2S efbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id w5-20020a056a0014c500b00690f8063627si11001580pfu.38.2023.12.14.03.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 03:38:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 880188076650; Thu, 14 Dec 2023 03:38:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444039AbjLNLiL (ORCPT + 99 others); Thu, 14 Dec 2023 06:38:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444027AbjLNLiG (ORCPT ); Thu, 14 Dec 2023 06:38:06 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5FE5CB7 for ; Thu, 14 Dec 2023 03:38:13 -0800 (PST) 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 B35ECC15; Thu, 14 Dec 2023 03:38:58 -0800 (PST) Received: from [10.1.197.60] (eglon.cambridge.arm.com [10.1.197.60]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7581F3F738; Thu, 14 Dec 2023 03:38:10 -0800 (PST) Message-ID: Date: Thu, 14 Dec 2023 11:38:08 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v7 16/24] x86/resctrl: Make resctrl_mounted checks explicit Content-Language: en-GB To: babu.moger@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org Cc: Fenghua Yu , Reinette Chatre , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com References: <20231025180345.28061-1-james.morse@arm.com> <20231025180345.28061-17-james.morse@arm.com> <7e611640-9e7a-42a1-b0d7-f8b76999e9b2@amd.com> From: James Morse In-Reply-To: <7e611640-9e7a-42a1-b0d7-f8b76999e9b2@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 14 Dec 2023 03:38:26 -0800 (PST) Hi Babu, On 09/11/2023 20:47, Moger, Babu wrote: > On 10/25/23 13:03, James Morse wrote: >> The rdt_enable_key is switched when resctrl is mounted, and used to >> prevent a second mount of the filesystem. It also enables the >> architecture's context switch code. >> >> This requires another architecture to have the same set of static-keys, >> as resctrl depends on them too. The existing users of these static-keys >> are implicitly also checking if the filesystem is mounted. >> >> Make the resctrl_mounted checks explicit: resctrl can keep track of >> whether it has been mounted once. This doesn't need to be combined with >> whether the arch code is context switching the CLOSID. >> >> rdt_mon_enable_key is never used just to test that resctrl is mounted, >> but does also have this implication. Add a resctrl_mounted to all uses >> of rdt_mon_enable_key. This will allow rdt_mon_enable_key to be swapped >> with a helper in a subsequent patch. >> >> This will allow the static-key changing to be moved behind resctrl_arch_ >> calls. > Reviewed-by: Babu Moger Thanks! James