Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp194627ybs; Tue, 26 May 2020 07:03:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbGpkoxrQWjTA6rPM2A7eAwyMdLx4fReNRekthKhsnv+JtL4GWdfDXTWQT0O9DPKZsq9y0 X-Received: by 2002:a50:ee04:: with SMTP id g4mr19702305eds.221.1590501797632; Tue, 26 May 2020 07:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590501797; cv=none; d=google.com; s=arc-20160816; b=PZuc88MGCnk9Yey6HOjYtcJ0Nt2QOI5J8LGrW5Vmywnm5aXoOdazgQz6zZ+LsTDE+4 0Gp2uVE9/6oMv8iiKpKnt4MldhPuBP3dnyWQw39MU8ycG7bsiCNONN5wIeXWUVGR21iW yVkWidDbqQMI3zaqerXNkoNuqs6jCHCh4UqFsMK0Y5YAtmDrUN149f2uiRWlHyVTtFhG 3BWkJw3JZnmZ2GnxLqbICgDLa/MEvszH8mdVCDSd04h40JsoHVDfcIXaKdVibTiiUq2y qKY1pAJOlW1gT0/4+WZSrsTHO5KyAB2lNawiIOpBsiWYAFRE2o2ewuuQA/H8hNoM53ZO FhWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=vTjZQ/ZxlPqGPnjm5PQxafewb+EAiSiZiX4ifzovetQ=; b=YxhrUwoGnQn6RprXQm9b/56CtxX8K9PLA9Ym9CXSpnIp7BoziEN5BkPvaNax6EzMn+ CcpO/6XTQ2xvP3AFRt4+QbIFu1+pJAC3Li7vTDpoSnSC/G2I8e35/bzgJCSO9V1IYTL/ zl6Dx8OUYH8KBeLhXE/S+TtkdInW7slK1+P7a4virdA8buC3nmbWbTYV/QLDjIbfB4AY 45g1lftay7MuHZyfFySrjTRrzIRn3CUINlXw9hJUB9lZN2ZRyzX3BOmiUbkoRQWmJ1Ve sBIyG8BgPGlK7fLfRr2Tc0Uvdst9dKwGjm5uTyIcoUKniOrBGSX/m4moxx5prwyhoThT MOUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h15si11463287eja.51.2020.05.26.07.02.52; Tue, 26 May 2020 07:03:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388860AbgEZNlL (ORCPT + 99 others); Tue, 26 May 2020 09:41:11 -0400 Received: from foss.arm.com ([217.140.110.172]:50912 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388814AbgEZNlK (ORCPT ); Tue, 26 May 2020 09:41:10 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DB06055D; Tue, 26 May 2020 06:41:09 -0700 (PDT) Received: from melchizedek.cambridge.arm.com (melchizedek.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 650E23F6C4; Tue, 26 May 2020 06:41:08 -0700 (PDT) From: James Morse To: x86@kernel.org, linux-kernel@vger.kernel.org Cc: Fenghua Yu , Reinette Chatre , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , James Morse Subject: [PATCH v4 01/10] x86/resctrl: Nothing uses struct mbm_state chunks_bw Date: Tue, 26 May 2020 14:40:50 +0100 Message-Id: <20200526134059.1690-2-james.morse@arm.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200526134059.1690-1-james.morse@arm.com> References: <20200526134059.1690-1-james.morse@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nothing reads struct mbm_states's chunks_bw value, its a copy of chunks. Remove it. Signed-off-by: James Morse Reviewed-by: Reinette Chatre --- arch/x86/kernel/cpu/resctrl/internal.h | 2 -- arch/x86/kernel/cpu/resctrl/monitor.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h index f20a47d120b1..1bb81cbdad5f 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -282,7 +282,6 @@ struct rftype { * struct mbm_state - status for each MBM counter in each domain * @chunks: Total data moved (multiply by rdt_group.mon_scale to get bytes) * @prev_msr Value of IA32_QM_CTR for this RMID last time we read it - * @chunks_bw Total local data moved. Used for bandwidth calculation * @prev_bw_msr:Value of previous IA32_QM_CTR for bandwidth counting * @prev_bw The most recent bandwidth in MBps * @delta_bw Difference between the current and previous bandwidth @@ -291,7 +290,6 @@ struct rftype { struct mbm_state { u64 chunks; u64 prev_msr; - u64 chunks_bw; u64 prev_bw_msr; u32 prev_bw; u32 delta_bw; diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c index 837d7d012b7b..d6b92d7487a7 100644 --- a/arch/x86/kernel/cpu/resctrl/monitor.c +++ b/arch/x86/kernel/cpu/resctrl/monitor.c @@ -279,8 +279,7 @@ static void mbm_bw_count(u32 rmid, struct rmid_read *rr) return; chunks = mbm_overflow_count(m->prev_bw_msr, tval, rr->r->mbm_width); - m->chunks_bw += chunks; - m->chunks = m->chunks_bw; + m->chunks += chunks; cur_bw = (chunks * r->mon_scale) >> 20; if (m->delta_comp) -- 2.19.1