From patchwork Wed Feb 8 09:40:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13132746 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 998CAC05027 for ; Wed, 8 Feb 2023 09:40:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbjBHJkm (ORCPT ); Wed, 8 Feb 2023 04:40:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbjBHJkl (ORCPT ); Wed, 8 Feb 2023 04:40:41 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 142B6977A; Wed, 8 Feb 2023 01:40:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675849241; x=1707385241; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=U5te91Tbq5bcJrl+9WOQqOi1osSLqIV0/0A3oSWetII=; b=eArhFvezlXrIsHO7y4PCNZ3nY9GvP2UKsGsqRmtORWukG6edm31gjosI ZXTlpjN/jWaYf20das9FYIE47qDdNl4V6LtzGtlKlCTelS9AljdlbeHTx jGz5hd6wG19j2VmkFi6M9bMGFfzY6bp/DPfDni758uyDy23Npu24p4LPZ U+8MQi0cYvj20A+BUmHzlg4Nwjuf2eBUEo/KKXvHq77+F93XpDCrrGrR3 mdjTEmkV7hZuLd4WwfESiCfb2q98YiROcODkTOfARowM3X0K5fcNRsZvz aUFYInyGmfSR4Uk8PoKVwfxoZ5yu0oRZvIp1z0V0VcYGZ4lZAfUGAHaw9 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="328410784" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="328410784" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 01:40:40 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="617150253" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="617150253" Received: from jstelter-mobl.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.38.39]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 01:40:38 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre , Fenghua Yu , Shuah Khan Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH 1/4] selftests/resctrl: Change initialize_llc_perf() return type to void Date: Wed, 8 Feb 2023 11:40:23 +0200 Message-Id: <20230208094026.22529-2-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230208094026.22529-1-ilpo.jarvinen@linux.intel.com> References: <20230208094026.22529-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org initialize_llc_perf() unconditionally does return 0 so no point in having it's return type as int. Hence, change it's return type from int to void. Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Signed-off-by: Ilpo Järvinen --- tools/testing/selftests/resctrl/cache.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/resctrl/cache.c b/tools/testing/selftests/resctrl/cache.c index 68ff856d36f0..4b8ee81aedae 100644 --- a/tools/testing/selftests/resctrl/cache.c +++ b/tools/testing/selftests/resctrl/cache.c @@ -48,7 +48,7 @@ static int perf_event_open_llc_miss(pid_t pid, int cpu_no) return 0; } -static int initialize_llc_perf(void) +static void initialize_llc_perf(void) { memset(&pea_llc_miss, 0, sizeof(struct perf_event_attr)); memset(&rf_cqm, 0, sizeof(struct read_format)); @@ -59,8 +59,6 @@ static int initialize_llc_perf(void) pea_llc_miss.config = PERF_COUNT_HW_CACHE_MISSES; rf_cqm.nr = 1; - - return 0; } static int reset_enable_llc_perf(pid_t pid, int cpu_no) @@ -234,11 +232,8 @@ int cat_val(struct resctrl_val_param *param) if (ret) return ret; - if (!strncmp(resctrl_val, CAT_STR, sizeof(CAT_STR))) { - ret = initialize_llc_perf(); - if (ret) - return ret; - } + if (!strncmp(resctrl_val, CAT_STR, sizeof(CAT_STR))) + initialize_llc_perf(); /* Test runs until the callback setup() tells the test to stop. */ while (1) { From patchwork Wed Feb 8 09:40:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13132747 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5142C636CC for ; Wed, 8 Feb 2023 09:40:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230362AbjBHJkp (ORCPT ); Wed, 8 Feb 2023 04:40:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjBHJko (ORCPT ); Wed, 8 Feb 2023 04:40:44 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 219D11BFF; Wed, 8 Feb 2023 01:40:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675849244; x=1707385244; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=fQj277y5B7yPRyeIaCrwNJtSSoMya5ytfa5/89NyjF4=; b=jJVVSyJyaMw4j6Pwt7jbqbXRLFa4R4Tpqzs3aNEEDeh8WV7/hnflXBam dZidFfeqIofJId9USTOkzNeXuNr3aFblAiWYBl317bRe7p89k22NFJC6I lJXr0E5tP4BQ7s2JYlc4Cjvyco5ehScjob65E8bSBx6Zi3b8OSN6TjwaC 4UboAzekgd8T6cgSi9crdAxGl0Wmx/9rOU4Iob4BTDiNh7eJ+akFFABVF bW2ePAX828Vo2ytro+yl/+r9eIu8uQGt9IOfsE6TjOCeklKpw07/GuuZT 9wr8mni/rSjTTdM/RPrkxtHVSH76R7jcgB5m1Nqi5bB1UDX5XlzX0Ks+0 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="328410791" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="328410791" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 01:40:43 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="617150264" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="617150264" Received: from jstelter-mobl.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.38.39]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 01:40:41 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre , Fenghua Yu , Shuah Khan Subject: [PATCH 2/4] selftests/resctrl: Don't hard code divisor in MBM results Date: Wed, 8 Feb 2023 11:40:24 +0200 Message-Id: <20230208094026.22529-3-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230208094026.22529-1-ilpo.jarvinen@linux.intel.com> References: <20230208094026.22529-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: Fenghua Yu Presently, while calculating MBM results, the divisor is hard coded as 4. It's hard coded to 4 because "NUM_OF_RUNS" is defined as 5 and the test does not count first result and hence 4. So, instead of hard coding the value to 4, change it to NUM_OF_RUNS - 1. Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/mbm_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c index 8392e5c55ed0..4f85cbbfd037 100644 --- a/tools/testing/selftests/resctrl/mbm_test.c +++ b/tools/testing/selftests/resctrl/mbm_test.c @@ -31,8 +31,8 @@ show_bw_info(unsigned long *bw_imc, unsigned long *bw_resc, int span) sum_bw_resc += bw_resc[runs]; } - avg_bw_imc = sum_bw_imc / 4; - avg_bw_resc = sum_bw_resc / 4; + avg_bw_imc = sum_bw_imc / (NUM_OF_RUNS - 1); + avg_bw_resc = sum_bw_resc / (NUM_OF_RUNS - 1); avg_diff = (float)labs(avg_bw_resc - avg_bw_imc) / avg_bw_imc; avg_diff_per = (int)(avg_diff * 100); From patchwork Wed Feb 8 09:40:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13132748 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A0B6C05027 for ; Wed, 8 Feb 2023 09:40:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229490AbjBHJky (ORCPT ); Wed, 8 Feb 2023 04:40:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229684AbjBHJkw (ORCPT ); Wed, 8 Feb 2023 04:40:52 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C00F442C1; Wed, 8 Feb 2023 01:40:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675849247; x=1707385247; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=w+4SOYOHFtsPv6X601DdF2MZZiDyDeUy+9jXep2pHig=; b=WSWvz7/DXP2tg7EQ624fMeamhszyTdDVkFBXkWqXFhNfKjJzRasw7gB5 AynA7Ldh6Qc9TUgPCTgYqRa4TCEbJG35f4oLoV+yGMowrX0aWeoOfaF/F gzgfI1/z6wAOY/CrhAKcVqBsknFUr2H4PLkYU9MAew5STnfNFlInysQil 22AbPvGDWVrrD/0jv8qeiIATu8ZbI6AG1ime0Zci/yGPC2HI+6MP97pbs pkdHePUYsTt0AsG2ZGFsSq5WHhjG7QFZ4pD3XyGFqSrEmpJ0BhOBmvT3u hMLSKcs3h/gb8tAyqc5qLog8/SCCqmxlreUqKsriJgm+NiYrL74mmzIz+ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="328410798" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="328410798" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 01:40:46 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="617150282" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="617150282" Received: from jstelter-mobl.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.38.39]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 01:40:44 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre , Fenghua Yu , Shuah Khan Subject: [PATCH 3/4] selftests/resctrl: Change name from CBM_MASK_PATH to INFO_PATH Date: Wed, 8 Feb 2023 11:40:25 +0200 Message-Id: <20230208094026.22529-4-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230208094026.22529-1-ilpo.jarvinen@linux.intel.com> References: <20230208094026.22529-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: "Signed-off-by: Fenghua Yu" CBM_MASK_PATH is actually the path to resctrl/info, so change the macro name to correctly indicate what it represents. Signed-off-by: Fenghua Yu --- tools/testing/selftests/resctrl/resctrl.h | 2 +- tools/testing/selftests/resctrl/resctrlfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/resctrl/resctrl.h b/tools/testing/selftests/resctrl/resctrl.h index f0ded31fb3c7..4f0976f12634 100644 --- a/tools/testing/selftests/resctrl/resctrl.h +++ b/tools/testing/selftests/resctrl/resctrl.h @@ -28,7 +28,7 @@ #define MB (1024 * 1024) #define RESCTRL_PATH "/sys/fs/resctrl" #define PHYS_ID_PATH "/sys/devices/system/cpu/cpu" -#define CBM_MASK_PATH "/sys/fs/resctrl/info" +#define INFO_PATH "/sys/fs/resctrl/info" #define L3_PATH "/sys/fs/resctrl/info/L3" #define MB_PATH "/sys/fs/resctrl/info/MB" #define L3_MON_PATH "/sys/fs/resctrl/info/L3_MON" diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c index 6f543e470ad4..cc6cf49e3129 100644 --- a/tools/testing/selftests/resctrl/resctrlfs.c +++ b/tools/testing/selftests/resctrl/resctrlfs.c @@ -210,7 +210,7 @@ int get_cbm_mask(char *cache_type, char *cbm_mask) if (!cbm_mask) return -1; - sprintf(cbm_mask_path, "%s/%s/cbm_mask", CBM_MASK_PATH, cache_type); + sprintf(cbm_mask_path, "%s/%s/cbm_mask", INFO_PATH, cache_type); fp = fopen(cbm_mask_path, "r"); if (!fp) { From patchwork Wed Feb 8 09:40:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 13132749 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68F8CC636D3 for ; Wed, 8 Feb 2023 09:40:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230433AbjBHJk6 (ORCPT ); Wed, 8 Feb 2023 04:40:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230514AbjBHJkz (ORCPT ); Wed, 8 Feb 2023 04:40:55 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02B4645203; Wed, 8 Feb 2023 01:40:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675849254; x=1707385254; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jbdAvdHmGfnFS7SHepWCMw9xcB4b6ij+jxyJEPhuGko=; b=LPfSQ8ZQQWOWdaF8/dzU/VmKYeR21PiJUazvgJzbRzQfXeipOd7AenIG FMlP0zKEJlllnXCTWotGmzaiLhCCqTwxYMTmvtrJ9l46T9MZXQz/NiX5k ooTU2e54pyg0OqMe1OZa4b4RO0DnzXGEOouuLxDUIE8vQis1aWGQiRC/A TQ1poFDt3jHaNUZ3qzS9ghpWm1AEuPNMMgBgtxm90dw9wKpTrKiIx5ZbX 47S3bi0fpiaBT5W6BQMM+ltl4YZKkNfxj/C8abHbEfzRD9LNJyXkJfDUr yLmg43kpyYSOeMl96Ruq4hvCGVlxMMaphXHjzc/54Rr5gspi4tXG8fWK3 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="328410809" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="328410809" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 01:40:53 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="617150304" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="617150304" Received: from jstelter-mobl.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.38.39]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 01:40:51 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre , Fenghua Yu , Shuah Khan Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH 4/4] selftests/resctrl: Use remount_resctrlfs() consistently with boolean Date: Wed, 8 Feb 2023 11:40:26 +0200 Message-Id: <20230208094026.22529-5-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230208094026.22529-1-ilpo.jarvinen@linux.intel.com> References: <20230208094026.22529-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org remount_resctrlfs() accepts a boolean value as an argument and presently, some tests pass 0/1 and some tests pass true/false. Make all the callers of remount_resctrlfs() use true/false so that it's usage is consistent across tests. Co-developed-by: Fenghua Yu Signed-off-by: Fenghua Yu Signed-off-by: Ilpo Järvinen --- tools/testing/selftests/resctrl/cat_test.c | 2 +- tools/testing/selftests/resctrl/cmt_test.c | 7 +++---- tools/testing/selftests/resctrl/mba_test.c | 2 +- tools/testing/selftests/resctrl/mbm_test.c | 2 +- tools/testing/selftests/resctrl/resctrl.h | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c index 1c5e90c63254..265302094095 100644 --- a/tools/testing/selftests/resctrl/cat_test.c +++ b/tools/testing/selftests/resctrl/cat_test.c @@ -145,7 +145,7 @@ int cat_perf_miss_val(int cpu_no, int n, char *cache_type) struct resctrl_val_param param = { .resctrl_val = CAT_STR, .cpu_no = cpu_no, - .mum_resctrlfs = 0, + .mum_resctrlfs = false, .setup = cat_setup, }; diff --git a/tools/testing/selftests/resctrl/cmt_test.c b/tools/testing/selftests/resctrl/cmt_test.c index 8968e36db99d..4903e5eb04a1 100644 --- a/tools/testing/selftests/resctrl/cmt_test.c +++ b/tools/testing/selftests/resctrl/cmt_test.c @@ -82,12 +82,11 @@ void cmt_test_cleanup(void) int cmt_resctrl_val(int cpu_no, int n, char **benchmark_cmd) { - int ret, mum_resctrlfs; + int ret; cache_size = 0; - mum_resctrlfs = 1; - ret = remount_resctrlfs(mum_resctrlfs); + ret = remount_resctrlfs(true); if (ret) return ret; @@ -118,7 +117,7 @@ int cmt_resctrl_val(int cpu_no, int n, char **benchmark_cmd) .ctrlgrp = "c1", .mongrp = "m1", .cpu_no = cpu_no, - .mum_resctrlfs = 0, + .mum_resctrlfs = false, .filename = RESULT_FILE_NAME, .mask = ~(long_mask << n) & long_mask, .span = cache_size * n / count_of_bits, diff --git a/tools/testing/selftests/resctrl/mba_test.c b/tools/testing/selftests/resctrl/mba_test.c index 1a1bdb6180cf..7c2a5668e215 100644 --- a/tools/testing/selftests/resctrl/mba_test.c +++ b/tools/testing/selftests/resctrl/mba_test.c @@ -149,7 +149,7 @@ int mba_schemata_change(int cpu_no, char *bw_report, char **benchmark_cmd) .ctrlgrp = "c1", .mongrp = "m1", .cpu_no = cpu_no, - .mum_resctrlfs = 1, + .mum_resctrlfs = true, .filename = RESULT_FILE_NAME, .bw_report = bw_report, .setup = mba_setup diff --git a/tools/testing/selftests/resctrl/mbm_test.c b/tools/testing/selftests/resctrl/mbm_test.c index 4f85cbbfd037..b7f53c000252 100644 --- a/tools/testing/selftests/resctrl/mbm_test.c +++ b/tools/testing/selftests/resctrl/mbm_test.c @@ -122,7 +122,7 @@ int mbm_bw_change(int span, int cpu_no, char *bw_report, char **benchmark_cmd) .mongrp = "m1", .span = span, .cpu_no = cpu_no, - .mum_resctrlfs = 1, + .mum_resctrlfs = true, .filename = RESULT_FILE_NAME, .bw_report = bw_report, .setup = mbm_setup diff --git a/tools/testing/selftests/resctrl/resctrl.h b/tools/testing/selftests/resctrl/resctrl.h index 4f0976f12634..2bd593d7661f 100644 --- a/tools/testing/selftests/resctrl/resctrl.h +++ b/tools/testing/selftests/resctrl/resctrl.h @@ -62,7 +62,7 @@ struct resctrl_val_param { char mongrp[64]; int cpu_no; unsigned long span; - int mum_resctrlfs; + bool mum_resctrlfs; char filename[64]; char *bw_report; unsigned long mask;