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 698BA46053; Fri, 17 Jan 2025 15:26:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91D044275B; Fri, 17 Jan 2025 15:26:11 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by mails.dpdk.org (Postfix) with ESMTP id D9B3440294; Fri, 17 Jan 2025 15:26:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1737123970; x=1768659970; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=CLoiqcZceM3nVnW2gRBYOq/dOxfUMpGRcnXhpEzwEew=; b=iaY4Ti82FPFg+05vzuCRyixEXDgQIdNAsPbEd2QCE92Ecqf0cid/Te7I U9CwDnqFxyV5hHj0+sPWH1pBRItkBDAqJPig3dsDH0Gwi8VQ64u+8DZal f0s+MsFBLXFbu8IYSa2NinSpWCot3mtVjHfT6xV+7STy8ARmNR+IZwdJk +TaGFEKRTQvcHRjKMfG1mdpa1jgKXVEeBBdZ6veUUB2ZXTdum7lzKw7gj WCdpkP5wFnWNfz78O5/IYAKiaISosThkhliE1NR4OBcPi2xrKuT+hnVB7 id0XHDzOmQr3O33WAHznZ7kiFlurhkka2iak/61IxfaYrxlWtaZGE/pCr g==; X-CSE-ConnectionGUID: 4iqijL0NRW+4qMpqaShrUQ== X-CSE-MsgGUID: dUZXMJvvTHq27OiUeQLa7w== X-IronPort-AV: E=McAfee;i="6700,10204,11318"; a="37438924" X-IronPort-AV: E=Sophos;i="6.13,212,1732608000"; d="scan'208";a="37438924" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2025 06:26:09 -0800 X-CSE-ConnectionGUID: PbggbSeGTsWeA8entq1eJA== X-CSE-MsgGUID: n0AbmcCzSlmLE1GKQhz9Lw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="110930267" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 Jan 2025 06:26:09 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Fri, 17 Jan 2025 06:26:08 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44 via Frontend Transport; Fri, 17 Jan 2025 06:26:08 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) 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.44; Fri, 17 Jan 2025 06:26:08 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=d4A8FzJ4w/+zzqiwHiIbkf4OgkP2LLXC/XQnlLBmksioZ5PL8K4oQOSxZ/YN1rqB1JMofDoq2vw1eTyIEQcw2shnabg+IwkiPh9my2SskO8ikB2abWCCkEFN+SlHQitTGOYyeQ2y+nFEWWg4x5cmmDSgdc54AbEUBPShKC0zU3Ut6IsP3GO/0YoDSXZBfom0CJULllhryXPYlcRuqFHO1/j3jeJV8691zyntkDKjDeZou3xVQPZOpGY6L3qlsth9lHT1CnNsKDr9WJJH4QW5WL1kXhbJ71J7NX75tQk706OZnWg1gdy9I3v5J3cjzcwc9tDlq3Rto2uPq+JKCevc2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=IzMCRZPB7bXCeyaIYHP2i16hqpDYy6hvkm59BIqMsAw=; b=vcyuVp+mLXPbT7UwF6cBBx/XxUlB6YWY0LpqLhfal5aJhUtKU1h4yfPvjDoooa2vAubV3FGMRhjT1ec5oW1uW0kvEZzgbQ+9Sc5rZ+7XyQoczniMRugoxFT0KSlaEGDCAh3Eqp5drw2Sq8FQ+h7/ctZo/jlFUz7oaOayhAV8M77g5JBzjHvx60DXb1+1nF5EfeKUFt4qLRcU8nt+5Ntm0Q6FC9kU/yR0K7BsuhQOQe+FWeY4Mg2MLFtvwrT3AQ4ve9k5+31k85DjrPUF97xCYUIdRZbAZ3B2sQ9Zli4xFvNkoKJ7/aM+i4yoPuId8W1+Myta5HpZs55r5iZ0zQomfA== 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 DM4PR11MB7181.namprd11.prod.outlook.com (2603:10b6:8:113::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.13; Fri, 17 Jan 2025 14:26:07 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%5]) with mapi id 15.20.8356.014; Fri, 17 Jan 2025 14:26:06 +0000 Date: Fri, 17 Jan 2025 14:26:01 +0000 From: Bruce Richardson To: Dmitry Kozlyuk CC: , Subject: Re: [PATCH v2] test: improve resiliency of malloc autotest Message-ID: References: <20250117125912.985475-1-bruce.richardson@intel.com> <20250117135239.1980838-1-bruce.richardson@intel.com> <20250117172041.6bfacba7@sovereign> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20250117172041.6bfacba7@sovereign> X-ClientProxiedBy: VI1P189CA0015.EURP189.PROD.OUTLOOK.COM (2603:10a6:802:2a::28) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DM4PR11MB7181:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b86b74d-7968-4d97-cd0b-08dd3702e147 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?vm6Xx4kXLRndrBqjhunPbVqicd+OULZbwYbwD34EnyWFeJ8KEsOOvn0DdJRO?= =?us-ascii?Q?1cytK0XGH4Qzxr5nr7g1s2ZGlgnb93GKkdqvRb0/tJQu6x4VEdskMb52613D?= =?us-ascii?Q?W2dy/9OIVIqZ8ppfBmdNaeNEwbNa9uiqsWsXTf47CCESogbOer6hVbUmDP/P?= =?us-ascii?Q?1oAE45gfuFY7dsXFZUMzEGKMTsPS1Af0O8bcwMT4b01LheIeBv5nvtdqoE97?= =?us-ascii?Q?9EwYgGu0QUtG46fmWXNMvvQ+TALsiicS1FYILOwb9avubtH3ggGOsQ5JR9jh?= =?us-ascii?Q?ZAuSIacvKduCYd+vjKio1y5i9+1qGwqfQUGSbcwwWzc3/ryIclnc2ZlL7/iv?= =?us-ascii?Q?eVcoGOZr0uCR+eMUBmZrqCldDBssPSLuCQ9vrQXwT4C7h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wHjnFfCuvh3gNAGsbcRT49ajjm3xvJI764wVhUIDcXp/AH3mG?= =?us-ascii?Q?puH67lxR+dMLGXsa/NbGIhSH2MU8zu9KzetboAGPR+3RFAbc6ThwrHyVbGPd?= =?us-ascii?Q?ruM34gK0t1Q9sCv/DF4gdNNYYUXi?= 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:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?0BAydX17OTrSCYyTkf8tneLaBeap8uAR1W3qRxmiCc934Puz9KBRWtDJRed/?= =?us-ascii?Q?RuxUVEMs5hBI9JbkX666NO6+6plAjvmPNUF9lwdVvcpu6vOW1nZa3KshL/EG?= =?us-ascii?Q?aGyNbRmH3WpFolm4sfFgwF6J4rfB+W98mOu8sVrefVDVo+2C88o6Wbkk0VZ+?= =?us-ascii?Q?qRTsXYc7quaZQHQ9EKo+X+FvY2b+yj4DAYe1MyC4MFoJ7S34XnMAU3N19QM9?= =?us-ascii?Q?gEGwMJH7JNGE919MHemq/DSGuKXG+MhNXDGEFvlgK9dfLwUu9w61u2tfb6Op?= =?us-ascii?Q?KaVyMPfypz8iGU6FFRvY0QpKjthhb2dnRIYA6QFBeUOdCd1sS27F7sW7rMug?= =?us-ascii?Q?9cb+TIDIXKyer+/dnXBRZDl560wQqSgPI4vO6ijA+8RqQDerb67cQ9vY1wjt?= =?us-ascii?Q?/MD9vIbPnzCYquvUd8iqaf982abIT8Ezo/MzxmYnUe6xh0UrHYGYcAz7pBmA?= =?us-ascii?Q?FjL0DniJgx1gALv8Jp4jmygBQhFijaeeG5v4+4m2xEBZ0JlfX/czTv7jYDVN?= =?us-ascii?Q?rPFgzPeIhiVPuBYOKrZgIFkHS54+Gf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-ascii?Q?u8YAWBsV1x9Au8O2Fmi0jYi3cAFoSxKX88Bc1tXirdhMSvNdzNdvGqhO8OdN?= =?us-ascii?Q?lPdm+mmxs2GqnMfJG8SoeTcodjoi1XxTgk5C/FWyJ2g/v7SgYPjRnGvrtqpO?= =?us-ascii?Q?7NOcbRuSZKmrpXnjZ5n0ji4OE97YnlFCd0uKHT+CXdAq/VrhPgPMCfP+cG23?= =?us-ascii?Q?AA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 6b86b74d-7968-4d97-cd0b-08dd3702e147 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2025 14:26:06.7851 (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: vhcJHgSn8NNuczSp0R97otlSuNcfNPjeVR0lJFUqx8R80Fzko1NscVCKhGfy+FiHO6TypuGsg0ybfIrCocd4k8Qz1yrPJcXt2TaqLuByDiQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB7181 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 Fri, Jan 17, 2025 at 05:20:41PM +0300, Dmitry Kozlyuk wrote: > 2025-01-17 13:52 (UTC+0000), Bruce Richardson: > > The test case "test_multi_alloc_statistics" was brittle in that it did > > some allocations and frees and then checked statistics without > > considering the initial state of the malloc heaps. This meant that, > > depending on what allocations/frees were done beforehand, the test can > > sometimes fail. > > > > We can improve resiliency by running the test using a new malloc heap, > > which means it is unaffected by any previous allocations. > > > > Bugzilla ID: 1579 > > Fixes: a40a1f8231b4 ("app: various tests update") > > Cc: stable@dpdk.org > > > > Signed-off-by: Bruce Richardson > > --- > > v2: > > * removed unnecessary extra include > > * only added new code for non-windows, since using mmap for allocation. > > Why is it necessary to use `mmap()` and not portable `malloc()`? > Even the comment in the patch says "malloc" :) I did originally use malloc, but malloc didn't give us aligned memory so the call to add the memory to the heap was subsequently failing. However, I see that the unit tests in the CI are failing on some architectures, probably because of alignment again, because of using a single 2MB block of memory. I was going to do a v3 where I queried the pagesize and used N*pgsize as the parameter to "add" rather than saying it's a 1x2MB block. Instead, though, I'll rework the code to use malloc and then manually align instead. /Bruce