Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp35562rdb; Mon, 22 Jan 2024 11:03:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/6mO2UydWOQSFeWav4CDI+I3oh/8ENByHvQQ/jsW4OB53G0z6HVgxbuNOQzfnVRekjT1J X-Received: by 2002:a6b:dc05:0:b0:7bf:97a7:5d9b with SMTP id s5-20020a6bdc05000000b007bf97a75d9bmr2680161ioc.27.1705950209265; Mon, 22 Jan 2024 11:03:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705950209; cv=pass; d=google.com; s=arc-20160816; b=BecuPF2GYE/+z24h0VIOWnMAVs78VK8zsOsUbyWmDVsAiE3aJu3Jz69jjKW27YL9By m9WGegAW6QNZR2bx7YtzSQeok2u+kVD7twDMpukuROn1hcUEVyqyCPbAXaDep0oHFplf VO447zot6WG9yxO3Jq8pnrJX/PxF6Ls0+dDN2f5J8Wf2y6cfqELsTFxuYONmrifErfKM AuNIs1kGLaSRiNybSsdIXFvzCTowpmyJn0XMLdRWdQHaUuMRqPgwZb3ozf+uXoejwK2+ HJV5ZCP2rKAT+8YgHtCbKmvyzWCXef2cutLWcLGGBT2zDkkha9rdxPz1t7WFi+6egLRw pLYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=NtckBR3TcT+8he69QlRSmZ6hCyvdcL3370IbReUCHrw=; fh=HBNJCb1O5m4cQgWGcwqoKY3KTbKsr5rANYvH6uVWzvA=; b=jx2oHJLOU7CV9zhSRc8q49OFJMhJQ9VLSC1EpFJ7BlPV503b2oe8ZwFUN80+TQbxeb KnwwSXcq974vp2MT922F2EpayLKD2kYAOH8DGRKsmcm93kB8qb4q39Oq+H6RWsDsMOhr 96Nk8v3MmawhmSfKqvY85a9sXN2EcgH+86D6l38CwhxlcTqW8J5Wb6tMNKDhBKaZEPqu Vs8QRe5FeyZTJSpk+HFs5QsBKQF4JBfu4KVRsojIXl4bu4N7dxnNfZlPD/yTDeHSQQLo 6EQksnM+fGF9h85/C05WwZJsUt9XsleogYiASWn+mVAieqFST/vJD2/CU38ZrSwEjpV9 X/cQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-33904-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33904-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id bx2-20020a056a02050200b005ce46d33cdcsi8834176pgb.343.2024.01.22.11.03.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 11:03:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33904-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-33904-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33904-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id F19BDB3791B for ; Mon, 22 Jan 2024 18:35:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A1E3D5FB86; Mon, 22 Jan 2024 18:06:34 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75FF85F575 for ; Mon, 22 Jan 2024 18:06:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705946794; cv=none; b=JaUqw0bh+rGD7seHronWuKvps8FUsAuOOFSDmCB9OxACNmcrxsvcqA3DTbW0qyQ9XPnLHMRz7u8aOjTXRsBCoNC7G0Acm+DiHnb/wOSAX5fNAAiKrE25TQEE7NETYBzIsTwTDSgYsVoRcKuza5EGWgfQtTOr3znis/2sRlfP8Bc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705946794; c=relaxed/simple; bh=NtckBR3TcT+8he69QlRSmZ6hCyvdcL3370IbReUCHrw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rhwO+oacS+SHU20ADasPC+n1nwXlbgYgi+yn5Rixk47M4zC6KhZgOOhiP7YzOiliiIzSTSQa7bYQFSMZmwKsxJ5Z436LB0m2Z+8iGn4Z8IvPiH5UfaVD6iHZGTbTuiz1LZlmVwsF1Tle0Zg3DynMZVoON6bdmffJahkubfaEB0M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 080A31474; Mon, 22 Jan 2024 10:07:18 -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 22DFD3F5A1; Mon, 22 Jan 2024 10:06:29 -0800 (PST) Message-ID: Date: Mon, 22 Jan 2024 18:06:27 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v8 19/24] x86/resctrl: Add helpers for system wide mon/alloc capable 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: <20231215174343.13872-1-james.morse@arm.com> <20231215174343.13872-20-james.morse@arm.com> <4283c1e1-5f3b-4e55-a40c-1a46b3d8e067@amd.com> From: James Morse In-Reply-To: <4283c1e1-5f3b-4e55-a40c-1a46b3d8e067@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Babu, On 03/01/2024 19:43, Moger, Babu wrote: > On 12/15/23 11:43, James Morse wrote: >> resctrl reads rdt_alloc_capable or rdt_mon_capable to determine >> whether any of the resources support the corresponding features. >> resctrl also uses the static-keys that affect the architecture's >> context-switch code to determine the same thing. >> >> This forces another architecture to have the same static-keys. >> >> As the static-key is enabled based on the capable flag, and none of >> the filesystem uses of these are in the scheduler path, move the >> capable flags behind helpers, and use these in the filesystem >> code instead of the static-key. >> >> After this change, only the architecture code manages and uses >> the static-keys to ensure __resctrl_sched_in() does not need >> runtime checks. >> >> This avoids multiple architectures having to define the same >> static-keys. >> >> Cases where the static-key implicitly tested if the resctrl >> filesystem was mounted all have an explicit check added by a >> previous patch. > Reviewed-by: Babu Moger Thanks! James