Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2522814rdb; Fri, 8 Dec 2023 10:26:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqL+HHla1kdiPiHDQmIhdg0Y+fWchi0cnDdgaA9si10fbmN/+vVcNHLrgwrWe7qEeefLFy X-Received: by 2002:a05:6a20:6da7:b0:18f:97c:4f6e with SMTP id gl39-20020a056a206da700b0018f097c4f6emr377216pzb.122.1702059991800; Fri, 08 Dec 2023 10:26:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702059991; cv=none; d=google.com; s=arc-20160816; b=GHVIL5VtWCStxXBOTfqDFEeaAqzOvn6WA7auDioZQEFHeJUkuL/A+8KztRTG+mEzCY IBba08OXr8nqBlu79wDmbi4JzR5/KdKlLZpM77TvJaLWgmHj31ZJTWjQG90lCpCYGUkn /6x9nWRu+cDouMyRAd8gbYHaeUZm9/XL1BnsX2ilk75cT+qv1DoymzTGeEfUR08SYe1g v3T+FKaj5VFt+Bw+IMAcVrFWkdSpH46OMEoQG+zPXwGma7IW01N/kLDYOBhvL0Cd3Ijm MTOqpDDdXM9qYSrtVivEbq0QzU9fqOaAuMIrsiysd4hDOIqExyo6rPrAOR7AJBdDl3mt d4uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=75zio9oghTkUElUZUVPQLES5Kw5emjlawW+mI0eiLfs=; fh=fdbks9cDZD3nws6fbVmPJcsGIn1evRgsQgeNrttrtE4=; b=LlVdlklZfV7uZm7IOfeKPBnq18DKUqdwPP1U/9QS2CO/Y/LSolqi/zVjL4aulwkHHf T33XPWa7RVNmBOkeTLuRxGyZoSeM+ayN6knPMy3M3PqiscL5eAzq689IKjtN3HZ5zEl3 VyW5WVuVrMdC+d1LIjxi9kXtK92d44Zo5+K4EypuaZQQojonbp/2IdQvlZJ28vbwDRd1 MKHsr/8J8d1fSPwjsDje4nEefc8vcE+peMeQB4HVgFbbu+uUIFk2tDjD6ITf5AtlXonM 6jFWF7z20+rR0S/3VRVve+1gV7WrGNDm1g/98WBw0nYHj1OWjYc1zv+2MxhonMazH6ld ZUeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=q28rMezC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id c17-20020a631c51000000b005b16e351343si1899470pgm.241.2023.12.08.10.26.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 10:26:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=q28rMezC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id EEE2E831A4BF; Fri, 8 Dec 2023 10:26:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbjLHS0M (ORCPT + 99 others); Fri, 8 Dec 2023 13:26:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229811AbjLHS0L (ORCPT ); Fri, 8 Dec 2023 13:26:11 -0500 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E9E690 for ; Fri, 8 Dec 2023 10:26:17 -0800 (PST) Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1cc79f73e58so8085ad.1 for ; Fri, 08 Dec 2023 10:26:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702059977; x=1702664777; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=75zio9oghTkUElUZUVPQLES5Kw5emjlawW+mI0eiLfs=; b=q28rMezCcPtRMa56QW+O2YFjtrVIezvWd0PlN5IELBdx6Qoc6lBjG+tG8yxKCXTNKm qR20DY8hoUu+cIAiUatPbRhg6AuazGWNCvNpp9iGQI/ualX2Vh0X1L/nN9h/FGxBj8iP HnS3xS8bdLcTpYuAR0rdGJNLYwVddVtjLnlU48xp0sGJm/pMxUnDgbtT9iKEbH4HRR2b GTy3VmMOPKogjYiBEU65GRXtvUoagI7o9QucyUQH2oWBWKL3tCDDYBeseHgpEqMkLlzR vl5fuAX/KiWEqzNk1xf67ygRQWkPtsmoUGtcBhLIkcQK79Xz5EuygGHhZUnrOKLvgyH6 8xZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702059977; x=1702664777; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=75zio9oghTkUElUZUVPQLES5Kw5emjlawW+mI0eiLfs=; b=AofpsUNAW5yfzynZQktOCCuc0KxCBJb3QE2syzDnGLbXiwsNKVECRHABj7glP781H5 YwXeIsjjqdwqbj4ZL8eZSEFhtMNhPIulLgAt7Zdo+2Q4o9WbKqJoeoj1Lv7jYLyYmecs psfd2fbFJ4rRMgx1F8cuyIvHSIh/jADu1wk8OJ/NI4oIf1uoGpL/VconRK6wZO5Q7G1P EdQkImjQwlFpCnuDZXPUt2HT30JWsnINpNKpLNRKBoqVFPZ4KQhJMaIBY709uIizQlDS 9utVO2lz4xBo2y5tkktSHbEYVLzUQTylu5RwP3X40/TIb+rduNYJHoybE2P2B6kt6ha5 J7Yw== X-Gm-Message-State: AOJu0Yz52FVpI3LRIQz0dFnHj562RPE7op+6Ch9N4eBYkgRdwE4ul0mG ok+L1/xhuy6GZaW8rjILuTiSOVRDSsQU6KfB/osO3Q== X-Received: by 2002:a17:903:244f:b0:1cf:9f0e:9524 with SMTP id l15-20020a170903244f00b001cf9f0e9524mr175431pls.27.1702059976843; Fri, 08 Dec 2023 10:26:16 -0800 (PST) MIME-Version: 1.0 References: <20231201214737.104444-1-tony.luck@intel.com> <20231207195613.153980-1-tony.luck@intel.com> <20231207195613.153980-3-tony.luck@intel.com> In-Reply-To: <20231207195613.153980-3-tony.luck@intel.com> From: Peter Newman Date: Fri, 8 Dec 2023 10:26:06 -0800 Message-ID: Subject: Re: [PATCH v6 2/3] x86/resctrl: Use total bandwidth for mba_MBps option when local isn't present To: Tony Luck Cc: Fenghua Yu , Reinette Chatre , Jonathan Corbet , Shuah Khan , x86@kernel.org, Shaopeng Tan , James Morse , Jamie Iles , Babu Moger , Randy Dunlap , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Fri, 08 Dec 2023 10:26:29 -0800 (PST) On Thu, Dec 7, 2023 at 11:56=E2=80=AFAM Tony Luck wro= te: > > 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. > > Modify the existing "mba_MBps" mount option to switch to total bandwidth > monitoring if local monitoring is not available. > > Signed-off-by: Tony Luck > --- > arch/x86/kernel/cpu/resctrl/rdtgroup.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu= /resctrl/rdtgroup.c > index 5f64a0b2597c..7410513db45a 100644 > --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c > +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c > @@ -2725,6 +2725,8 @@ static int rdt_parse_param(struct fs_context *fc, s= truct fs_parameter *param) > return -EINVAL; > if (is_mbm_local_enabled()) > ctx->enable_mba_mbps_local =3D true; > + else if (is_mbm_total_enabled()) > + ctx->enable_mba_mbps_total =3D true; > else > return -EINVAL; > return 0; > -- > 2.41.0 > Reviewed-by: Peter Newman