Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1903302rdb; Thu, 7 Dec 2023 11:56:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFT+018gqtdzdInRY5PygO1ri+0nDslWzKIAt7+yVLcPmHqQn+yT5ty7wmS4AUmkKsKPMEo X-Received: by 2002:a17:90b:4b4a:b0:286:b062:ab7 with SMTP id mi10-20020a17090b4b4a00b00286b0620ab7mr2516872pjb.41.1701979004288; Thu, 07 Dec 2023 11:56:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701979004; cv=none; d=google.com; s=arc-20160816; b=jTmo8IPXBOaEWx97x7Z3STzu74WmCQh13JcP1GJEoALXx6/4zsFSz85CCPvWvCvTQ2 ZzkRLR86TfPmjFriHNV1DGzSQ2CjSWlqUfVPVuqdeeafDmtYmD+QkFxNpAlg1RPuk08p AsfoJkHC0RY1heBxBsgkT9g+Xs/bw8UU/hDQmUv1vIXr5n+yPLwXICTdPa1ebT+pRAaa JRmObf+CeI38BoWJz72lh1s9LT99F7TRkbsLq8ojrGUtBVp6FBbRWFDZgdysy1UjeskZ ty7ArYE/Q5oyGpNgo6+EMTjFv0VT2dBchUUyvNMhV0IXcwg//gdDdCBaKAN8dv1zp/fT qGTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=f9JlD92SAhlyzJ/H9w/2Qjdj89qC0G454/mn0o8YvQA=; fh=EIH9XAmicvPIUSP7TBeBhZ/WaoqG49JQ3xV1i3Gl7Co=; b=nks9U8cxCu1eTh4YX383uZULZUgDMkFJMnwG+dB2RYfguUBcRS3GEqKXvtTM+GuySP Gc2u1ky1Nalsk3PXO4JrocEpaKQqDSJqaQIbxLT2ECD5igPIm8vmid1UbzG0QeUhh57O xv1XeC844aHbC6ASFLq3AV6UtTxsOly0BclL+RwDqoZkOidFEa7qEddorsgkmbIbmmKx GH8cCtkxh2MRlzUUps7p+6ikJyanmc2j/SdhoFam7tF6/4bbZ+zcqKWm1C8//i6slIJA m6zQf75GFn/FWvFPSTyWBni6xoAT/qv/VkxoevVstMmEiuWmSft4B9TT2im3l+QjFCJ7 DKJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DD7KdeP5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id f31-20020a63555f000000b005c1e762bc50si195615pgm.742.2023.12.07.11.56.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 11:56:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DD7KdeP5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 97EA480DBAE6; Thu, 7 Dec 2023 11:56:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230029AbjLGT4T (ORCPT + 99 others); Thu, 7 Dec 2023 14:56:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjLGT4S (ORCPT ); Thu, 7 Dec 2023 14:56:18 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C5D110EF; Thu, 7 Dec 2023 11:56:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701978984; x=1733514984; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=J23aFV6iwILzuNztzQ1fpjCoJLBjXYWEnIF8zssZEKU=; b=DD7KdeP5xGzOlZNHQ9ksJWmfPVDbVPLARXS5uWPQB81qeFispzyzqz4g 1KLH2yCsXQ7MihmV92lZz4dRsTk74WzDZvzuYS/hcSO7A/ogKW3+wy/4h 08bbxACe9rCFvsT+xFAyVDL51KmV/3upxhi8xkO1jfamb/Tdoj2OsuuVW 0fJu4kCLqKefW00v75bsX1ZFxsndXnBgJM5Adh6ppRMASBY25XOYp3Uws Js4CsL34OGmhd/qeigVcDWhPh+LAou1S9D4rMHp7OFTkY0SV9/N9qxXWZ 0hU4EKF8Z58t4PVO/2FurQiA987oTBIFlWfZavk9e3IdNXX0aKtt47L2b A==; X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="15848938" X-IronPort-AV: E=Sophos;i="6.04,258,1695711600"; d="scan'208";a="15848938" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 11:56:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="889858586" X-IronPort-AV: E=Sophos;i="6.04,258,1695711600"; d="scan'208";a="889858586" Received: from agluck-desk3.sc.intel.com ([172.25.222.74]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 11:56:23 -0800 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Peter Newman , Jonathan Corbet , Shuah Khan , x86@kernel.org Cc: Shaopeng Tan , James Morse , Jamie Iles , Babu Moger , Randy Dunlap , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v6 0/3] x86/resctrl: mba_MBps enhancements Date: Thu, 7 Dec 2023 11:56:10 -0800 Message-ID: <20231207195613.153980-1-tony.luck@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231201214737.104444-1-tony.luck@intel.com> References: <20231201214737.104444-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 07 Dec 2023 11:56:40 -0800 (PST) Two changes relating to the MBA Software Controller(mba_sc): 1) Add a new mount option so the user can choose which memory bandwidth monitoring event to use as the input to the feedback loop. 2) Update the "mba_MBps" mount option to make use of total memory bandwidth event on systems that do not support local bandwidth event. Signed-off-by: Tony Luck --- Changes since v5: Babu: Split into separate patches for the new mount option and the update to the exising mount option. Since this is now a series, I also moved the Documentation change to its own patch. Reinette: Use "mbm_local_bytes", "mbm_total_bytes" as the strings for the new "mba_MBps_event" option. This sets a precedent that new events should follow the naming convention for the monitor files for the event. Reinette: Update rdtgroup_show_options(). I'd completely missed this in the earlier versions. Note that when the legacy "mba_MBps" mount option is used, this will show in /proc as if the new option was used: # mount -t resctrl -o mba_MBps resctrl /sys/fs/resctrl/ # grep resctrl /proc/mounts resctrl /sys/fs/resctrl resctrl rw,relatime,mba_MBps_event=mbm_local_bytes 0 0 Changing this to exacly match what the user typed would lose the detail of which event is being used. Reinette: More documentation needed. I added some text on why using total instead of local might be useful to some users. Tony Luck (3): x86/resctrl: Add mount option "mba_MBps_event" x86/resctrl: Use total bandwidth for mba_MBps option when local isn't present x86/resctrl: Add new "mba_MBps_event" mount option to documentation Documentation/arch/x86/resctrl.rst | 16 ++++++- include/linux/resctrl.h | 2 + arch/x86/kernel/cpu/resctrl/internal.h | 3 +- arch/x86/kernel/cpu/resctrl/monitor.c | 21 ++++----- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 63 +++++++++++++++++++++----- 5 files changed, 79 insertions(+), 26 deletions(-) base-commit: 33cc938e65a98f1d29d0a18403dbbee050dcad9a -- 2.41.0