Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp538214lqh; Fri, 31 May 2024 08:47:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWxEYs4rFhAsnv6c3P1XA1FNLr5DRwatsoVyRxZyms6l9Q/RUmSJFfiWitrHMx1dAm26qOj8n8bDfPH1gEWkfnN77E7nmOH84ekYv5Hfw== X-Google-Smtp-Source: AGHT+IE0QA5cuhmAulqPWfncwHY8fBHISE5D6yACR4mZuPIkHU/JUniMrZoLe9rHjBFFWfOC58De X-Received: by 2002:a17:903:41ce:b0:1f4:befa:7a44 with SMTP id d9443c01a7336-1f636ff52a3mr27241115ad.1.1717170432518; Fri, 31 May 2024 08:47:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717170432; cv=pass; d=google.com; s=arc-20160816; b=w0+Gzg8o5et3QkG1bN61WsVhNz4QUOx6C04FGLq3Fwt82oB3j1dzs87gchjBlXotf5 VkrGPajBDnnCRH3wBM4Rkmrrjc8KZ7BLcxiDZtVvGbJ1VL/3/TsPZtGOADvYLhNzF+qt /GRQpLTEgip+pimav5+1NjlbcPu6dLbFsbBEVoo7D5DD+pZQ/T7vvQVEIes0hum4l2ZJ whZAOxqbRpy37Vi9UhTTL6h/uFTyW58oT77t+GILx+xGDxPI0CfXz+M/BjZwMyN8elws 8Ks7ieuR4zw3OuTwJJoz8FvlcOHnuj3J4TAe5XWm2fJkDXz/LHRl2WE4nBGYRhJu7hjg DfzQ== 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=LJVW8oOf1tr006SbONWVHPtefdfrOZNo7Kh+zswrL/M=; fh=3qdKZaZnWy2Zq4/Kg/IJyvunFN5PAGmH2zs2MHj5FgQ=; b=fhY1EdfpZcpQzx4oORScTYrrUWWAr6pRbBY1YRXdOjRsAznN4aBzqZO8VzL5gk3jzD LFn5DCQvIRZcTW5UJ+wkyhXe8SxCcq8QQiSUrhorf5GC22JFldqEKh3BDYenV8LlX1kl 1VHb82emECewWZ4ZkLy8a3Cu/eEK95HAVPkK2OTvyEtXBLjkejnNmsqkoijJN5FIs5iD 2JKS58sKreasEmg1hD/Rt/HW14rpYZ7x985jwiFAc+E/48mhlO9qPrBK/11M0Jrq2FLT 8dmqIbZlF//UJKnU61aM6Ib7rL/QS6sDEzHlw4+Zvkcf6qyAwmzriLcP57Mi0Zj0jcBS Jo/g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O3rR7uEm; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-196855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196855-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 d9443c01a7336-1f63235f719si17493355ad.142.2024.05.31.08.47.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 08:47:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196855-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=O3rR7uEm; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-196855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196855-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 3F28028981C for ; Fri, 31 May 2024 13:14:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75BEC158DB2; Fri, 31 May 2024 13:13:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="O3rR7uEm" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 632F6158DAF; Fri, 31 May 2024 13:13:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717161181; cv=none; b=Gxv9WVYJa2GruS0zRR/1SIvfR6CjzaVO1Wh1WvMlRkRFg01k/VdIis6k+hnWyRncPieU9A/TWSNYTXX7dXHsXrN8SIP0ch7JqYlQAZwgYP1QS2YVqj6qHVBIBD/sKdz8O0p/hHGeAZcs1I/5uWGp6pMWpsdEX9y+p41SWoEuKa0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717161181; c=relaxed/simple; bh=s6+PyAMgznQwS0k/vjIVQe5SLGWZ4Hhse1zkGT6a+6A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=cZ948tJaj/xsZSM2pJxuulY37QkHPBoP+x1urjTSEIOXIij3QY+c9fVF8xQ08beqh5O4mHywJIVP2+BqEoB4gewqPaJb+OnTAS4Ho16FzkCpSlwMyBaixVmuCc5fTKNzVbW0q3fraKQ65lDz0LgEw+kz6dcUWRsLE8W4d/08jAY= 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=O3rR7uEm; arc=none smtp.client-ip=198.175.65.15 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=1717161180; x=1748697180; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=s6+PyAMgznQwS0k/vjIVQe5SLGWZ4Hhse1zkGT6a+6A=; b=O3rR7uEmFlaBYbMqMWaZwtMpsZpaXST0MeTgviuHcDVjUYGqlEjb3FZ+ KAkV3YlVF2Gca0Xo4VyAAK4N771CHtjNF0MUJa/QlxDfade8zaW4v6sWN g1cSB3qpyBC1hpFAiv3wI+sCEac5Btj6vxON6/ST/+uGRiUQvjRTZk9a/ cyDgzlBVlQqTzqXgG9oMIWXPGwNieknDFprYrb5e1nIAoD/xJJuxR+TXt UPbdAhYgmE55K3nCc6t2C9gijFsVH0JkQeI+wJIjxpcUCjUGfVwaYjDNo mkNKmqlTkoAzf8tZLFYZw9mKrY8lvoauWgYX4DhEHb/XJRf9nRb3t9Vby w==; X-CSE-ConnectionGUID: 2zqrW+hRR2+77DZNGsMlfQ== X-CSE-MsgGUID: 1Zdx/8AHSKWqsQwlg1vHuQ== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="17501482" X-IronPort-AV: E=Sophos;i="6.08,204,1712646000"; d="scan'208";a="17501482" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 06:13:00 -0700 X-CSE-ConnectionGUID: /5zjvDPWRW2jtwNnig1trg== X-CSE-MsgGUID: pP+KlaOUTn22NWIWNajF2A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,204,1712646000"; d="scan'208";a="36240526" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.245.247.152]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 06:12:57 -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: linux-kernel@vger.kernel.org, Fenghua Yu , Shuah Khan , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH v5 07/16] selftests/resctrl: Rename measure_vals() to measure_mem_bw_vals() & document Date: Fri, 31 May 2024 16:11:33 +0300 Message-Id: <20240531131142.1716-8-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240531131142.1716-1-ilpo.jarvinen@linux.intel.com> References: <20240531131142.1716-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_vals() 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 Reviewed-by: Reinette Chatre --- v5: - Typo fix to commit message - Consistent caps in kerneldoc --- 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 3939a657de4a..e3670b8bc317 100644 --- a/tools/testing/selftests/resctrl/resctrl_val.c +++ b/tools/testing/selftests/resctrl/resctrl_val.c @@ -637,8 +637,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; FILE *mem_bw_fp; @@ -906,7 +912,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