Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp273357lqb; Tue, 28 May 2024 15:23:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXJ+zIsDjcn4ZPyQNwoMt2FkpAcg3EYG6Um7Kju+kfxz8mZyaWP/4Mh8IBUPfg93enfHXiwHAbXbZhHNJWhjfaEGOlQghGx1ZucX2ugNA== X-Google-Smtp-Source: AGHT+IG0XbdsMRL/RZB3Ko3SBdXs8jRmbHFaqYlOidggXRo8jcSpfOiJN0aePZga+hRjLEAl5ELP X-Received: by 2002:a17:903:8c3:b0:1e4:c8b3:dbaf with SMTP id d9443c01a7336-1f448c24e3emr138502785ad.33.1716935033053; Tue, 28 May 2024 15:23:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716935033; cv=pass; d=google.com; s=arc-20160816; b=KcEvCkVHU2qlfvfpf48XQygQLZJzTYWnxxZCKxyBfZKZX1UyJ7KtSTYhWhCbHUM2gy 2fme4BmguDNpATvb8FAewh/vvGKtQciHfpm2j6sCiKZYwhdLvgWfFNiRUUPHM7L9r3tl MXyB1W5h+FNGdoklvd6KkKNK28MIsLsfJ7A3nOgl2sj3WqoHTMX/a9WjyqH+jW8iSIBf 5bYV/cJ8423IqRXQvZd4pBxAffftU2HdhM9GzJGQTHmyXIWMP+aHqqAcyZjcHDtn9wTF sRlTxtDlsMgc9EpSewkwQLC56wdbZqp8jhouM1QzXjJkvX0nsEAm597L8OpyhU4suIQz 9EEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=LaIlrk7gUuY4oBBmgjBActM8ZAoLWUZgmq9O8IotdkM=; fh=qTx768JYq6oxdX3jfjUzjJGF83d0IKGtQzHdow3lchk=; b=hN8Gwz6GNX2y180BnIjZ667vWgoe3IGyw1lzFaSTmI9k90AymlFsxtOpJuL4N6PCVt 964um5TZ1zHBS73wfiF6AFE+U5BjM/VZ+oBysh+fnl4Sw7EJqXR0Kowb8CMeiA+/lQlx Sngr1vV2mohWt0O3fsYf68smx3tYRAXYEJsGchRhQM8NrRj9jBrObWrU6bSPyVUlEsXu b8XU6QnOKaSNAR/k9mpcyPG90S0/MhWS98uc4TxuH7GKSCokEy9qYt0kHo9dHjDXkrtq UDwCXX1pbTD01+crfMwz1aZAjU7S5hwDEXUhQEk55fWtMMsGn/T+XvAI8PXL0eo4FnCo SiMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=e6gtNYeL; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-193162-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f46558b756si67467745ad.649.2024.05.28.15.23.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 15:23:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193162-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; dkim=pass header.i=@intel.com header.s=Intel header.b=e6gtNYeL; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-193162-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 309EBB2580D for ; Tue, 28 May 2024 22:21:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A34E913F428; Tue, 28 May 2024 22:20:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="e6gtNYeL" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4406413E8B6 for ; Tue, 28 May 2024 22:20:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716934823; cv=none; b=f+0yEJi1S4j2DTjYACoOsbA3MiTDAqVD66xwjPB2apMEEPsq5hvWSp3qsw3nWFWPyN2PxRD4Wq5HF3c1+TeLt9cDvUwjRRgCkm+tsp19D1Q2li8nwE4PVO5+5PQx1FNWW5e8h+Urm/PLpF8EkWT1DvqtPqNJChA2U1ZGt74I534= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716934823; c=relaxed/simple; bh=Z98ziZarYICAVphRTOHb1SbLcVID2nk5s6aKEDY0vks=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s+vsGwd97dYOl8O7x3/rupWsyt9WiliGCH6nGPbxpWEQMxqUTZ6N8WM0PzWy+EX7buDuf3bT2e7TFT8sk6gInZDA6Z9Wr408PEeeMxTW40nBAYO3JjCcAiBd4Bzv0X2EjtflZ1wyARRFbSs80XdvIAJqPcs3FXwQqpYzNAlcFTk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=e6gtNYeL; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716934822; x=1748470822; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z98ziZarYICAVphRTOHb1SbLcVID2nk5s6aKEDY0vks=; b=e6gtNYeLSATN+zOAcgH1ioDJgqUgMx0MWgjAQJ73+r1BnHnuVVPQ5wiJ wbyuz6txvRJLAb+BsrJF90SgogBQVzAKgD49udpIaQERSbjv5rSkneDM/ iMkXJGc4rgDhQT2A4q6ArMWqKBLHlG9jIAcR4oQetSjGkX014eCJFYjr1 pabZxmuk3RLbY3UoapZJX5ocf+NXHztYz+ud0KhmuVzTPeFHz2YiWi6+V FGr06mY4z6T6qsgJP9IuKyUcTmIn20vcO7iwxOzoCR0yEkC3Odg33NRBK /V2meoJcDtPxAyY57nRPdVulBUORqsX6ymElZC+iNvon/tf9nXtq1BZnY w==; X-CSE-ConnectionGUID: zTuZ0iAlTmyW4NXVgMPnrA== X-CSE-MsgGUID: Syz37zY0Q362/bjK1Sd/OA== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="30812182" X-IronPort-AV: E=Sophos;i="6.08,196,1712646000"; d="scan'208";a="30812182" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2024 15:20:17 -0700 X-CSE-ConnectionGUID: ZDVryoqgQO27/6KJWYLq+w== X-CSE-MsgGUID: TSd0MCchTYKKPyPS5fNjlw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,196,1712646000"; d="scan'208";a="40090731" Received: from agluck-desk3.sc.intel.com ([172.25.222.70]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2024 15:20:16 -0700 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Maciej Wieczor-Retman , Peter Newman , James Morse , Babu Moger , Drew Fustini , Dave Martin Cc: x86@kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v19 07/20] x86/resctrl: Block use of mba_MBps mount option on Sub-NUMA Cluster (SNC) systems Date: Tue, 28 May 2024 15:19:52 -0700 Message-ID: <20240528222006.58283-8-tony.luck@intel.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240528222006.58283-1-tony.luck@intel.com> References: <20240528222006.58283-1-tony.luck@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When SNC is enabled there is a mismatch between the MBA control function which operates at L3 cache scope and the MBM monitor functions which measure memory bandwidth on each SNC node. Block use of the mba_MBps when scopes for MBA/MBM do not match. Signed-off-by: Tony Luck --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c index cc31ede1a1e7..1cc4794d5a2e 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -2343,10 +2343,12 @@ static void mba_sc_domain_destroy(struct rdt_resource *r, */ static bool supports_mba_mbps(void) { + struct rdt_resource *rmbm = &rdt_resources_all[RDT_RESOURCE_L3].r_resctrl; struct rdt_resource *r = &rdt_resources_all[RDT_RESOURCE_MBA].r_resctrl; return (is_mbm_local_enabled() && - r->alloc_capable && is_mba_linear()); + r->alloc_capable && is_mba_linear() && + r->ctrl_scope == rmbm->mon_scope); } /* -- 2.45.0