Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp529578lql; Mon, 11 Mar 2024 09:32:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXoLsi6+PORx6A3c4mcjeF8bKzuheFrdVB51/5bJkYrYwaZ49VXkSGodNSejJzEEDc4Liz7mjrn50RUAmrx3PbvxiyTmCNspYXxWFsDSg== X-Google-Smtp-Source: AGHT+IHRFIpGLVK0NeMQNQXhoeELygFmO95NGU1dYMmNX8QIBdU/0ahwvOrI5CUnUtC2y2Zw71kP X-Received: by 2002:a17:902:eb4a:b0:1dd:5f78:c969 with SMTP id i10-20020a170902eb4a00b001dd5f78c969mr6340033pli.62.1710174754806; Mon, 11 Mar 2024 09:32:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710174754; cv=pass; d=google.com; s=arc-20160816; b=qyJOsNRC6rqnftKIu0ljfpWvDl761RPjTYlcxeDt3vjitCyRNktbw5QwaJKeeJ4An4 CtVlvYoGR0ysEghowv1WIXOJf3fhwEB6+PiQoYBP3ItgGGWcNVWPBHNnwVO0N2Y55ehF 5SEyqpV4yk0+k2tQm69veOcE+4xuFtlIO5JGX8W2w7mBvmZ4FB5ZhSjNkR1BAPxOrH2n 1B02v/E8YWQEBuFZivIFY28OviDQVJQk4m8RF2oD+zAhwc4lc9wFPeUt3CAnoMBj/fOz 75fiIM8Ect2YqPQ8iV/WexDoh5tgCmwJsMJfbshFQnFk4IA89TodgUYxWVYZT0wvmHsm fimg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=rkmkRcwfIu2d6z+CA3aESP0rRnkk/WdsA/bJBgvN1wY=; fh=G8k5KLlKAeFR9xe9SXCzJ3g7WPs151bJx6zrec4c8hI=; b=muszvpMlUD7WrNp3VIjWTFElh4++c1cP391S8y9+QvTxAlc74yMdvJ3eniGiwf+LBT B42qP3Zth7LBLYIvGN38yvFfbkr1opeW342kuE9Hd3cegRxW7Ew9zMvO29qZedPGemhi H6xHoTpdY+3PxNuRvkWqUxupFvsxNeIqDbVEMAbyk5hqpYuBwaPir2uVY+lPgDZ1KOOl IRyj2MaC/j9qFIfIIe9twIXf1MNm4FRXj1cUeRDsu/Ewc7FnLd/31EtGSoEVHqK8Kz43 9/HViSuOevg9fyyHwk8VXsnrT3p7rObHLUggrzTW6bsYZBRoxRBISf7TxHZIScP1oPR3 mj8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SQIGstie; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-98917-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98917-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z5-20020a170902d54500b001dcf90d62f7si5184085plf.16.2024.03.11.09.32.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 09:32:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98917-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SQIGstie; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-98917-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98917-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 39756286954 for ; Mon, 11 Mar 2024 13:54:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BAABE3FB2A; Mon, 11 Mar 2024 13:53:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SQIGstie" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2BE240BEF; Mon, 11 Mar 2024 13:53:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710165228; cv=none; b=p9H4LUickU2DeMF8lTIBMmZ9nILdjsxqnBCOUurH2fKFuRw0swiuhWjYW0tEEZTGHfSJ/+d6YCDpeovwYr5+4DGAkxBKkUBLWz8yqjsdcwnziWzVmxa5o4nUhn+77LKiXTTee7172jzreRz+0lrDvtF8wyx+wAZhSyJin49eUh8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710165228; c=relaxed/simple; bh=JPtSfp+JQQ0trLAFpVwdU+Ykb3MHg/csFrk4EECZeQo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=CAe3eyPZ26RYsXC+uZ5hvSz+ZlGTdGg+LviYiaGa+gTrMtfBxiXsHSS06Unn81UbhUDCsEZeVKiz5mTzg6JUt1QEDDnOKUzs5iws3zWnXWciRUedyIoqglwIdFR8lJHV257stDGf5uT25A/S3ls1nstTPSZnBZY8zzx6ZQaMMvw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=SQIGstie; arc=none smtp.client-ip=198.175.65.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710165225; x=1741701225; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JPtSfp+JQQ0trLAFpVwdU+Ykb3MHg/csFrk4EECZeQo=; b=SQIGstieQPN2OWU5OirruCBIwSEw92GSgAc2sMZg8vVyMaJ3VtFWwZmn YMbnyEli8md0oexLCgA3He84gnNpBDRzjEfBj14y+1cFUTie0Mv21bbaI utNDNt6RF45LeOqmZgeYW4baTa1/f7SKrLa+b++QI8KqKUapdNj+hplCz 4dTaEgMa5pgNORXE+oQbOoRvcRhnc0dHrZtl6RuRSR7qqbSlPS57E5byD YjI60V8c9VlBRA3WQpQHfaJWM6e56BBGj27bF3JUDk2i6y4X9NMVkWLZI EQaMGhacIYKuadrBKN2Vrw93juKigDv5DW9fit+/v6eW2/FnV77x7aTap A==; X-IronPort-AV: E=McAfee;i="6600,9927,11009"; a="4705224" X-IronPort-AV: E=Sophos;i="6.07,116,1708416000"; d="scan'208";a="4705224" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2024 06:53:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,116,1708416000"; d="scan'208";a="11247819" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.245.244.201]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2024 06:53:42 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-kselftest@vger.kernel.org, Reinette Chatre , Shuah Khan , Babu Moger , =?UTF-8?q?Maciej=20Wiecz=C3=B3r-Retman?= Cc: Fenghua Yu , linux-kernel@vger.kernel.org, =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH v2 06/13] selftests/resctrl: Rename measure_vals() to measure_mem_bw_vals() & document Date: Mon, 11 Mar 2024 15:52:23 +0200 Message-Id: <20240311135230.7007-7-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240311135230.7007-1-ilpo.jarvinen@linux.intel.com> References: <20240311135230.7007-1-ilpo.jarvinen@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit measure_val() is awfully generic name so rename it to measure_mem_bw() to describe better what it does and document the function parameters. Signed-off-by: Ilpo Järvinen --- tools/testing/selftests/resctrl/resctrl_val.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/resctrl/resctrl_val.c b/tools/testing/selftests/resctrl/resctrl_val.c index 04a8577b5e0a..80e5174df828 100644 --- a/tools/testing/selftests/resctrl/resctrl_val.c +++ b/tools/testing/selftests/resctrl/resctrl_val.c @@ -610,8 +610,14 @@ static void initialize_llc_occu_resctrl(const char *ctrlgrp, const char *mongrp, set_cmt_path(ctrlgrp, mongrp, domain_id); } -static int measure_vals(const struct user_params *uparams, - struct resctrl_val_param *param, pid_t bm_pid) +/* + * measure_mem_bw - Measures memory bandwidth numbers while benchmark runs + * @uparams: User supplied parameters + * @param: parameters passed to resctrl_val() + * @bm_pid: PID that runs the benchmark + */ +static int measure_mem_bw(const struct user_params *uparams, + struct resctrl_val_param *param, pid_t bm_pid) { unsigned long bw_resc, bw_resc_start, bw_resc_end; float bw_imc; @@ -866,7 +872,7 @@ int resctrl_val(const struct resctrl_test *test, if (!strncmp(resctrl_val, MBM_STR, sizeof(MBM_STR)) || !strncmp(resctrl_val, MBA_STR, sizeof(MBA_STR))) { - ret = measure_vals(uparams, param, bm_pid); + ret = measure_mem_bw(uparams, param, bm_pid); if (ret) break; } else if (!strncmp(resctrl_val, CMT_STR, sizeof(CMT_STR))) { -- 2.39.2