Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4342449pxu; Wed, 9 Dec 2020 14:48:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJz2hmviSSihK8ipbxD+AVNw80hry+3pDXbryLMOakPhololVtkuBnDzBFZ+9+B2g831yJ5g X-Received: by 2002:a05:6402:202e:: with SMTP id ay14mr4252307edb.102.1607554137413; Wed, 09 Dec 2020 14:48:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607554137; cv=none; d=google.com; s=arc-20160816; b=kX6oPRg+j7HnA2HX9lz4Pr5PN9EhrGJ0Di7nlnWmNRn/6+L3Gs15x/vWfql54YmnqH khHuzdXj0JvuPMvLvePiuEWa8nOFXsfjXbQJ63Jw27J8ZIsjOGAFlZ8b0a52mh6gtZ9W z/Fi9E8sBaX0bVY8zZERpp4Y8Fen0hV5mz0ybrwHeH9CRUAfhE47qQYXqk6Wg3/rEQkG PhanUVnj7gRc8xQ//nlo6VpqUBoqY8FjRQEGcRDi4AZBufB+yL5+X3p1jPrb3XBaTXkX b2PLxFGeou5LWv3aU1NFndHhD3s+zzRaN4D6brZ8GojlKypuqgeXpQqSHrjOoNUdNmoJ Lfog== 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=mgukwVob2EoCGhGApdrVTjzzZQvwndB4i7C7CK4WcWw=; b=brbLs0Bl7Sf8uNT+QIjV7WPE9Q8RL60wYdSAkRqZgqEG8V4TASH3V01lmsIgIr/A/9 mKjjL8A2vurA2q/Dw/D//iPNgRX1r4HnjRpkCPar1miJCa2DlrN7XkX6A6VpkNkO8ydn GZ2sNE0otzb6GR2vLILIV0H2+ErBAxlTFvlegLnKVjxH0P0TaE2dQl92LxO0Ae2lGjZE zL7lOtbIMbDzQsJjzfOYieQ5rpmQy/tn2Dc3w+a51zQlYs7hYhZyeubsp3NZz5Kr/Rxw +DrXpRsAUcfEJFPnQfLNKL/e7E4r9szYRMTAKmI69rL5kRMUrOSRnJJZHqAroLhgeowU CsMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=iuKl6wwX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zn8si1497148ejb.16.2020.12.09.14.48.34; Wed, 09 Dec 2020 14:48:57 -0800 (PST) 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; dkim=pass header.i=@alien8.de header.s=dkim header.b=iuKl6wwX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388625AbgLIWY2 (ORCPT + 99 others); Wed, 9 Dec 2020 17:24:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388597AbgLIWYP (ORCPT ); Wed, 9 Dec 2020 17:24:15 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B436C0613CF; Wed, 9 Dec 2020 14:23:35 -0800 (PST) Received: from zn.tnic (p200300ec2f0f48007ada6acf171b6be1.dip0.t-ipconnect.de [IPv6:2003:ec:2f0f:4800:7ada:6acf:171b:6be1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 997B41EC04DF; Wed, 9 Dec 2020 23:23:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1607552613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=mgukwVob2EoCGhGApdrVTjzzZQvwndB4i7C7CK4WcWw=; b=iuKl6wwX+ZujgjK6wflKCtJnNRq3w7Zrk138BG6cqquQsCi1QP0LprC9E8C1zAbw3MGXPh gTuC5tmCDijjKs47J1W7MtB+Zvsi3HxtIjjklyYSeZPMwVXSMvWUA7WYFlAvNtR7dqE+Kq ls8+eO1jh0QgXc8ERIsnX6sL/jy+IY8= Date: Wed, 9 Dec 2020 23:23:28 +0100 From: Borislav Petkov To: Xiaochen Shen Cc: linux-tip-commits@vger.kernel.org, Xiaochen Shen , Borislav Petkov , Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [tip: x86/cache] x86/resctrl: Fix incorrect local bandwidth when mba_sc is enabled Message-ID: <20201209222328.GA20710@zn.tnic> References: <1607063279-19437-1-git-send-email-xiaochen.shen@intel.com> <160754081861.3364.12382697409765236626.tip-bot2@tip-bot2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <160754081861.3364.12382697409765236626.tip-bot2@tip-bot2> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 09, 2020 at 07:06:58PM -0000, tip-bot2 for Xiaochen Shen wrote: > diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c > index 622073f..93a33b7 100644 > --- a/arch/x86/kernel/cpu/resctrl/monitor.c > +++ b/arch/x86/kernel/cpu/resctrl/monitor.c > @@ -320,7 +320,6 @@ static int __mon_event_count(u32 rmid, struct rmid_read *rr) > } > > chunks = mbm_overflow_count(m->prev_msr, tval, rr->r->mbm_width); > - m->chunks += chunks; > m->prev_msr = tval; > > rr->val += get_corrected_mbm_count(rmid, m->chunks); Hmm, zapping this one. First, there's an unused variable warning: https://lkml.kernel.org/r/202012100516.H7sTNehL-lkp@intel.com and you should remove the chunks assignment too. And then it didn't apply cleanly: $ test-apply.sh /tmp/xiaochen.01 checking file arch/x86/kernel/cpu/resctrl/monitor.c Hunk #1 FAILED at 279. Hunk #2 succeeded at 514 (offset 64 lines). 1 out of 2 hunks FAILED I wiggled it in but it ended up removing the wrong chunks inc line - not the one in mbm_bw_count() but in __mon_event_count() - which I just realized. So please redo this patch against: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=x86/cache Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette