Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2894401rdb; Mon, 4 Dec 2023 10:17:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1OEBHPGbMSNKrk2x/gUz1bZSIEoDmu0sWDtPuV48VTd6sYwzm1ctyiOp99pRKY2IKWApn X-Received: by 2002:a17:90b:4d09:b0:286:a93f:bdb9 with SMTP id mw9-20020a17090b4d0900b00286a93fbdb9mr1363670pjb.33.1701713819948; Mon, 04 Dec 2023 10:16:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701713819; cv=none; d=google.com; s=arc-20160816; b=IrHBgr0Ymn99swfwWEo8kMPv5I1lYFGt2DvDpxr2+OIUL2VD8fuwBVGYuuCKP2c5A+ Rv6y9X2Y/ReTuTMLQCm47AQiFySDs1Ugkt3haw9CNiDx8PJ915Niic2fVTkTQ646ChHl 8CLr9kfWjGoq2HWgcCqkgzHKyohQAHXfqh9EoZ3vnFV7MbZGlmCwv87AcHO+xzvpk4XV g7RyeoPETcmpScmJ/gblgOVar9eiTuzhPYe0m4CUf7zmkL18IbzqX8QOImv991Zwi3bJ 5AiU2fKtQchc3E1BXbmKmwj9yfyI/2rTrXztvfkANddaL63fnfCFxqQ6h+n08p8T+2Gg rxug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ken2vFxTIMsFc03s9KYnu63AyJzkLR0C6ch7l5xyYgU=; fh=Jg1btvAWNwr2yYtSh2/FUQeNXy3EyrmsqIuPCY+FxJU=; b=s0Yas4XGyqI4RpvNz3z4A1S6fIj2PJehZXEyZcHKMLHztsCbQyyH3Gn/WSKmDQP/yW T2n6jjnXdGPqxMshkqSqu4sEF5Y3ZvlPNPEEdcnsjCndxZqp4wHJY5xf3EwP6UA3vcKs fGM9JcTT+qI2DjNeVGjp+GgNlgvOc6y10Z8oQwF+j66YGykrtPn+rovqJIXP1c/HaEB6 UkUEJpwFIX6bL13hUjrntm6YVzcuhsf8ukp+elN0Sat190atMXYveztZwDbmOPhogGW2 APPIStPeFca2Hxf/5q2fVLYq2v86oRFxyzzNDRmnqae5U1ph30UU2wnuh9wQQ0V8bpSc kV8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cssjppck; 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 oc17-20020a17090b1c1100b00286ad92ab6fsi2060260pjb.185.2023.12.04.10.16.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 10:16:59 -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=cssjppck; 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 29B28807FCD5; Mon, 4 Dec 2023 10:16:57 -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 S231803AbjLDSQn (ORCPT + 99 others); Mon, 4 Dec 2023 13:16:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231259AbjLDSQl (ORCPT ); Mon, 4 Dec 2023 13:16:41 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 658A1CA; Mon, 4 Dec 2023 10:16:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701713808; x=1733249808; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/IRu8CoFEU+yM59MMBNJJ8QuzWoxaN8B65KXast7tec=; b=cssjppck7scXQ4bDnlAVhuntd+xPzoLAT5JpC3y8wC2EOo57czHrrgCt CQD/C+DXOym51lG99kHktUshyW0VSL6/gp2/4qr8LixE8p99nC0PqsFI2 V3hWH6eAfSfcRZZJZmX2AA14+8byIVwe0m7pc27PUgIiTZuOfUGjqlft8 xrbeThLd2AygP+DQFtijGeIa0JQVMiKkNDo0soK9ICObDdIAIEJCB5vws FfCCH9Yo8bLIvMAatIZ2kQxPClZo1QZ2WZNvKsuqngDBmL0k3WNqcaP7d mrZJUNhfBj9x8MfEVpuX+u2CUEoqAUvf50UBnDAR8LQjD4lYi6UJLKv5f A==; X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="15318973" X-IronPort-AV: E=Sophos;i="6.04,250,1695711600"; d="scan'208";a="15318973" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2023 10:16:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="914521551" X-IronPort-AV: E=Sophos;i="6.04,250,1695711600"; d="scan'208";a="914521551" Received: from agluck-desk3.sc.intel.com (HELO agluck-desk3) ([172.25.222.74]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2023 10:16:47 -0800 Date: Mon, 4 Dec 2023 10:16:46 -0800 From: Tony Luck To: "Moger, Babu" Cc: Fenghua Yu , Reinette Chatre , Peter Newman , Jonathan Corbet , Shuah Khan , x86@kernel.org, Shaopeng Tan , James Morse , Jamie Iles , Randy Dunlap , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev Subject: Re: [PATCH v5] x86/resctrl: Add event choices for mba_MBps Message-ID: References: <20231128231439.81691-1-tony.luck@intel.com> <20231201214737.104444-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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]); Mon, 04 Dec 2023 10:16:57 -0800 (PST) On Mon, Dec 04, 2023 at 10:24:58AM -0600, Moger, Babu wrote: > Hi Tony, > > You are intending to achieve two things at once here. > 1. Adding new mount option > 2. Changing behaviour for the current option. > I think you need to split this patch into two. Few comments below. Hi Babu, Thanks for looking at this patch. You are right. I will split the patch into two as you suggest. > On 12/1/23 15:47, Tony Luck wrote: > > The MBA Software Controller(mba_sc) is a feedback loop that uses > > measurements of local memory bandwidth to adjust MBA throttling levels to > > keep workloads in a resctrl group within a target bandwidth set in the > > schemata file. > > > > But on Intel systems the memory bandwidth monitoring events are > > independently enumerated. It is possible for a system to support > > total memory bandwidth monitoring, but not support local bandwidth > > monitoring. On such a system a user could not enable mba_sc mode. > > Users will see this highly unhelpful error message from mount: > > > > # mount -t resctrl -o mba_MBps resctrl /sys/fs/resctrl > > mount: /sys/fs/resctrl: wrong fs type, bad option, bad superblock on > > resctrl, missing codepage or helper program, or other error. > > dmesg(1) may have more information after failed mount system call. > > > > dmesg(1) does not provide any additional information. > > > > Add a new mount option "mba_MBps_event=[local|total]" that allows > > a user to specify which monitoring event to use. Also modify the > > existing "mba_MBps" option to switch to total bandwidth monitoring > > if local monitoring is not available. > > I am not sure why you need both these options. I feel you just need one of > these options. I should have included "changes since v4" in with this message, and pasted in some parts of this earlier messge from the discussion about v4: https://lore.kernel.org/all/ZWpF5m4mIeZdK8kv@agluck-desk3/ Having the option take "local" would give a way for a user to avoid the failover to using "total" if they really didn't want that to happen. Not in that message, because I didn't think of it until later, it opens the door for different events in the future. But I'm also open to other suggestions on naming and function of mount options here. Thanks -Tony