Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4177301rdh; Tue, 28 Nov 2023 14:11:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGNUpKwxcyyVxMw1SYLBFj5ZS3cIPNLEtQuslGc928svwZMT5g9e2YKAph8Ng99ripac07R X-Received: by 2002:a05:6a21:150a:b0:18a:f462:5d3c with SMTP id nq10-20020a056a21150a00b0018af4625d3cmr21025413pzb.12.1701209518899; Tue, 28 Nov 2023 14:11:58 -0800 (PST) Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id w2-20020a17090aad4200b0028573fb25c5si12390586pjv.132.2023.11.28.14.11.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 14:11:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OtmVOS1c; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 40F5381C57C0; Tue, 28 Nov 2023 14:11:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346502AbjK1WLc (ORCPT + 99 others); Tue, 28 Nov 2023 17:11:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346460AbjK1WLa (ORCPT ); Tue, 28 Nov 2023 17:11:30 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86D0ED5B; Tue, 28 Nov 2023 14:11:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701209496; x=1732745496; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=0NpxLx8FzS10yWkrZRqsHAV1YAWnp6GQoxxIFSfECtU=; b=OtmVOS1cxXu7XY/7gynFJNlCSiy5Vpf1ReV7m5oOvfrFsB15Gsml0Q9/ SykOamh5coULU4PXSML3NGHhJg9zWdq1lnnefqst5u0vyf0rDgkstMrbE WaOolW4fnQH24eqB7u5W6GOMxlZNhOohfpg9V/7ZLAkH53L3yr5egDtai IKpxXzK8OLU1fzureIlz+1PuZWejBSbBTxo40kZ5zyxrp83cZsPkl8RUB o2dOucJZk42f7l3PgrZYx4h531aZyj/QPWLiRPxjwe0baxCB7MG3Yd0xP uR+cz1JXQqKTDqchgHPGsD6IiZW7M9BNKMcxU92/I63YKmxnDXvYErg8t w==; X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="457374752" X-IronPort-AV: E=Sophos;i="6.04,234,1695711600"; d="scan'208";a="457374752" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Nov 2023 14:11:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10908"; a="718537616" X-IronPort-AV: E=Sophos;i="6.04,234,1695711600"; d="scan'208";a="718537616" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 28 Nov 2023 14:11:35 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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:11:35 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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:11:35 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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:11:35 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100) by edgegateway.intel.com (192.55.55.70) 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:11:34 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h2OqvM1VX40PeItdlObwdDYAcvi/pG1ngNi1IEm+gSb7a+Uo99nrCNEcBR5Sq0GrMPaiL3obWYO8gycIyfoPbnTElFWsA4nhwVUt2RBz7g3WiPjmrKfF89OQfg5JHC9UaNX/JEKfzgKXO0JVKSoblT9ZpZKJlY8092Mf+MFYyFEhiulGCYGyD6h5gS17lwQOQCOx7w4SCVXQ3u7EgmR2EAKPhq1LBUjc5Fkjpna108vrfvKhRe66gD4MgnMCKbgvBCCInSYH0oBn1TAw5gyhedr4Ewxl5GW+dNhf4OwumJSPnK4OOTlwzg+FO+cW88j7uLSdahsIYYI803s7+3Rz0A== 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=m5gY0pQHyF8dBG7CNlULvLpu7h3RVYe+mAx2yVI4S8Q=; b=gPvzkltaETpoyAK6tkSpTJ0wZS8iGbTg/eRhzvxjRq0GDdOhKeA36JY9KYCSVnvI7ZaBaEACA1PLOxD4sXnF7KpRFU/EiMR9TwR3yzfMnMqjiG2DdozvV5UYvk+bdRdavL/fs+P0Hphx0Kzqvb69dSesUWiBIlIE1h+7msnv8fHnrpn1HQEUhFMDfKfQkSnP9eGFoH59OJqfA+5E1PE0y4glsjfsMqfhj/Ps/gW+ZDZlfQPdcTqmj5ScRly2cxk7Ct3JaTbkJVhPHxElhaZ+rJ/B8Qccwa3PgUHOUupKA4PvTZY2Et5FGVBzuvdGclu7F/kPPJgRGBoq8c5VIoJv4w== 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 DS0PR11MB6328.namprd11.prod.outlook.com (2603:10b6:8:cc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.29; Tue, 28 Nov 2023 22:11:30 +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:11:30 +0000 Message-ID: Date: Tue, 28 Nov 2023 14:11:29 -0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 06/26] selftests/resctrl: Create cache_portion_size() helper 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-7-ilpo.jarvinen@linux.intel.com> From: Reinette Chatre In-Reply-To: <20231120111340.7805-7-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_|DS0PR11MB6328:EE_ X-MS-Office365-Filtering-Correlation-Id: c76782e8-29a4-4993-bd0e-08dbf05ef924 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PanVf+yeCaDNAu+hYLK2DsPCcqrfwcNaZJWY9lSm4zlaffTxFHgBdqcQ27XPFVw5Hn/R9BAw/lTw28CR1QELIMZIblKWeZeO79Y1W6v+OugaSCypB6xDJCcx6MfUM2VAJwQy1kWYirCHBU+Vk+ExGsEFHFw/UWbeGT/t/Vn6blWJV7dmaJvWJe/8GtgeelvbF8rQxA+JKCfh0V+voUcXNdI0Qgq1h/e1gmtYmuXUS3amXPAQvZ2ENiOBXTyFJGoIFYMcbUDav+Lc6RF3/LiXeMatIohDuqsriTZy9QAaV5H+tIWmgRPUJucdCPRVzKt2BtyWQn6tXNxaiNgeL3q1E6eyAhZxXR3qWR5DxWrj5Ms4f5xA1FqXECZhtzxxmG9kWniot2zkFAIlIPqvJlD5mAedvt9FlvZHZH62vWrMHYS3c1lvrXCBgIKGo58OjWSszswE+HmhpDWMAR9DJL3L6jGtgy+rpQ6SHAnoPp6kR1Y/GeJ9T56cO22zBUtTA8w4vFSLcR2ZguVChi27vsCt3k6gAKTAYNL3jzxflA/C0lcL0793XJSp21BIpkukwW115WeSCszWq2n+0oTyQYn4CNMN+0AzpV8c39SPJIX7mqruGb9QwqByBRzlYRMjRJXaN3JcnhYsO53LODkvPOGOvg== 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)(39860400002)(346002)(396003)(376002)(366004)(136003)(230922051799003)(186009)(1800799012)(64100799003)(451199024)(5660300002)(4744005)(44832011)(41300700001)(8936002)(4326008)(8676002)(31686004)(2906002)(110136005)(6636002)(316002)(66556008)(66946007)(66476007)(2616005)(6486002)(478600001)(36756003)(53546011)(6512007)(26005)(6506007)(86362001)(38100700002)(82960400001)(31696002)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?anNJRjZZanlqSDVSV0FDeXJOMGpxKzlIT0h0ZjBnU09WM2JXQmwzNFlza01q?= =?utf-8?B?bUZZM094Z2Ziam5IN1JvdmpnTGl4WnJKd1FIUU5CZ2tqdm45NFR1WENxNGR4?= =?utf-8?B?eGc2b1p6ZHFpUzFKS0M4NG9DUW9BVWZxUWhqdUtvSDRzZzNRbTlaYldYVE9I?= =?utf-8?B?eXdwdVVsbjg5NnhsN0tRQm56V0lza3BBRHhZclQ0VENiY0YyaFNzb3lLUGsr?= =?utf-8?B?WWlpQkRCWlVjMTlReFhuMk1YTnpZRlA2b2lFV0Z3azZGTmRmSDFndVB3UmZG?= =?utf-8?B?cG1CQmkwTVFrdGJvUFQ0VlM5NlY0cWFnUFBLMkl4c3R5OGZSK1dHSUF3c2Y1?= =?utf-8?B?bW1Zd29WOThXdEk5R0RsWEllK3VscmI0RkgrYWl2MXZJMW9RUGxPVG40YkJM?= =?utf-8?B?UzViM2tSRzlrWGtOcTRT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4-4993-bd0e-08dbf05ef924 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:11:30.1885 (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: S5T9przbQpdvMI9xDymwAYRcTxQRZ7agIhQVroOAdArh/DqbAd3gcSBOYDvL5W0ev+KaINHReEapVNPWKnYEBNZbnofnH7NkMjF7CQsH2+o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB6328 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Tue, 28 Nov 2023 14:11:56 -0800 (PST) Hi Ilpo, On 11/20/2023 3:13 AM, Ilpo Järvinen wrote: > CAT and CMT tests calculate size of the cache portion for the n-bits > cache allocation on their own. > > Add cache_portion_size() helper that calculates size of the cache > portion for the given number of bits and use it to replace the existing > span calculations. This also prepares for the new CAT test that will > need to determine the size of the cache portion also during results > processing. > > Rename also 'cache_size' local variables to 'cache_total_size' to > prevent misinterpretations. > > Signed-off-by: Ilpo Järvinen > --- Reviewed-by: Reinette Chatre Reinette