Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2631433rdb; Fri, 8 Dec 2023 14:10:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmj/jolvfsZORCSsKdQD9KuHGclYUmKmT2dhhwIC/aFpaNcvh+GmOWwb2Q2X/RwPYeVcsw X-Received: by 2002:a05:6359:7414:b0:170:6c3d:34f5 with SMTP id va20-20020a056359741400b001706c3d34f5mr619924rwb.20.1702073410149; Fri, 08 Dec 2023 14:10:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702073410; cv=none; d=google.com; s=arc-20160816; b=mSF9dZooQHD4I/9haxERg6aeLSunDR7c18SOSB56i3HvTMlKkVyKT7F1q+4IDAZhup Pv6V69icmvEMMMeDz8C1ZHV0vIyISzHaKcYVdidpbs46VsmKk+ovOpt1HZeynGL99Qq8 Nn0ZsZbC8hhEZHMNjMLRJ6KKqVytoH3W+O/APvMVM/YV/YAbPjDpISfY3Fs6APefJ4Qi 8pNxFPkZrRznY5DWsgVYGwLFhQT3BeNvVfVJunKgSx45rv9jz9RehyOuZ6pTit2IyNYr x3xCRE7Rs7YbE7KRp4bGXtHyx6KuegndVCA4YsVkgHdiB/hZ9M7qmMpkyK8+QI5SsUMU dbdA== 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=Yq8sLZY529fpZyvYcaaHG7aerxfsju32DEaOISOYWys=; fh=fdbks9cDZD3nws6fbVmPJcsGIn1evRgsQgeNrttrtE4=; b=msEPx1C6RUKtR18U5vt1stV2qYag14c1oglTGPWVJgzftaRDVLfSy6GNOYlY8e4KIw OYzFwTP07rU2S9OCT7h4Rv0nZAeexstSycK0LYA3qFkTshj13ztZrl/9WBUEx9utenuI 6GoFTieJIS+AjyjjszMUGJY6leslls2cjLJ4tvAwgmjfXvh5OEk2M2Z5VUuAUcFzg0zy QI6G59vMJD8gUI2BQQpAf68FnygB7GfwCSD5o4dgiQ8XpRJgKAQjMHR9k9z1Y3XQjo3M kD/o9NvrTrJGj6Ee/Qi//zb7rQPA3y7kY0Rg2oxa3bwrUfeE9vOQpRwsD30huMiS5QNd vYNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=1R2f3ug9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id y39-20020a056a00182700b006cbeff5ae49si2105367pfa.3.2023.12.08.14.10.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 14:10:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=1R2f3ug9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id E421B81121EC; Fri, 8 Dec 2023 14:10:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574860AbjLHWJ6 (ORCPT + 99 others); Fri, 8 Dec 2023 17:09:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233939AbjLHWJ5 (ORCPT ); Fri, 8 Dec 2023 17:09:57 -0500 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E4AA10E0 for ; Fri, 8 Dec 2023 14:10:04 -0800 (PST) Received: by mail-il1-x12d.google.com with SMTP id e9e14a558f8ab-357d0d15b29so9185ab.1 for ; Fri, 08 Dec 2023 14:10:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1702073403; x=1702678203; 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=Yq8sLZY529fpZyvYcaaHG7aerxfsju32DEaOISOYWys=; b=1R2f3ug9nTIVeV4qd2MJ90MwIDAgYzXtosGKPI8WwaHoKLhl3iv1OZRDdQf5vSrNlZ 8eHyGOmmhu26kHqeyXJYoNfp/NdhEq9MiiZ8VXw6FSq8DQbNKy+z/tjVQRA5pD+QUtku xP7/tdnxSOcDZYNatvQ9RbioBWKGzrfMx9Y8Q75ccxjbFB2JJW5W9MRUlmbmNIh8oVcZ 5R/zgGLq5N47dIdqoL+5Isx+M1HgSknhidgEpPorEolU1LvWXGIHz0pQNAhb6sgHo6rJ yAxbq8CItOs5rkRgRvqT29qz8Qb6KgEIcyRLfkFgk53Ex+sWdsHabKKep4dpIjjT1A9x krjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702073403; x=1702678203; 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=Yq8sLZY529fpZyvYcaaHG7aerxfsju32DEaOISOYWys=; b=xB4ZahpG416WqujJ6AiWfG8lGQ8ZZr/R93n5GSXtdrnf6N1KNLFvUEytflbhqQfVHW 3iLgcIE6e6w7PtvLXyANw67QC5vAzeSwBCVsOiZyR8twxBD0notgitLiupzEMewG5ARz mMe2ZGdEIuL+lC8FuYaGJB7ZAGggVIPTpqM6jRgz86ybUccsZvggFfSdJ3fGiUZXWa9J UN+vXmZrmPdDQmC6yJE9+HvwRrHl7KT49jBeGTxybSV+q7fQcEwvwGi/vEI5HoMlVwdt jo8EZ2NU2nKwVP29nKFD6E68jP7PO0ofrgwU1sesxVLgaglGYIlveAkaDYMFU9O9CpGX pdmg== X-Gm-Message-State: AOJu0YwGQ7EelWMzFm7hKfb4urkkjmyzc5Nyd3WacA7p+QGxre2n98Aq eTCKXlpSjLvfRUgoC9Ps2NAXoOd1doRrgy1vfafvOg== X-Received: by 2002:a92:c52c:0:b0:35c:efe7:e9fa with SMTP id m12-20020a92c52c000000b0035cefe7e9famr285633ili.23.1702073403543; Fri, 08 Dec 2023 14:10:03 -0800 (PST) MIME-Version: 1.0 References: <20231201214737.104444-1-tony.luck@intel.com> <20231207195613.153980-1-tony.luck@intel.com> <20231207195613.153980-2-tony.luck@intel.com> In-Reply-To: From: Peter Newman Date: Fri, 8 Dec 2023 14:09:52 -0800 Message-ID: Subject: Re: [PATCH v6 1/3] x86/resctrl: Add mount option "mba_MBps_event" 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=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Fri, 08 Dec 2023 14:10:09 -0800 (PST) On Fri, Dec 8, 2023 at 1:57=E2=80=AFPM Tony Luck wrot= e: > > On Fri, Dec 08, 2023 at 10:17:08AM -0800, Peter Newman wrote: > > Hi Tony, > > > > On Thu, Dec 7, 2023 at 11:56=E2=80=AFAM Tony Luck = wrote: > > > @@ -2715,7 +2723,25 @@ static int rdt_parse_param(struct fs_context *= fc, struct fs_parameter *param) > > > case Opt_mba_mbps: > > > if (!supports_mba_mbps()) > > > return -EINVAL; > > > - ctx->enable_mba_mbps =3D true; > > > + if (is_mbm_local_enabled()) > > > + ctx->enable_mba_mbps_local =3D true; > > > + else > > > + return -EINVAL; > > > + return 0; > > > + case Opt_mba_mbps_event: > > > + if (!supports_mba_mbps()) > > > + return -EINVAL; > > > + if (!strcmp("mbm_local_bytes", param->string)) { > > > + if (!is_mbm_local_enabled()) > > > + return -EINVAL; > > > + ctx->enable_mba_mbps_local =3D true; > > > + } else if (!strcmp("mbm_total_bytes", param->string))= { > > > + if (!is_mbm_total_enabled()) > > > + return -EINVAL; > > > + ctx->enable_mba_mbps_total =3D true; > > > + } else { > > > + return -EINVAL; > > > > It looks like if I pass > > "mba_MBps_event=3Dmbm_total_bytes,mba_MBps_event=3Dmbm_local_bytes" I c= an > > set both flags true. > > That's going to be confusing. I'll add code to stop the user from > passing both options. Also kind of confusing, after reading the second patch, I realized "mba_MBps_event=3Dmbm_total_bytes,mba_MBps" also results in both being set. If you're able to fail the mount operation if both flags somehow get set, that would address this one too. -Peter