Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2622592rdb; Fri, 8 Dec 2023 13:50:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHtn0UwRjQi4XcJp9mFUKfBzRFISeWdC6Bqq/3r+DPIjbJwPhp78flZbtJ+PYLMWjJp7H8Q X-Received: by 2002:a17:902:8694:b0:1d0:6ffd:836b with SMTP id g20-20020a170902869400b001d06ffd836bmr676526plo.118.1702072251672; Fri, 08 Dec 2023 13:50:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702072251; cv=none; d=google.com; s=arc-20160816; b=WSCTZVbv/OVAkcAqKgG3b6/CYJysSl+SuF1El/pS6tunUZsxGm1JUfN3ByW3doSrq8 lgOJTIcDpC/I/TNBjR7rgt2crQi10QL1KZr/DaLioD8LasjohdHeWIXIQ6AACjgxfpu0 ePsPkGWO1mFq4iGDtWoG04nVIPCENf7tRr0Ml+fQeBgCwPjcBA5KVBvvnN9eYNFRG928 JKFRUjzcTMDo+sHZ+z2ccDi87nPwaijTg5QKebNqbp/Epxvx0CDpy+r0tA7WLa62sqVV 3VIWtyrl3AVy/FNIecBFwLsfXCPG0QihZvDWrnCabpZwPotsKBF+i+soCEaPaWLeyB2F nbpQ== 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=22U3JV7+tx93pj6XGoLy63VjCX6RXqEMLP71ED71Z+Y=; fh=XGM/55KZf4VA5ebmpABp5ndA/VnOd+I5OGmJCv2SK8Q=; b=BTtUBUxlZKHF2z27YfnsFXENUnWd7iIyXeNDKg1bJUp4jw0yjecgXvpq5xS4qk+YhT wZOJJzgfpp6t170Ium3chWFWiJyPIorilwZSdK2+ScMcxja9UgYw36LX61sbjriNpq4n Y+wTApjlQfrCB7c0jGFfAxftaHWV4sirk6kjfGThSUfJmvzHCRw9YppBl7jZhx4RoyYM WjXPz50cdwWYsPNC5vzV2GnXBI8AIsi9uivoSxG3SMQR4Vo7GbHxMuEsxZuQ0seGnfnN o77fdVtqMA7MhEAfdfIOu8pCmCmgYhKszevD4Ps02G7raRG+ttveSr5WJo70SvgOdXLF vCkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="LWQ/jZGm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id u5-20020a170903124500b001d07b6a0af2si2153710plh.204.2023.12.08.13.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 13:50:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="LWQ/jZGm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 7C4EE81FDB89; Fri, 8 Dec 2023 13:50:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230004AbjLHVuf (ORCPT + 99 others); Fri, 8 Dec 2023 16:50:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbjLHVue (ORCPT ); Fri, 8 Dec 2023 16:50:34 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A033EA; Fri, 8 Dec 2023 13:50:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702072241; x=1733608241; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=lGTn+rBSOCG48Ab9NF0vjFUxQRip0d3DjXMPj7vFZzc=; b=LWQ/jZGmNCU2NdF0bV/LONBdFHhoDwJ0FyCOd2v4ClRR+Qrx4EyyEeUN 15laNQcKVaryV4w7GVkFHHA9Aq7OixFv37er63YZEFGIV84+5WYv7wic7 aXFTtiPaOaAeK6ds6siI7msKdpZaBnnl7H0xWRpuJYcFMY1teydO5Rdae CDxEL+/w1w7V28QhX69U/ulXzYrWM6nH+LXH2Cdas7JN/49jC+pzjGlcH ppM9mY0BCmDOJL+Ar2Tk1H0iNLt/8hL2ZicYOzNVo23vqxwTaATxUBgxH 5/UEPg8+OFPKFW6YvZEHQqK8XE76AmRs9hmX6itnUWFBoQBUE51uuzGCT g==; X-IronPort-AV: E=McAfee;i="6600,9927,10918"; a="393335220" X-IronPort-AV: E=Sophos;i="6.04,261,1695711600"; d="scan'208";a="393335220" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2023 13:50:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10918"; a="765621441" X-IronPort-AV: E=Sophos;i="6.04,261,1695711600"; d="scan'208";a="765621441" Received: from agluck-desk3.sc.intel.com (HELO agluck-desk3) ([172.25.222.74]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2023 13:50:40 -0800 Date: Fri, 8 Dec 2023 13:50:38 -0800 From: Tony Luck To: babu.moger@amd.com 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 v6 1/3] x86/resctrl: Add mount option "mba_MBps_event" Message-ID: References: <20231201214737.104444-1-tony.luck@intel.com> <20231207195613.153980-1-tony.luck@intel.com> <20231207195613.153980-2-tony.luck@intel.com> <7de1b242-e8cb-9968-876e-d3e311443b57@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7de1b242-e8cb-9968-876e-d3e311443b57@amd.com> 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 08 Dec 2023 13:50:49 -0800 (PST) On Fri, Dec 08, 2023 at 12:29:18PM -0600, Moger, Babu wrote: > Hi Tony, > > On 12/7/2023 1:56 PM, Tony Luck wrote: > > -static int set_mba_sc(bool mba_sc) > > +static int set_mba_sc(bool mba_sc, enum resctrl_event_id mba_mbps_event) > > { > > struct rdt_resource *r = &rdt_resources_all[RDT_RESOURCE_MBA].r_resctrl; > > u32 num_closid = resctrl_arch_get_num_closid(r); > > @@ -2313,6 +2313,7 @@ static int set_mba_sc(bool mba_sc) > > return -EINVAL; > > r->membw.mba_sc = mba_sc; > > + r->membw.mba_mbps_event = mba_mbps_event; > > list_for_each_entry(d, &r->domains, list) { > > for (i = 0; i < num_closid; i++) > > @@ -2445,13 +2446,14 @@ static void rdt_disable_ctx(void) > > { > > resctrl_arch_set_cdp_enabled(RDT_RESOURCE_L3, false); > > resctrl_arch_set_cdp_enabled(RDT_RESOURCE_L2, false); > > - set_mba_sc(false); > > + set_mba_sc(false, QOS_L3_MBM_LOCAL_EVENT_ID); > > This is kind of miss leading. Why do you pass "QOS_L3_MBM_LOCAL_EVENT_ID" > here? > > If you move the following initialization to rdt_enable_ctx, then you don't > need to pass the second argument. > > r->membw.mba_mbps_event = mba_mbps_event; Babu, Yes. That was funky. I will drop the second argumen to set_mba_sc() and move the initialization to rdt_enable_ctx() Thnaks for the review. -Tony