Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2267807rwp; Fri, 14 Jul 2023 03:39:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlEg2NCYeIKM08a+ujcVFG6ACwb7DqrTR9a6oWj5EoSb9nOLsvri87cDRnmJ13NOifmG+hPn X-Received: by 2002:a05:6a00:8ce:b0:681:919f:bf69 with SMTP id s14-20020a056a0008ce00b00681919fbf69mr3661681pfu.0.1689331175871; Fri, 14 Jul 2023 03:39:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689331175; cv=none; d=google.com; s=arc-20160816; b=yADbYX+USGmFK5Fnp3u6qe1Y2SQMADdsyHlLIunCciwPczD3t2TFiha43OUFn1D6Nu +HJoAtZBhu2nBoq1MuxWwSGVZFk0kFbNVykS7ZKKAn/q0+kECKdIydzWOJB0RAujcpS6 kTCk3f9f2jl5tmG6l9MVjmmco9PsxeF3X+lpCwIEJa6ikS6A0fsUFpW+jKiVln2s9FH5 LfTXwt0sQaVvDxBcvSg/C2OiTqi1Q1ZrJXUuQrwmJu6oYP0O42ePbU9ciJOM+zz7McVz EicrNctfZCbiY18vTQS//q9C2RkfXcg5ixDU2osjaEYRTGKJYqc2Un7PoAQyatufOPYK sR3Q== 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=Nc2SkRWBoxTxL3mJ5QberSa7vp9RIqs+l2qS7YOddxs=; fh=xa/OVY8U7l7TY/e+CnbPDiK6BBfymUBLuVME33TtxKc=; b=c0bppM8dG9651BYGCTtQJOTL12BPWHvsCCNSzXiB0bgbNDWLwPolpGxn3RibPzqGwf cN4pBewb5s+2vb1BQt9K6TFVKFCPUcwJ7/O0MhdI5VRXqZif1WMYqPn7tdX0OZJtWJth kaF4jJz8SBXa/ttkOzBjjdirEjrrwNfcI/bQH6+3PixLi2xIYwxeF1dqR6iMXupbNul1 fTOnySwvO3EFIkH6ZzhH+u4cqZ6jpeU9McGq7z6AqEitlXmajjxdLGtqAs1cZ3ujI5cX pXqPpmOAlmFx9fThB/ertFTPaUcTKyaLu24NkSXv84EDe6B59FCGqV5Kr21cG32Y0DYA hU3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=j14hoofv; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay24-20020a056a00301800b00675aec34aedsi6909019pfb.375.2023.07.14.03.39.23; Fri, 14 Jul 2023 03:39:35 -0700 (PDT) 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=@intel.com header.s=Intel header.b=j14hoofv; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236109AbjGNKWk (ORCPT + 99 others); Fri, 14 Jul 2023 06:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236148AbjGNKWi (ORCPT ); Fri, 14 Jul 2023 06:22:38 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AB932728; Fri, 14 Jul 2023 03:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689330156; x=1720866156; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=I5+hRM1CZd6U68X0rZ2pfLztEvlR5kgkNIj373lYSsc=; b=j14hoofv0UNyzkzNnArSl114voO2+RCnT1guIgOdKGYTEbb0Qz6zMHTa dNAK05fXqYD71i9PuUjKPBe0iXwj3ChSMkWG9dxj+ECWQXv4rngFq44dJ x8l9ESC8gsdFqODEV0ePLGELme2NtebmwyPupD6+MfoE2Z2cxtz+qDc77 yCjM7NsWO/ZEgrej9roM8Q+P53+BniSI4WOkeEFB0aVE9mz57Kiy3kl8W V378Tai9J4KUCFDEdS8mxaFw88l6ocQ0TZCYdClQZ9BzGcEVy3SIsVSMX HSX3mXdAz07e4mnQrlk4beL7N2RlFYOi7Z7sUq18otLHsEt7TOuTMDqAn Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="429204920" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="429204920" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2023 03:22:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="716293017" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="716293017" Received: from rchauhax-mobl1.gar.corp.intel.com ([10.249.35.123]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2023 03:22:33 -0700 Date: Fri, 14 Jul 2023 13:22:27 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: "Wieczor-Retman, Maciej" cc: Reinette Chatre , linux-kselftest@vger.kernel.org, Shuah Khan , Shaopeng Tan , Fenghua Yu , LKML Subject: Re: [PATCH v4 10/19] selftests/resctrl: Express span internally in bytes In-Reply-To: <0c94daef-3642-9e8e-0e8a-3f8eaa2953e3@intel.com> Message-ID: References: <20230713131932.133258-1-ilpo.jarvinen@linux.intel.com> <20230713131932.133258-11-ilpo.jarvinen@linux.intel.com> <1dd10447-b03d-937a-fe55-ff324864c358@intel.com> <0c94daef-3642-9e8e-0e8a-3f8eaa2953e3@intel.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-2079984484-1689330155=:1695" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 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-2079984484-1689330155=:1695 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Fri, 14 Jul 2023, Wieczor-Retman, Maciej wrote: > Hi Reinette! > > On 14.07.2023 01:00, Reinette Chatre wrote: > > Hi Ilpo, > > > > On 7/13/2023 6:19 AM, Ilpo Järvinen wrote: > >> MBA and MBM tests to use megabytes to represent span. CMT test uses > >> bytes. The difference requires run_benchmark() to size the buffer > >> differently based on the test name, which in turn requires passing the > >> test name into run_benchmark(). > >> > >> Convert MBA and MBM tests to use internally bytes like CMT test to > >> remove the internal inconsistency between the tests. Remove the test > >> dependent buffer sizing from run_benchmark(). > > > > If I understand correctly the intention is to always use bytes internally > > and only convert to megabytes when displayed to user space. The above > > implies that this takes care of the conversion but there still seems > > to be places that that do not follow my understanding. For example, > > resctrl_val.c:measure_vals() converts to megabytes before proceeding. > > Doesn't the use case inside resctrl_val.c:measure_vals() satisfy > the idea of only displaying data to the user space? From my > understanding it reads the number of bytes and only converts to > MB when printing the value. Or did I miss some detail there? It's for printing there yes. But it's not about span in the first place so I'm not sure why it is related. -- i. > > While MBA, MBM, and CMT tests use resctrl_val() for testing it seems > > as though the function still exits with the MBA/MBM data recorded in > > megabytes with the CMT data recorded in bytes. That seems to be why > > show_mba_info() needs no conversion when displaying the data. > > > > Reinette > > Kind regards > Maciej Wieczór-Retman > --8323329-2079984484-1689330155=:1695--