Message ID | 20230605180145.112924-1-ilpo.jarvinen@linux.intel.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2878469vqr; Mon, 5 Jun 2023 11:32:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ723ZFLXPM9bJ/fmH72R5eDMdVz1UpvsXTOUUn6oE5z0BK7wIk0oIoXVfxTJqFX17fYc2jX X-Received: by 2002:a05:6a00:1885:b0:658:26a8:9d9e with SMTP id x5-20020a056a00188500b0065826a89d9emr637644pfh.29.1685989968628; Mon, 05 Jun 2023 11:32:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685989968; cv=none; d=google.com; s=arc-20160816; b=T3ZSQkIjOCU4x5salJ4khpJAAyEvYQOffZGmkFcZrazQvMgvL9F//oSQnQmD7Lz1tQ sMOaDitUvDCzcJfXj1YN3A2iE7asApm6IsTyO/sW2laoNjZDGUE89BMn023VwLyBluYy A585zo5NITrSDGM7lv9T1sDhzkLG2GZ9V6OP3c5MId0LAsc/B1qHL7zGwkiKLnDgTdMZ HmIA7r/jGsbsMgg/efCyiMnvYkC/QKTxCuFRUrH64/Dh9HbzX2ajm2GbpJIZyccHtXIW X6VsdZyE0BP/ILZvsefPl50QH8/2v1HNm/nhHnPUII8q1RMdzbt6x67gns3mbYZ147Dq RuUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/18Os2p4bnWuxHPhsXSUzEoMw1j4KKf/jv97VyJh5xI=; b=RyUT7tulxUOHZ8n7Ms6YAAjc93hPsGP4FPNSYgfd3+3C3WCi6xKqZ7N/qa1UwUaLn7 Ot1FJ2fq3sLE910nlduXHDXYI69BqzBSZJINvKoVz1iH542nBM3xzuXlIkna+kBHLA/X zCArJN1ygcUt/rVZQB90MRywJm7BHoI1EEGb79pVdILhhCshZfuNGRqHEbl/DM3GJLXm vM6Xqg1HG2Q7JGhfeerqVWM5HY07/qkT1xWFKTNZ/ZVvewExmPPrEkuNnRAoj+c95+vj axMK7jHv2XixNmp+8o83+1QmIkDwP20BgjWq5/4otOhAh2bPQTt604CDr7QRuHqw9nTn r9Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BebsTIgz; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p64-20020a622943000000b006434d66f94dsi5531472pfp.31.2023.06.05.11.32.36; Mon, 05 Jun 2023 11:32:48 -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=BebsTIgz; 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 S230374AbjFESCQ (ORCPT <rfc822;xxoosimple@gmail.com> + 99 others); Mon, 5 Jun 2023 14:02:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229862AbjFESCM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 5 Jun 2023 14:02:12 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F029C7; Mon, 5 Jun 2023 11:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685988131; x=1717524131; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=VDLALtK2AJdAyCo9kQBeq6ZlaKcBgCzq1beplRvxrsk=; b=BebsTIgzxiB+1OiVhOd5l2pqkBN40xzQZ8yqj8+Y9MrFQB6AF9SK8KEL MEJS6ZbFWcEGYg/9T0OS3aB18EYtVcsSZ8LAENAZIYvVib8hpBks7myfE I5U14NrJYAW27ZsHHgId2xEQPxH1Z1qyneQjVRzXMBG8/KTvonGsc9kjL rV1dzMsHnFDdniZR/hnjGXGepz+IGqjb48YrqLuum9H5gArTM/E4r9TnU wC3KFXXCEAnvZxZrQaBuMOG6w7vUQJzCtziMbPV8oP0BOLLCCogNvbBjt 0i8le1IGcpaoSb03jGFTZkJMn18IqqYgpWDc4xeXcPk8shDckTgmIQ1np A==; X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="442814810" X-IronPort-AV: E=Sophos;i="6.00,218,1681196400"; d="scan'208";a="442814810" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 11:01:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="821273962" X-IronPort-AV: E=Sophos;i="6.00,218,1681196400"; d="scan'208";a="821273962" Received: from gfittedx-mobl.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.47.115]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 11:01:52 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> To: linux-kselftest@vger.kernel.org, Reinette Chatre <reinette.chatre@intel.com>, Shuah Khan <shuah@kernel.org>, Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>, Fenghua Yu <fenghua.yu@intel.com> Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com> Subject: [PATCH v3 00/19] selftests/resctrl: Fixes and cleanups Date: Mon, 5 Jun 2023 21:01:26 +0300 Message-Id: <20230605180145.112924-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767888617089325453?= X-GMAIL-MSGID: =?utf-8?q?1767888617089325453?= |
Series |
selftests/resctrl: Fixes and cleanups
|
|
Message
Ilpo Järvinen
June 5, 2023, 6:01 p.m. UTC
Here is a series with some fixes and cleanups to resctrl selftests. In v3, the rewritten CAT test is not included as an issue was discovered in one of its components requiring further work before it can be included to mainline. v3: - Don't include rewritten CAT test into this series! - Tweak wildcard style in Makefile - Fix many changelog typos, remove some wrong claims, and generally improve them. - Add fix to PARENT_EXIT() to unmount resctrl FS - Add unmounting resctrl FS before starting any tests - Add fix for buf leak - Add fix for perf fd closing - Split mount/remount/umount patches differently - Use size_t and %zu for span - Keep MBM print as MB, only internally use span in bytes - Drop start_buf global from fill_buf v2 (was sent with CAT test rewrite which is no longer included in v3): - Rebased on top of next to solve the conflicts - Added 2 patches related to resctrl FS mount/umount (fix + cleanup) - Consistently use "alloc" in cache_alloc_size() - CAT test error handling tweaked - Remove a spurious newline change from the CAT patch - Small improvements to changelogs Ilpo Järvinen (19): selftests/resctrl: Add resctrl.h into build deps selftests/resctrl: Don't leak buffer in fill_cache() selftests/resctrl: Unmount resctrl FS if child fails to run benchmark selftests/resctrl: Close perf value read fd on errors selftests/resctrl: Unmount resctrl FS before starting the first test selftests/resctrl: Move resctrl FS mount/umount to higher level selftests/resctrl: Refactor remount_resctrl(bool mum_resctrlfs) to mount_resctrl() selftests/resctrl: Remove mum_resctrlfs from struct resctrl_val_param selftests/resctrl: Convert span to size_t selftests/resctrl: Express span internally in bytes selftests/resctrl: Remove duplicated preparation for span arg selftests/resctrl: Remove "malloc_and_init_memory" param from run_fill_buf() selftests/resctrl: Remove unnecessary startptr global from fill_buf selftests/resctrl: Improve parameter consistency in fill_buf selftests/resctrl: Don't pass test name to fill_buf selftests/resctrl: Don't use variable argument list for ->setup() selftests/resctrl: Move CAT/CMT test global vars to function they are used in selftests/resctrl: Pass the real number of tests to show_cache_info() selftests/resctrl: Remove test type checks from cat_val() tools/testing/selftests/resctrl/Makefile | 2 +- tools/testing/selftests/resctrl/cache.c | 64 +++++++------- tools/testing/selftests/resctrl/cat_test.c | 28 ++---- tools/testing/selftests/resctrl/cmt_test.c | 29 ++----- tools/testing/selftests/resctrl/fill_buf.c | 87 +++++++------------ tools/testing/selftests/resctrl/mba_test.c | 9 +- tools/testing/selftests/resctrl/mbm_test.c | 17 ++-- tools/testing/selftests/resctrl/resctrl.h | 17 ++-- .../testing/selftests/resctrl/resctrl_tests.c | 82 +++++++++++------ tools/testing/selftests/resctrl/resctrl_val.c | 7 +- tools/testing/selftests/resctrl/resctrlfs.c | 57 ++++++------ 11 files changed, 169 insertions(+), 230 deletions(-)
Comments
Hi Ilpo, > Here is a series with some fixes and cleanups to resctrl selftests. In v3, the > rewritten CAT test is not included as an issue was discovered in one of its > components requiring further work before it can be included to mainline. > > v3: > - Don't include rewritten CAT test into this series! > - Tweak wildcard style in Makefile > - Fix many changelog typos, remove some wrong claims, and generally > improve them. > - Add fix to PARENT_EXIT() to unmount resctrl FS > - Add unmounting resctrl FS before starting any tests > - Add fix for buf leak > - Add fix for perf fd closing > - Split mount/remount/umount patches differently > - Use size_t and %zu for span > - Keep MBM print as MB, only internally use span in bytes > - Drop start_buf global from fill_buf I reviewed this patch series, and ran resctrl selftest on Intel(R) Xeon(R) Gold 6254 CPU, it seems there is no problem. <Tested-by:tan.shaopeng@jp.fujitsu.com> <Reviewed-by:tan.shaopeng@jp.fujitsu.com>