Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3446184rdb; Wed, 13 Sep 2023 12:14:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8pg3LMnRwHXOy6/FTKw8WlmYNbvMnQJRypcOLwumZ/8NnFrOkYy+iGxa7swzT0TSCfzYb X-Received: by 2002:a05:6a20:3211:b0:152:4615:cba8 with SMTP id hl17-20020a056a20321100b001524615cba8mr3033345pzc.54.1694632441109; Wed, 13 Sep 2023 12:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694632441; cv=none; d=google.com; s=arc-20160816; b=KDRRhqxToWtsjTi/0H99y5L+uc715A1pZ9Ym2jk2Bd474qgKeD3InvpidRkTM6I0N5 UE+ltAD2m+e9/Jja3/DsLS7c2LQUx1LGE5El8WBZUwzNrF4TF/6V3OR4K89bICuNscjL V44SyNBNsJVXUjg8vRJliko3wBNmSw1ySdbjVTBMDkrJnr2Eux1Jc9ZwLPbBJqsdwHWX loJ2SNulu9+e7H45vZC6v46fh1d86IhhYEzDCLQSaBQegSwHRK12cv7cJUGzRuzUa43L bBL9vHzS2RRBEaSwMKfZG4y0E9OkCOmnVBWu6vUoz8O7UPM8MzLvzR+5GzHk6CpP8Kvc AfKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=eWu7+CjwnDZHJ239GXRaqOd2VuH9csCr5v1r+7VLK2Y=; fh=HH2cxKf2qq7xqxmUkeVCVHKZhNOAo0To9Do9+MIfxfU=; b=qNYace8B73fPNxE6t9ZpvSO6KdfBaNOmFF/TCQbWAb48d4PFvvoXRrlIJfz47usH1Q 3RAiKqFhy0Mv2gtBbcV1jqtGr7cSZUkL4nC3c/q8SuGJmNNzMK6JcRRnBUKL8cKcLvqP Fx4DCX//ZVxKv72qFNRJGSAuPjcWqrNTapT4mnRj2Vms6Ya2L2EDP0Uf14eYJr7SYNkf HCRPhNVW7XnD2tAOhMh7WiSGd6oQMzRvfz4OAkLlTmoHX/56Tlqqwm/L79YLG2HJmFS6 MkwlXeGLC7OqdvzQozCPJiukU6cMvqZl7lykd28uuWIKlZ3+6JKk4s89P5ZT/0WJw2A9 C0Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="POjNE/ro"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id fb36-20020a056a002da400b0068e3950c705si11116966pfb.24.2023.09.13.12.14.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 12:14:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="POjNE/ro"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 592CF807748A; Wed, 13 Sep 2023 04:43:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240280AbjIMLnv (ORCPT + 99 others); Wed, 13 Sep 2023 07:43:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233040AbjIMLnu (ORCPT ); Wed, 13 Sep 2023 07:43:50 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0DAA10E6; Wed, 13 Sep 2023 04:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694605425; x=1726141425; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=Eixnt6GAsbzJFCJyQ84xwHsyzH00SfvTGFmYTKJDaE4=; b=POjNE/ro1IrKARrKn4T8xLidWMg23qRCg/iOU3W+STwJh56NXPXSOL5v 7d6KtnLHzJ4vUUqam2w0PdQooQpvk3+ISo1noT0DZBLvZNtTFW2fAMcwb vbmtcjRa7gJN2EabM4jzhZSV7s7QigBtUJx+EPnejnZScvN6Pe1i9QtoG Aq1pqZ4IDBnxCYyDMPYSIhbrLCQ0M80grZozzXWVw4mfxOq8wZEh2xbmg njiOFza4eFnmIedXqmjAnpbV0Qk0PQaZkFl2BHR5/Kp2a2lsVw8yzGLvR +H1kjJzjPDx9n5av5NoYyWNQICLn6f9MkXwoET/N3PIHADmYXudE6HN2h w==; X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="465006384" X-IronPort-AV: E=Sophos;i="6.02,143,1688454000"; d="scan'208";a="465006384" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2023 04:43:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="990885974" X-IronPort-AV: E=Sophos;i="6.02,143,1688454000"; d="scan'208";a="990885974" Received: from pakurapo-mobl3.ger.corp.intel.com ([10.249.45.213]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2023 04:43:42 -0700 Date: Wed, 13 Sep 2023 14:43:40 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Reinette Chatre cc: Shuah Khan , Shuah Khan , linux-kselftest@vger.kernel.org, =?ISO-8859-15?Q?Maciej_Wiecz=F3r-Retman?= , LKML , Shaopeng Tan , stable@vger.kernel.org Subject: Re: [PATCH 5/5] selftests/resctrl: Reduce failures due to outliers in MBA/MBM tests In-Reply-To: Message-ID: References: <20230911111930.16088-1-ilpo.jarvinen@linux.intel.com> <20230911111930.16088-6-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-407709756-1694605424=:1849" 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 (groat.vger.email [0.0.0.0]); Wed, 13 Sep 2023 04:43:58 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-407709756-1694605424=:1849 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Tue, 12 Sep 2023, Reinette Chatre wrote: > On 9/11/2023 4:19 AM, Ilpo Järvinen wrote: > > 5% difference upper bound for success is a bit on the low side for the > > "a bit on the low side" is very vague. The commit that introduced that 5% bound plainly admitted it's "randomly chosen value". At least that wasn't vague, I guess. :-) So what I'm trying to do here is to have "randomly chosen value" replaced with a value that seems to work well enough based on measurements on a large set of platforms. Personally, I don't care much about this, I can just ignore the failures due to outliers (and also reports about failing MBA/MBM test if somebody ever sends one to me), but if I'd be one running automated tests it would be annoying to have a problem like this unaddressed. > > MBA and MBM tests. Some platforms produce outliers that are slightly > > above that, typically 6-7%. > > > > Relaxing the MBA/MBM success bound to 8% removes most of the failures > > due those frequent outliers. > > This description needs more context on what issue is being solved here. > What does the % difference represent? How was new percentage determined? > > Did you investigate why there are differences between platforms? From > what I understand these tests measure memory bandwidth using perf and > resctrl and then compare the difference. Are there interesting things > about the platforms on which the difference is higher than 5%? Not really I think. The number just isn't that stable to always remain below 5% (even if it usually does). Only systematic thing I've come across is that if I play with the read pattern for defeating the hw prefetcher (you've seen a patch earlier and it will be among the series I'll send after this one), it has an impact which looks more systematic across all MBM/MBA tests. But it's not what I'm trying now address with this patch. > Could > those be systems with multiple sockets (and thus multiple PMUs that need > to be setup, reset, and read)? Can the reading of the counters be improved > instead of relaxing the success criteria? A quick comparison between > get_mem_bw_imc() and get_mem_bw_resctrl() makes me think that a difference > is not surprising ... note how the PMU counters are started and reset > (potentially on multiple sockets) at every iteration while the resctrl > counters keep rolling and new values are just subtracted from previous. Perhaps, I can try to look into it (add to my todo list so I won't forget). But in the meantime, this new value is picked using a criteria that looks better than "randomly chosen value". If I ever manage to address the outliers, the bound could be lowered again. I'll update the changelog to explain things better. -- i. --8323329-407709756-1694605424=:1849--