Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4182037rdh; Tue, 28 Nov 2023 14:21:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IESbeCu/Nz6QdCsEUpijrzKMSG04TLJguyB0zrFDjeOZ0TMmvavYT3eah0NH8rGpA02WJaT X-Received: by 2002:a17:903:22d0:b0:1cf:d06e:d730 with SMTP id y16-20020a17090322d000b001cfd06ed730mr9342835plg.1.1701210111786; Tue, 28 Nov 2023 14:21:51 -0800 (PST) Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id lv6-20020a1709032a8600b001cc55215729si13753868plb.363.2023.11.28.14.21.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 14:21:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZRPdnyQv; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4442280755EA; Tue, 28 Nov 2023 14:21:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346160AbjK1WVA (ORCPT + 99 others); Tue, 28 Nov 2023 17:21:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346689AbjK1WU4 (ORCPT ); Tue, 28 Nov 2023 17:20:56 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 449BB10D1; Tue, 28 Nov 2023 14:21:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701210062; x=1732746062; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=sbgnAbkOe0wuAoGs85gVt0eG8dmT/kTdaKgF6duRm+U=; b=ZRPdnyQvBao+yAnCnbkTbo9pIkSOf1fCu9AjgVuRKgZqdIune2OPD3gi OUJKvaK4uIvBbpKI4WOkLziX0JKYyVHPer2Moh2oUt4PG2hreeFcgdIyp jwBRmiCY3IVUfHZdofdmrOJKkmNHG/B6lPfyxshz+6RqfGr1LIViE2chc Mh8+jnfE/4A+ah9zJ1/NxN+dCMTqbne0Yo+g6Go3Ubw49edBpizycB6MB 49BjQhQBZIlsk5SbOlacGBLWKiuz09UFPbNj/EjSk7L7YfsEuF1+xwaVh zdMMMXBGsW6gX1g9/n1H3uiRu6AwtuObbMmyWg0CCgXETLHevPZ0YP0l6 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="459544619" X-IronPort-AV: E=Sophos;i="6.04,234,1695711600"; d="scan'208";a="459544619" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Nov 2023 14:21:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="912607573" X-IronPort-AV: E=Sophos;i="6.04,234,1695711600"; d="scan'208";a="912607573" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga001.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 28 Nov 2023 14:20:57 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 28 Nov 2023 14:20:57 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 28 Nov 2023 14:20:13 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Tue, 28 Nov 2023 14:20:13 -0800 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Tue, 28 Nov 2023 14:19:55 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FhCpTY6k12h4bxZYEW1sgE87bboM/21zB4R/d6bO19nMciE+GznA79fn7hig16NAdUcCWaeuF5N9+rUr80vzsONzIwD6g8Wej/AItmIhXffXLaZGO85Rt8BsDKHm+wqegxchYR8FOhb9K3HSGFzdlSg0pD8bpiBWx2puyyR2PexJhNgdXvGgTcG4pT0q05d2GPBae55jptrGw5Mr4Tp+2zjbu6roG+sBpCbE9KzXyb0ka/qRsveXNp0h192cbGqLdCEx2p3QE8nIzUQiQlyZc2vokxfTcgZkccXXBcmfWZdLac/lVvAjtLpL0eSoCLGvmCCy9ayXyxBuTaIMORInsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=c5zHamoMILYWTWIFADcdQlccWRwYqykp2LBcy6tN0dU=; b=WHN/1woHzIyVyhhUJgki1tvEBG6RU8kBkSyjTtOZ6epK+vFMcNrdWN0s5gHajcE6gI6hq3EE8a05/ybacUJF49sK1G4bcTM5L6eIrzRNVW9YOZzGgiw5rgbqpjR3Hj9pompN0JF32zpHfAfJ64bEF5NTyVAB7RTqC5r+sEGX5PnPgQk0xb9J0qVSgkbEzE86KYESRR0leJ4lH4bisv3AoEzHsnTfTyFU52d0TIskEdIr8sy1iEUEGX+Ni5uJKb6LqLleldSFqbrRgPWfV+VSunE94EBfEQofJDhfrENtr+nIlPw/YtPhGAuty4e9d5ChLTRgMlKkxfpw9PvZSGIEFw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SJ2PR11MB7573.namprd11.prod.outlook.com (2603:10b6:a03:4d2::10) by SA3PR11MB8024.namprd11.prod.outlook.com (2603:10b6:806:300::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.27; Tue, 28 Nov 2023 22:19:40 +0000 Received: from SJ2PR11MB7573.namprd11.prod.outlook.com ([fe80::6710:537d:b74:f1e5]) by SJ2PR11MB7573.namprd11.prod.outlook.com ([fe80::6710:537d:b74:f1e5%5]) with mapi id 15.20.7025.022; Tue, 28 Nov 2023 22:19:40 +0000 Message-ID: Date: Tue, 28 Nov 2023 14:19:40 -0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 22/26] selftests/resctrl: Pass write_schemata() resource instead of test name Content-Language: en-US To: =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , , Shuah Khan , "Shaopeng Tan" , =?UTF-8?Q?Maciej_Wiecz=C3=B3r-Retman?= , Fenghua Yu CC: References: <20231120111340.7805-1-ilpo.jarvinen@linux.intel.com> <20231120111340.7805-23-ilpo.jarvinen@linux.intel.com> From: Reinette Chatre In-Reply-To: <20231120111340.7805-23-ilpo.jarvinen@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MW4PR04CA0192.namprd04.prod.outlook.com (2603:10b6:303:86::17) To SJ2PR11MB7573.namprd11.prod.outlook.com (2603:10b6:a03:4d2::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR11MB7573:EE_|SA3PR11MB8024:EE_ X-MS-Office365-Filtering-Correlation-Id: fae8cbda-190f-490c-8d54-08dbf0601d9a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EIRHmhBdhZ+NBk1jkVho0oHqn+JrueZo49yFYwXfe0BoXqh2xK5aAgEdI+18/5IhHRHgkCGsPRMFzwST90/5wZutBgPizbJ6VD1A5DPlh/j3kkX9iJfcWS0jiyqK8yQ4MjBLPO+kTgjyz+Ak0NIyz26Zxkdn8VS2aXyC7oFsIqoom83m+tJ9bXUAy5EzYUpYbLGCFZNIYdQqq6ED3pC2qb0TU35K3A52eM9nt6+DH/jitOJEgKGgkvbH5w7Y8aFr6rHXL+r3jkpHBum970J0ztlntCTZYPP21OYnGkCPHC7Ufehg2+C3Dj0juc02gnDs1bvatqwquE+bqKjkO1JIDw+duS28LCrQXlp6EZmYgIWqzQuhaq1XnXQ01by5WDZmT5hTssiEPECGF1GxZ5UXRsBYs5fLmhuK8w6w+6LBdihMVXq5er3e66H8mcWIhQDPTdpSq7HQr+fRogUHjCbT3h6dKHITIHS/6OHVtk7yIWAl71A4PYe5d+PNNYOC6hyXwgbaVjMhQSy9e3eZxHx96AAEVE3Pykpk4Xj/1gOVH735vNLSzEVYsvHdcdrbQsLF1X8gBK3xEaA0zgBu0OYH+Eow5hiEMU4/bhXH5GByjtWohI0h//kKlgHAKGT5zmM+SMaruwgZZ2I/Mo3bb0Y4CA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ2PR11MB7573.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(39860400002)(136003)(376002)(346002)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(38100700002)(41300700001)(36756003)(31686004)(83380400001)(5660300002)(82960400001)(66574015)(26005)(86362001)(2616005)(2906002)(44832011)(6512007)(6506007)(53546011)(8936002)(4326008)(31696002)(8676002)(6486002)(478600001)(316002)(66476007)(66556008)(66946007)(110136005)(6636002)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UEFhNHpVNGR6SWdwUHJJUXlyQVR2UjkwRExMLzV5dThHcjJzd3oza3ZRcUJO?= =?utf-8?B?a2dEUE1rdmJnUklDMnFaTi9mQ1pIb1pqd2NXSmdVRDFLWExWYzhibyszSGd3?= =?utf-8?B?YkU5UmtXVVFOTVV1VzJqeVdHYTlpYWR4Q0IybnY2bldhQ2NtUkxtdWJiTDJr?= =?utf-8?B?VlR5MlM1VFRlczNsR05GMkdOdXBnZy9ub0V5eHVWT2NGMnlxS0ZkZEl4bnBt?= =?utf-8?B?bVFra2EyOWN2V3JVbW04N0JZaXBCR2pleXdMbHlBMVlHczBtNmQrd1RTUTBR?= =?utf-8?B?dU9VcFJ3UUZPWTVCQ01EVG11Qm04eC8wMDdrZHBFemtFaktnU0RSK2FpVGdL?= =?utf-8?B?NVpxdjRhaWxJaUVjb1ZEN3dsT0ZxQWY2VTRiMW5aVHFicjlWdHBMaGhaTzNB?= =?utf-8?B?TUZGNUZIK2gwc0ZVTms2MzhPa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dbf0601d9a X-MS-Exchange-CrossTenant-AuthSource: SJ2PR11MB7573.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2023 22:19:40.8176 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: V0SMWUiLpLnVQOs1jDzypPA43Omb+fTVLRBVnFk8Is082HsXXafN1xOghlL+tn+VH3gCy5/ixFNZEhkKvgRbdevn1XpV1MxOUOZAeC0luG4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR11MB8024 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 28 Nov 2023 14:21:11 -0800 (PST) Hi Ilpo, On 11/20/2023 3:13 AM, Ilpo Järvinen wrote: > write_schemata() takes the test name as an argument and determines the > relevant resource based on the test name. Such mapping from name to > resource does not really belong to resctrlfs.c that should provide > only generic, test-independent functions. > > Pass the resource stored in the test information structure to > write_schemata() instead of the test name. The new API is also more > flexible as it enables to use write_schemata() for more than one > resource within a test. > > While touching the sprintf(), move the unnecessary %c that is always > '=' directly into the format string. > > Signed-off-by: Ilpo Järvinen > --- ... > break; > diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c > index b711326b2141..fda5ad812faa 100644 > --- a/tools/testing/selftests/resctrl/resctrlfs.c > +++ b/tools/testing/selftests/resctrl/resctrlfs.c > @@ -502,23 +502,17 @@ int write_bm_pid_to_resctrl(pid_t bm_pid, char *ctrlgrp, char *mongrp, > * @ctrlgrp: Name of the con_mon grp > * @schemata: Schemata that should be updated to > * @cpu_no: CPU number that the benchmark PID is binded to > - * @resctrl_val: Resctrl feature (Eg: mbm, mba.. etc) > + * @resource: Resctrl resource (Eg: MB, L3, L2, etc.) > * > * Update schemata of a con_mon grp *only* if requested resctrl feature is > * allocation type > * Note above there remains a usage of "feature" that has just been changed to "resource". Reviewed-by: Reinette Chatre Reinette