Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1508065rwb; Mon, 7 Nov 2022 02:25:08 -0800 (PST) X-Google-Smtp-Source: AMsMyM7Xg993jawgdrxxT0+Jg50V2S9uJAldp1PNazhK+ruEzhxIJtaMtT54IiqSewbvWRA+NYc+ X-Received: by 2002:a17:907:3e02:b0:782:1267:f2c8 with SMTP id hp2-20020a1709073e0200b007821267f2c8mr46382793ejc.585.1667816707910; Mon, 07 Nov 2022 02:25:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667816707; cv=none; d=google.com; s=arc-20160816; b=CClpGHqdd17QLQV/KmLb9GBUfYQg0lMZ1agCzVlwxD+aH2z6KJUFyFgYM2685z5E8i bOcJObGnB+JB/YcTEH5NL0hItkS4U5SuWmyOJ6Q643wX1lwKi49B0sbg6zfx8jqJhVX2 jM6cQHajonghJ6VIPYn8JXCxG3Pnv5fO9Em9DxYJsSlAMpFcLAMHFlUPlfSXJ2fQDJHi JojvNxFFUPL9+K0yjDjUOEwPbCbuE0wzSp1GvWWsYpiKjWlsgQYc+FN8mPVYhceInzAl xCmuaB1CYt02IVqL0KKB9A8WBLGUByFJuuJ0qxIiAcrrcZSjml+iBrbBExaHGCvhS929 psgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=ihUiIO3ZLwpQKr6BgSjeEHYERb79BZdv2hX+HIlwkJI=; b=WfLqW+s/F9UEqN4+u03BpDIQW9y9nRy7WhaLUVJTuN+hajnuqA+7B4gb9b3Pv37mjv hwYuMHEzpYDtDfM1EfJtoLVQwISedmZxKm4c22BIvMDrdAlxM3rgr66DV7ax2fV6Buq1 y48DfoTUH9b+/iyls/P3Q3/4jHS0Ol6icrPoG5JP0YXcMuGYiKKUt4yhZpD4/u09vcNw UBOS2R7cum+y1Y/MFaFdsr7LjbEl2JhV84E4mv5463re0Gz/bKWdZQvOQuNFibO+IH0M CYNQIg6sGC1vQJWBYdVB21q+yw1Mmw8fvpc2O69/UtZfzhaAAHNK7+DblF3/kgmpYByH VNEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=L5X++DuC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd10-20020a170907968a00b007771bc8dbb4si10126155ejc.781.2022.11.07.02.24.46; Mon, 07 Nov 2022 02:25:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=L5X++DuC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231614AbiKGKWE (ORCPT + 93 others); Mon, 7 Nov 2022 05:22:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231727AbiKGKVw (ORCPT ); Mon, 7 Nov 2022 05:21:52 -0500 Received: from mail-ed1-x54a.google.com (mail-ed1-x54a.google.com [IPv6:2a00:1450:4864:20::54a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC04A18E35 for ; Mon, 7 Nov 2022 02:21:38 -0800 (PST) Received: by mail-ed1-x54a.google.com with SMTP id c9-20020a05640227c900b00463de74bc15so7933699ede.13 for ; Mon, 07 Nov 2022 02:21:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=ihUiIO3ZLwpQKr6BgSjeEHYERb79BZdv2hX+HIlwkJI=; b=L5X++DuCad+8UxHidtzd0ia2QhWMBne6T5ULMfNTvrrMHUXXqX//6iwiE924aWtDl2 LHjk8+PQvvWwiUAW4IM7/Jbaw9xPV3bB92LqE/4ckIEGVB9eU+8rjRaBGxYzVKh62B+3 pffzH8ZFW3ICBI06YUAqiRNAyj/S9rF5NbVVXaC7T9sH/bXhSk9qFdYMgedpUpqAvXiL uOlBxfs1km20u40N9rIMzarYVjNpodlyESEmZHq/LZVkUhYHweZ5DLwmdEJc3n025kH6 sBBYgobP0SiZSy/OJEJpKNxmdbVQ3Z+k3kee+L3N6Dx/f4OR8oKfE6aMdDBEnuoU2Rps i3Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ihUiIO3ZLwpQKr6BgSjeEHYERb79BZdv2hX+HIlwkJI=; b=A96Sz51cgfEvqtRc1Lgy2uiMWyheyDlFAcY07qfd7fLGBR0ryXJUPDOMuD+FC2S42w 9ZpueakplPG5eK4R07iHcpDyXML9qniCREwVabFJ0LLeedVPslUlSQtNCrb4/KiooTL7 /6QLbjNnW07bRHvJaM5HmDYl3MsEE0oslsf8kk7UwCMmU1rLxy861PgeUN/Iupcar0hv q2VdBhhhbTxjp7CzYVaF+V0l7gi+q5yw3qo3bHPVXg7WsYa20wZVQDbX+qx9ypNjQee4 Y6gOeIOclep1SfmA7E+hUl8meuJ+g1XibHpOuqtKBJN2QErvKCMRpSuwRJ7/KOUGWaNd XrhQ== X-Gm-Message-State: ACrzQf3DIWoZkqEM85cFv8zjsmMCrrSGuyGVnKSt7jr4Y8yAWZ4eYzU/ cr0E1rCgxGwTGoyy1K3oRPRoJJtZYZ4Ubhii6g== X-Received: from peternewman10.zrh.corp.google.com ([2a00:79e0:9d:6:ce1e:a203:209a:548c]) (user=peternewman job=sendgmr) by 2002:a17:907:788:b0:741:4d1a:595d with SMTP id xd8-20020a170907078800b007414d1a595dmr46434575ejb.737.1667816497306; Mon, 07 Nov 2022 02:21:37 -0800 (PST) Date: Mon, 7 Nov 2022 11:21:34 +0100 In-Reply-To: <166759206900.3281208.11975514088019160962.stgit@bmoger-ubuntu> Mime-Version: 1.0 References: <166759206900.3281208.11975514088019160962.stgit@bmoger-ubuntu> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog Message-ID: <20221107102134.255757-1-peternewman@google.com> Subject: Re: [PATCH v8 10/13] x86/resctrl: Add sysfs interface to write mbm_total_bytes_config From: Peter Newman To: babu.moger@amd.com Cc: akpm@linux-foundation.org, bagasdotme@gmail.com, bp@alien8.de, chang.seok.bae@intel.com, corbet@lwn.net, damien.lemoal@opensource.wdc.com, daniel.sneddon@linux.intel.com, dave.hansen@linux.intel.com, eranian@google.com, fenghua.yu@intel.com, hpa@zytor.com, james.morse@arm.com, jmattson@google.com, jpoimboe@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, paulmck@kernel.org, pawan.kumar.gupta@linux.intel.com, pbonzini@redhat.com, peterz@infradead.org, quic_neeraju@quicinc.com, rdunlap@infradead.org, reinette.chatre@intel.com, sandipan.das@amd.com, songmuchun@bytedance.com, tglx@linutronix.de, tony.luck@intel.com, x86@kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Babu, On Fri, Nov 04, 2022 at 03:01:09PM -0500, Babu Moger wrote: > + /* > + * When an Event Configuration is changed, the bandwidth counters > + * for all RMIDs and Events will be cleared by the hardware. The > + * hardware also sets MSR_IA32_QM_CTR.Unavailable (bit 62) for > + * every RMID on the next read to any event for every RMID. > + * Subsequent reads will have MSR_IA32_QM_CTR.Unavailable (bit 62) > + * cleared while it is tracked by the hardware. Clear the > + * mbm_local and mbm_total counts for all the RMIDs. > + */ > + memset(d->mbm_local, 0, sizeof(struct mbm_state) * r->num_rmid); > + memset(d->mbm_total, 0, sizeof(struct mbm_state) * r->num_rmid); Looking around, I can't find a reader for mbm_total anymore. It looks like the last place it was used went away in James's recent change: https://lore.kernel.org/all/20220902154829.30399-19-james.morse@arm.com Are we supposed to be clearing arch_mbm_total now? Thanks! -Peter