Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1498269rdb; Wed, 20 Sep 2023 10:43:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEUd79A4V/OZbcqPVpV0FzuIUv6VMEBOO9g9TDlTKeJAJoWqUHFXKHYEuWmoSMHYjMnOeMD X-Received: by 2002:a05:6358:931a:b0:142:e748:9260 with SMTP id x26-20020a056358931a00b00142e7489260mr2871091rwa.17.1695231788167; Wed, 20 Sep 2023 10:43:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1695231788; cv=pass; d=google.com; s=arc-20160816; b=GBIPMNa32PuoDlKNJIcEvilJXI8Yo9wF6hGm8hcYXt2ov+A3/sEHiu95J6CB/Qq/vM OB7trgEa6lxczNdrI+bkwi6Yjc8AF6lcALO7oZwEr9XGNPcrIOEPnPjTzKOuK34A883J ZVAlRTL/Oxh0aIMwwER9EedsxPgfecLqPBwA7E9DpX+RbxgeFg8KYy0v4f9t48kcAKEE cNx7E+IxYaiRcwxUbYcU28OQBbq7xeOwQssyTPCoPJl1ozULW5C8zVDiSkvK78Ylo3Im 25asZr6ttCngKZvrJMOQXdw1BFApdQSPyKe5O4hM4ZpW+6N9zYQbHMCKnHqn330p8KG8 /UHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=Clo/kdxDVut82AvAwirijhjntYxtlNjXhWjLfoT+S+I=; fh=hE7u/k/kdjevca/820BLmLxHZZoMuMuHO4u4rXL+L1s=; b=M2AVAjW5LhJA0OcfrLw/G6ba8ygCwnAQ4+T4U15OPBHYMVviqRkdm1uZ7KpLHRrOSq l8YUJKmFImLoUIwWWuxJCw2CRsV8lA1cZFPqKwusAlWaNXpP+aJb5+V0bR7QLiFY6GPd 8xV+NRZM2Sgv2aY949AyfAnJrtD00zQUA6MY36hIiibGDMbxTKzFCnYW81RQ6KTrhcpk ypFgn1j1PqcX7Ixc/mFRX9mO2VAhrrN0wes1+q9nqT/B1cMvyiAbLxcVbzWkrz2i+PTe aDovbh1abY5YTy7IFzqYgoP0EJzgPQAAm/bhpukoN7x/xSeuVCGfkzNWB+q88W9mY0hF 8DAQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SAwmzXWO; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id z14-20020a65610e000000b0056951c32d80si11746341pgu.556.2023.09.20.10.43.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 10:43:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SAwmzXWO; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 59647831302C; Wed, 20 Sep 2023 08:03:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234521AbjITPDS (ORCPT + 99 others); Wed, 20 Sep 2023 11:03:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236434AbjITPDO (ORCPT ); Wed, 20 Sep 2023 11:03:14 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD065A1; Wed, 20 Sep 2023 08:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695222188; x=1726758188; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Clo/kdxDVut82AvAwirijhjntYxtlNjXhWjLfoT+S+I=; b=SAwmzXWOHmZBvmCmd/glhyene5fsI0fCTY3hrwt3fCPP4L3UfsY1PTNq LuuOGTaE6MzAfnLI8Sd0KUWKC5GQo19oz7MVyL434CmkXThb9uSFrIuvC 0e3DQRKjoUMgERLNRNl3Ol4o/ez35xEvFrOY/Ue1eqG3tujGVbpVu7TYv i4+yRMmZ/FTtiPYVaPf7nDTtmjMUZfgb+2neKqWfFnnHhc1u0NQVEObeH y+mtX/mbDWQxg/Aay2qY8JuRLqtw+qX21GU8RR1m38qOZdE1PsnELwwcf Sp9Dn5j4MNFYRjfewoGd7klTJjALWQI5OMJLrV3Ui9+2KzRQ+MmpVdHHZ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="377546441" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="377546441" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 08:01:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="781729597" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="781729597" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Sep 2023 08:00:57 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 20 Sep 2023 08:00:57 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Wed, 20 Sep 2023 08:00:57 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Wed, 20 Sep 2023 08:00:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KmEtmZkw6+Z8OO0EJPFl/H//byxeCOEwTpgFVMSUwiAgz6lW92XCvNCUNTJC9Y/uCq0fdkiHi+krEBdMLrAORgG/KGb+sVkTXUesvvPP4hX9jXCxWb6T5o5O0aYPhjwC8rZxm+HKmNJuRO9xjLaVvzCd7D/GUJxXl2Cuj1HdFTFnPyATB7HidVN1Bch8SYTiidjhdIb70QZdz8sjs01BSejqCTRPv7UgLDIqIEJr22GtTa46ucFLdRFsx34HGug9NyNxK2Li2vf/sqhpEZw8OqRJA3jhg6VZx0BOMaLwfGSQ6iJZzQJKwgS9LUwVeQArmFD7/o66claRqJder6L2iw== 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=Clo/kdxDVut82AvAwirijhjntYxtlNjXhWjLfoT+S+I=; b=QIOuIqwFelpEDUu4OX2AXgv++QkxYgbgvBgUS9yFF0cYq74Sr+Vd1Ofm0R6WrshVjHihCqL1r2WE9+xYSlLKAbdcU8E4Y+sm6gY2Z1kF3kgaRLQABC+fAqTxQ8h3Kz+aSpvWJxTvwG+HhDxUzgmsuBqzzZoJk1PCyZYfDfhYexz5zMaOV4GztfvnCMTF2PRAzzqjeGWhYUaFSULQSTMG0V0/Jajyj/8kaN1yvvtYUzd30cjj5otIaQuUhUMve1ZlagmGLsGuQobMLAyQ5s3Sa46ZoD+Qp1Kk8eqb5NOp3nMNZo8rdMof3J91RQDfdEXoYjwMi84am6NvcUAt4X12Zw== 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 Received: from SJ1PR11MB6083.namprd11.prod.outlook.com (2603:10b6:a03:48a::9) by BN9PR11MB5420.namprd11.prod.outlook.com (2603:10b6:408:101::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.20; Wed, 20 Sep 2023 15:00:51 +0000 Received: from SJ1PR11MB6083.namprd11.prod.outlook.com ([fe80::bbd6:576b:132:74e4]) by SJ1PR11MB6083.namprd11.prod.outlook.com ([fe80::bbd6:576b:132:74e4%7]) with mapi id 15.20.6792.026; Wed, 20 Sep 2023 15:00:50 +0000 From: "Luck, Tony" To: "Wieczor-Retman, Maciej" CC: "Shaopeng Tan (Fujitsu)" , "Yu, Fenghua" , "Chatre, Reinette" , Peter Newman , Jonathan Corbet , Shuah Khan , "x86@kernel.org" , James Morse , Jamie Iles , "Babu Moger" , Randy Dunlap , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "patches@lists.linux.dev" Subject: RE: [PATCH v5 8/8] selftests/resctrl: Adjust effective L3 cache size when SNC enabled Thread-Topic: [PATCH v5 8/8] selftests/resctrl: Adjust effective L3 cache size when SNC enabled Thread-Index: AQHZ2tLQzZViQZuDwEGXIVxBB0yNB7AO4J8AgAC3GnCAEj3NgIAAfdyAgAEIEYCAAJM4YA== Date: Wed, 20 Sep 2023 15:00:50 +0000 Message-ID: References: <20230722190740.326190-1-tony.luck@intel.com> <20230829234426.64421-1-tony.luck@intel.com> <20230829234426.64421-9-tony.luck@intel.com> <7gbxb6kxwa6anvcc4dquyuu7yronww6ztelazn2xllplorhbp5@i7o4fum5tjuf> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ1PR11MB6083:EE_|BN9PR11MB5420:EE_ x-ms-office365-filtering-correlation-id: 5a6afd72-e8f3-4e6a-f622-08dbb9ea613e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: D8U0MmeEfu8Gmw8jHWYSY/YMQXa91+sFEW8dIBQccZed7BCztgFh7OyMLDwDuL01Vvisc5zy/V3mbKu29KWs+W4jU4Wu7i/nkqULb4COitv+ecSTDhGBL7nT+le6/SHgJ4p3OTT348l2WbNtCnsuA0mBW9PgOPDPgLleGRq2F8hdCuXgNfQx+wdxWrSN5jy0q0H+ECkmSUTxASAeqd25hKFMeGHurgBV78EKmZsbm6bzFTc40QbacI0Rwuo9qFzo6PPUB/sQ63HtSVTVGljih0JmNqQhxST0+zPvF3KvNv61Krfo6jbjPWVt/XFxCLkicHYHeZU3qadLl1wXWM4n8U9d8g+hz+qxjL6nqZCsx7M5jHnfs1t5/FUNxryaMnniq4xWh0dr2JvESPQLF6O1Y329U/ULekal86LyRWKvM2P6VyTpEjSUfSeTQss+czrNw6r07+kavK+CYZYMTorJoEsoiKr8heC6g71SHDBNTMs2m4ME/wk/y4h5pvsdY42PH9v2SCwJzrHLCUAyq3qLezE69OWjhc6ksYVBPFOCxUvkjndIeqt3v6VUCXAlUVFuuj0GqYB1mT7Qp0+6zPfAqy/GMskVvKfrnJLgoVnF4vQ= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ1PR11MB6083.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(39860400002)(396003)(136003)(366004)(346002)(186009)(1800799009)(451199024)(6506007)(71200400001)(7696005)(9686003)(478600001)(966005)(26005)(4744005)(7416002)(2906002)(4326008)(6862004)(8676002)(66556008)(66446008)(76116006)(66476007)(66946007)(54906003)(64756008)(6636002)(5660300002)(52536014)(8936002)(41300700001)(316002)(86362001)(33656002)(122000001)(55016003)(82960400001)(38070700005)(38100700002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wPkCm8p0kgj+x9oD67Df0d4gMBPpkHMTjX05IWwUe1P5Jd8ZO1MF1Pk2FE7X?= =?us-ascii?Q?S586qRXcz6udbDFclvy+BN7bo7oubZCEik7mgu9GTXPNjcsDWfTwkn3mwzfg?= =?us-ascii?Q?/CtYP9DDdSUAK4KFDGcbZJDUZURVNexC0ahVzRD6F31NMbvn3fe27NIjKuZz?= =?us-ascii?Q?b/BUwS6ue9lBMe9YFR5KJDqFRvEQSziHSRcdM4ApDudGQ69ophYvVHJpWsuB?= =?us-ascii?Q?9GpD8zTGC490YaH1kkuTupuxdqZ1wJw8vVeQs4sfHX3GQW0eSZ/ceOk+Hpoq?= =?us-ascii?Q?Gl0TyNSY7rFyAlxOiJs+5oISzVO9Hlv++eDDRc7gsU/Zh3J/p3kRdc4qFfE2?= =?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12CP1dPl/j32nCURs+?= =?us-ascii?Q?5f+KOP0gsBQERsE47N97QfVsyUCbDsIosE34UwntI7xlzdNhbYyvaFm+Of32?= =?us-ascii?Q?Jgq04iLfVOhWUhaj778v0kC85Ps+fIlPQIp+9o95gHgYJNf7m5SUEm/PJJqS?= =?us-ascii?Q?uGq/rtEnbZqNz8s6PBEhZ8PEBLdBYZ3W4hDwJWR+6oI0An+ptNOkmJ97fh1x?= =?us-ascii?Q?FlbG4qGIOCW3fNquoQt8/KMg8ucFzlRXqke72dW+kAxNKzPDndUvb3oh6To8?= =?us-ascii?Q?CQC+IsnFYo7QMoBFlfd0cmDA3Sgs2kStm6X6+CRtMPufiV9vBxBSjKR6aB9O?= =?us-ascii?Q?KZwF9S/L6+nhRlHgxlnDMbWx6WdusVAXxoqQ2r6x?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ1PR11MB6083.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a6afd72-e8f3-4e6a-f622-08dbb9ea613e X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Sep 2023 15:00:50.7965 (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: 6E6Nv1CI5DJHG4vlFGWrEaTJ7FbS8Jumd/iZiueSKP93PBU4YYo+A8PQjViagfmyLnBuNKNbOoylz/XUzZWZjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5420 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 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 (howler.vger.email [0.0.0.0]); Wed, 20 Sep 2023 08:03:20 -0700 (PDT) > What about outputing this value to userspace from resctrl? The ratio is > already saved inside snc_nodes_per_l3_cache variable. And that would > help avoid these difficult cases when some cpus are offline which could > cause snc_ways() to return a wrong value. Or are there some pitfalls > to that approach? My original patch series added an "snc_ways" file to the info/ directory to make this visible. But I was talked out of it because of a lack of clear user mode use case that needs it. https://lore.kernel.org/all/f0841866-315b-4727-0a6c-ec60d22ca29c@arm.com/ I don't know if the resctrl self tests constitute a valid use case. Perhaps= not as they can figure this out. But ... maybe the difficulties that user mode has (because of possibly offl= ine CPUs) are an indicator that the kernel should expose this. If only to make the kernel's view clear in case there are situations where it got the calculation wrong. E.g. kernel booted with a maxcpus=3DN parameter. -Tony