From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 903F241B81; Mon, 30 Jan 2023 10:47:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7953840EDE; Mon, 30 Jan 2023 10:47:17 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 6580640C35 for ; Mon, 30 Jan 2023 10:47:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675072035; x=1706608035; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=FWNIEbSIg04lFfrn5hfmW15mJoDC9/YM9pWCL0yt8TU=; b=bmO4r+hE2sHWcbhJTNBAFcHzUPrJbad9AA61w+78mM4nAiLMNO0KcpQS rXFEG5svJfdyPTkLLfLWI+Lt3FjJqXfy0uJn+LUqtysVkyER0g4PZP1V1 JAwRyNIZO6hTJG4KkB1Jjs1YFU5qcwAJwiBfzGhwoAH4R2r6GQlywUkgl vXqkJI8tqMvIlAhutpX7MCZ0gsWqa7gjs+u6eMnP4i0IUiUSWCdiFIcJe Y9u9Q/igftyCgo6fcUcVvHD00a0GBA7NPIWqRbJ3lyIwuDY5AsDqB5L5m 1waiTy3PZdTik7ylVMlxk0JzRLV1KwHqkwkU91aRiamnwwiL6YTHmsRwq w==; X-IronPort-AV: E=McAfee;i="6500,9779,10605"; a="327535112" X-IronPort-AV: E=Sophos;i="5.97,257,1669104000"; d="scan'208";a="327535112" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2023 01:47:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10605"; a="664029465" X-IronPort-AV: E=Sophos;i="5.97,257,1669104000"; d="scan'208";a="664029465" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga002.jf.intel.com with ESMTP; 30 Jan 2023 01:47:13 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 30 Jan 2023 01:47:13 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Mon, 30 Jan 2023 01:47:13 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.49) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Mon, 30 Jan 2023 01:47:13 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JfDavEOX3uzvhSqQ8yNH0tXzmaf0RMeUyBEomdAwqckktqUZrUd9XJ/vvuJOqsTpJLE2YwJmFaxQqMRvBmTDcDR0ZT+HdHadUrqG+GYuXs830ryGrlbNDcTIZRLcHx4DMoaa+GdYU73z0qqgop43pE45FVp885M9zsX513T0zmWZyz4QdQBgwMgcxrs7E9e/104A7JBbx5ZeQA9kYDejBSwB0yAF0LQBHES6xngd6oNFGzbtj0gD9+9D2dGAW/tN7Kx4ZkNoo5I0sDqxx5FjRZyBl6j9/RmzApRbmkaJprKM7ojXVD9x9a3kRbJ0c1tak/0J/m6znRYa3s0znwcLHQ== 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=8tgUWXwxKg4hnqxr0e9lsxTPYG+H4ggSwrvv+WIo0zo=; b=hG9tI0AbCsdQyKPZ3vL0f0scaM7AASK66n1nW4/Qa+ss3yyeBVhGjr5rmxnH6MLaXge3cXrYdZa1Py7idcwDL2UcSWA4IMdXi65F5S4ao6vcQWxLBERoqoLhHAl8fQpitP3wsf4cU7RbfuiP978yd0WHjxTjp3qPqO/SfxYTh5nB2KTJjR7KYbxEOv49Q0LykEZvgQgdUSlB4lDqAsT30dpKCx7LN8utnxNoqMIsP0WpziuwA15lkykJlZJRznjBGr6XzL7Ie9B5bwAl70SriYUYHOkBJMHjIRp+2htEIJrcpVoX3iHUJZsqSnKQApmfRELH/pscT+w7CbHRblmx8w== 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 DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by SA1PR11MB6568.namprd11.prod.outlook.com (2603:10b6:806:253::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.33; Mon, 30 Jan 2023 09:47:11 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4d9f:6867:2d53:9ee]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::4d9f:6867:2d53:9ee%7]) with mapi id 15.20.6043.036; Mon, 30 Jan 2023 09:47:11 +0000 Date: Mon, 30 Jan 2023 09:47:05 +0000 From: Bruce Richardson To: Ophir Munk CC: , Ophir Munk , Matan Azrad , Thomas Monjalon , Lior Margalit Subject: Re: [RFC] config: customize max memzones configuration Message-ID: References: <20230130092302.376145-1-ophirmu@nvidia.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230130092302.376145-1-ophirmu@nvidia.com> X-ClientProxiedBy: LO4P123CA0513.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:272::23) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SA1PR11MB6568:EE_ X-MS-Office365-Filtering-Correlation-Id: eec6a47e-ad12-4b02-d681-08db02a6f5c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V9LJEFZjSyqBLn0tCEnFukXRy7VSm9b6x9uo5PfZz7Sro/AnHeKmbb0V3yXjIzUK52cbdsLz0Q/s605Z3EUeKz7k7PcDWbzm57bkyVWTQ4q5NbxlRPskBcJDqROcCcmRXyTsIzBuQK01rhJS8eZtZPKLyM2Z07EQAxvaLmBc0Yd3pZQYjWsdSja0VxPiAL5UYJW+BhY8tLORO76hk9YrRIJluUROE88cgmODiF2/KmrT0Kw3OiZN3loQae7GuIrjxLerU+OYM8e7Di2QFXMrCRwUh5HXjAibM2UQH623GDqp7IzVWA8JIz4jIBRzs21kxfzV2JCrCZy+ZAuNIgj/Kn03eSeHJSazASc/Jdcu31A2MFM4eCtVr2RL9fZzKfDpRhxz9c/jdOM6pHGreswo9YvhZgbtxJ08a+hAdF2IBpMMefNVpwkAhbPlrbCgvGx6JHxaWxmlu9bhMkbRSMq7Fbszeb05A2HnXfy4E+W7r1ASEyRmCttNWBnYejjCdykONztMMUQWsHtjR8pQVQdzqx539jXbSSLkJC8aQsO23f0jsUSV0ELWaEFxFgwlCYBp9sIogq5Eg5nFYTfaNIUr0THD4Hf0kk+io6JoPks5J1uVrhxnxpDbsfoRSE+46hQ8yJDlfO6Pnmz8qWupxHWs6EFsRnBvgyucm7cc/+VWyMXlbEZOYZFLlyQy1CsMN71l X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(39860400002)(366004)(136003)(376002)(346002)(396003)(451199018)(5660300002)(8936002)(41300700001)(2906002)(44832011)(66946007)(66556008)(8676002)(4326008)(316002)(6916009)(66476007)(54906003)(6486002)(478600001)(6666004)(6506007)(6512007)(186003)(26005)(82960400001)(86362001)(38100700002)(67856001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aXBZMWd3bWMvUjdUb2l5VERKRHlGSUtJU2hyVTU0a0t5a1M4N1p4OFZ2eDBx?= =?utf-8?B?NWVDMXdJdGIvSXVDTjJ1ODR2azBrTU1QZndDZmJOU0ZBMkZ2T3RFbVRLT3Bx?= =?utf-8?B?Q3Rib2pDYTlIMHB4bG91TnErcnZHdkFwKzBHak5tdkpkRk1md2JYWEQxWm9S?= =?utf-8?B?K1hlNGxjQllReDdZaTR4dXZIcXJMb3pxSCtISlMyZm93MU04OUM1Q0grRkpS?= =?utf-8?B?a2RQZ2RKc3hIY3U4QVAwVEZvT2VGN0Y2RjB1L09pMlYrTmMyU2NBK0I4RkJI?= =?utf-8?B?ZEFiYXJGeHJmR3pWd0NvOFpTSktiTXFlTnZHOEpkdFVHWGhGMlZ5dlB3WU4y?= =?utf-8?B?OVplYWZLVjh3MllRYkprVFhId3RGM3R4RThuQzhmWHluS0hSNTJjS21rRG1L?= =?utf-8?B?MXIxTW9vckN6cVZmT0U1S2V1aDBRbjZqTHFEWUdrczRDYnZrZTRGT2JtYjJO?= =?utf-8?B?eVA2KzFHN1FJeHAzcTRVVmowV2U3VDEzMlpOUWdMUVVjR3ZTR0wvcXdKSFl1?= =?utf-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WVdI?= =?utf-8?B?NlppekxiczQ0b3R3NXAwOWNGbkl5MEdXQVFyeFhBK2p2WC92RUwzWGE5M1I5?= =?utf-8?B?UnBkb0dnaXdzSE5qMXo4TjdiVlpnL0poemtPVTh4YmFoNVR3Zmw5dU41b3JY?= =?utf-8?B?bjZMZGNIemtOeE9OaVBNd29GU1RzYjhrd0sxM2F2VjU0QjRpNmw1YnhpZnpG?= =?utf-8?B?ekRIK1lqVHZrdXRRL25paUZhVDFXc1lEMzNhOFA3a1IveVlLTDk5cUpmZGxZ?= =?utf-8?B?enR4OXVZaDZPb3BoeG5pTTlYNzcyZVBJWTlRMTR2c1FMLzVCOXpjaG9lVVRa?= =?utf-8?B?ZGoxM1Q0MHRLbk0wNGkwUWlNSzlBYUcwcCttNXd4elNBYVA0L3JRdkpDNEMy?= =?utf-8?B?NUJidHpKSXdENzFtditFKzNub1RUdTN0c2NqdUluMTZLNUkwNkpqcmppbENJ?= =?utf-8?B?RHVFRVFNVXE0TFlJTFJMMnpLcGdncWpkU0JCM3M4RUNQY3pLdE1WQjQ4L3I2?= =?utf-8?B?MkEzUUErSlh0U3ErTCtzaW1acDhJWHlSU001OEZnK1cxWlFGTDl0VFNDbFNl?= =?utf-8?B?cXgvcStUeDNYTjJONENNeGhFUFlmNWRDZmZ2THI2NXpQM2hscWZJZkRGQmdP?= =?utf-8?B?M3JYYzJub3ZjME9HOW50a0x6YjVTdlFTbGN5Q2NnUGkzdDdpSTVhNEk4K0ZL?= =?utf-8?B?RlNhenR4cGxPenFkWXdIMUxmZSs5cUE0VzVBeWh6V1czLzFDZnNna3ZuL3Ft?= =?utf-8?B?S1E9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: eec6a47e-ad12-4b02-d681-08db02a6f5c8 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2023 09:47:11.6495 (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: sru+ft/FAtKRsRkyJQT1zDlCUXP8ux/JAGglRtia4WmFviv9Aroj5bZtVFL1JXghZ+iN8xYU7Ih3McfH79ayQBZ4ipzh/XSXzc14uMMa/GA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6568 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Jan 30, 2023 at 11:23:02AM +0200, Ophir Munk wrote: > In current DPDK the RTE_MAX_MEMZONE definition is unconditionally hard > coded as 2560. For applications requiring different values of this > parameter – it is more convenient to set its value as part of the meson > command line or to set the max value via an rte API - rather than > changing the dpdk source code per application. > > An example would be of an application that uses the DPDK mempool library > which is based on DPDK memzone library. The application may need to > create a number of steering tables, each of which will require its own > mempool allocation. This RFC is not about how to optimize the > application usage of mempool nor about how to improve the mempool > implementation based on memzone. It is about how to make the max > memzone definition - build-time or run-time customized. > > I would like to suggest three options. > > Option 1 > ======== > Add a Meson option in meson options.txt and remove the > RTE_MAX_MEMZONE definition from config/rte_config.h > > For example, > > config/meson.build > > # set other values pulled from the build options > dpdk_conf.set('RTE_MAX_LCORE', get_option('max_lcores')) > +dpdk_conf.set('RTE_MAX_MEMZONE', get_option('max_memzones')) > dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes')) > > meson_options.txt > > option('max_lcores', type: 'integer', value: 128, > description: 'maximum number of cores/threads supported by EAL') > +option('max_memzones', type: 'integer', value: 2560, > + description: 'maximum number of memory zones supported by EAL') > option('max_numa_nodes', type: 'integer', value: 32, > description: 'maximum number of NUMA nodes supported by EAL') > > config/rte_config.h > > #define RTE_MAX_MEM_MB_PER_TYPE 65536 > -#define RTE_MAX_MEMZONE 2560 > #define RTE_MAX_TAILQ 32 > Of the 3 options, I think this first option would probably be my preferred one. /Bruce