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 7179245F2D; Tue, 24 Dec 2024 12:06:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F34544029D; Tue, 24 Dec 2024 12:06:18 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by mails.dpdk.org (Postfix) with ESMTP id 64C8940263 for ; Tue, 24 Dec 2024 12:06:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735038378; x=1766574378; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=1DaxB7NjkGh/v9h0CaVlydXy7e44iJtuGOMnduVGAck=; b=gkVGvfqzi3bfeHgWT60nqa6nTnLqZ4bX3z3toDEHTmngjiSONdKjzJ6r 6/W1ICfj7ggY5Nx6lIi4h+ibDC5ZNUsVeFQ5cXemqmfrg5Jf9Gw7R3u6S O2G8KhV7byWBMgnctbqiRWMT1lHjOptjgHCLXWTb7jJfpCprfYxR4QCv8 cZOXmOnQxLgZvd/8XPZQMc+i1MG2YznpmytqeXTutgTT0bS22T1ZQQq6Z 2FmudjGxLtimEL6QJy0IAwLnCt7XdfEXMD9QEeA2t7S+TW5vTRo5hQ4XC MsEVBQ0ezyIp2Kn+8n1+Y6rsjapwE4PFg8ShAghZrIPI3WikAzQt4EkyZ A==; X-CSE-ConnectionGUID: NKnHfHGxRgu2ADF1Y+gnKg== X-CSE-MsgGUID: oSoXcnsiTza8XcYFSv3VwQ== X-IronPort-AV: E=McAfee;i="6700,10204,11296"; a="35728887" X-IronPort-AV: E=Sophos;i="6.12,260,1728975600"; d="scan'208";a="35728887" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Dec 2024 03:06:16 -0800 X-CSE-ConnectionGUID: A+96WdD7Rc2fTCHsG/J6kg== X-CSE-MsgGUID: JrAaJeZQR5WF4LY0JzP+jg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,260,1728975600"; d="scan'208";a="99552288" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orviesa006.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Dec 2024 03:06:15 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) 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.44; Tue, 24 Dec 2024 03:06:14 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.44 via Frontend Transport; Tue, 24 Dec 2024 03:06:14 -0800 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.48) 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; Tue, 24 Dec 2024 03:06:14 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lBzdKM9wbmcEKnLp2mwL58ItE8aY3s4tK0lDSN1kQOxzqbjfu5ifKfJEiAlckQvw7CoXp4zClt0kPVhqxyXh1jXDBWI+6Fq++gpyoV68MDT3m2rKOMBqVOslx4hdc2n/aI5dgWLpr+QGYfiELUWd/XXp+u3lt5mu3ck9FX8W463Eu6NkIs4ybaWFUYk5rcigcIyx7m9cAPZmcf+0dvUtSEmN5U33pJKyW9n2/jP+/yA/USiPu+v4ecHO6teE++stKp770JqbSLo/2HB5AqthfjMsxNUubJTQHUEge5lsGOA7FxdCJiABqyfwcQjNiRn7xPUu5cKeI8M9shAtKQoHPw== 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=H5pcn/H4f086JZCezbP8K2o9kZJPGaHPdeZL/MPpVT8=; b=KqgsW+dxTp4w+MO84WMoC7iHqFTwh3q4XZgU5ucSC4ChyRiR6Qf4BSNSlBX2NVrU+WPx1MAtpLqNoZoWX8rXJSTNXM0xkq1iVfWIKuCv+h1M3bj/qpKP3j56XCGYXbe240UTr4gNMH4BbY1QSTuYxSqZgdbagqsCbsNLuevpuFME/JszEmXuUJ1DbDz84lQ3y6f0jwYtT9R9AFMDSy+lto23JLKgamwaDfPbhe3JHF75T16mwo639/Rfm1nC77JOM3Cts1X6Cr+u0eqpiAF4IZuY0kaDWzHAHgo2AQwiNmIE/DVkaCxnuAmkNJbu7vwo90JS6CpChyLilEMEqFQnqw== 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 SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) by SJ0PR11MB4847.namprd11.prod.outlook.com (2603:10b6:a03:2d9::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.21; Tue, 24 Dec 2024 11:06:08 +0000 Received: from SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b]) by SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b%6]) with mapi id 15.20.8272.013; Tue, 24 Dec 2024 11:06:08 +0000 Message-ID: Date: Tue, 24 Dec 2024 11:06:04 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] app/test: fix stack overflow in fib6_perf_autotest To: Andre Muezerie , Stephen Hemminger CC: References: <1734988233-20208-1-git-send-email-andremue@linux.microsoft.com> <20241223133000.0a761f5a@fedora> <20241224014733.GA19006@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Content-Language: en-US From: "Medvedkin, Vladimir" In-Reply-To: <20241224014733.GA19006@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU6P191CA0019.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:540::23) To SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR11MB5772:EE_|SJ0PR11MB4847:EE_ X-MS-Office365-Filtering-Correlation-Id: c066c4c4-ff84-4da8-71ce-08dd240af7bd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7053199007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?OFFGbmg5TkRidExSdEJ6RisyL096N1BxWldYMUZIbitFdzJxWWtrc0VXaXZm?= =?utf-8?B?enB4VWRrWmZ1c203TTlWejJaTFRQMmdkWmNGK3FieFNHQlNBYkNvT2hMc1Uv?= =?utf-8?B?YmZROGNhVWh4RmdEUFFpUWsrK2dPaHNPMWJvU3MxQ3lTMXhWM0l0Uk4rVk1l?= =?utf-8?B?YTNyUm95WHdjRzJMTkpBL2M0WklOR3Mvd0VXVytibVBER0g4MzU3bjBMbUpZ?= =?utf-8?B?L0lXR3JkalpZSkdwYitkZC9BdGhDc09kOU1FTnFIQ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xNTHo5Zm5MSzJQN0hqSVJ1?= =?utf-8?B?V3VoVHNiQnRRU1ZiM3E2Rkl2Ui9ITEQ2RjlKYjRJZWhOdVpoK0VSelhQZld2?= =?utf-8?B?TWpjQmkzV2o3ekdYVlpLUUM0eFgrbmhCeklnODFyMUs4OTNISkNXa1BncFRX?= =?utf-8?B?ZTczOVFsM0YzV0dmd1lKOHQ1MWk0SGN0UkdtV2t1WmFyRUlZMmo3ZXZUZjlL?= =?utf-8?B?bzRwNnIzdWhFMXREVlZoREVrR3lGMG5MamFZT29BNGpGYUJxN1pXN2VEUzJv?= =?utf-8?B?d29FMzZrbWs2N3VwSmdrbUZXSUN2MndIQ2daY1hNS3B4bVBSQTBqaG1ZREU5?= =?utf-8?B?RUpUbUJuVUxqK2dMS0FvOVVqbTRRcXBsRjREelRZaWEvZ3F5VmVLT0VZdEhF?= =?utf-8?B?UHk2cnl4dVRWdytqaGZYbDltSXJCOXA5WG0xM0pDRkVNRUE1ZTNyNG03eUtQ?= =?utf-8?B?WkxVWmhVRmhMTjNUWkpaWjdqUk5sODBrb3VFMGFzSDFSdE53aHlyYVRjenRI?= =?utf-8?B?SjRwM01JazdVSW4zTUlGZUVVYW1tbUlja09QUDQySXQ1eGNOUmxMUUUrZFJk?= =?utf-8?B?OHB6YnFycW9GKzZZSHVJR2VaZEwxdEs3NmxDcnE2K1VPcDlWbFNtZ2dtRXZj?= =?utf-8?B?M0k5SHBjQ2hvVFd1Q1Vmdz09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5772.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(7053199007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Z05ZZEFJSXVvdDA3TGxISnlxN3ZZQ3Zwd3VKdXNwUW5DbV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5MGhTUWloY1BmM2loOFpVVEVNU0NMNmgrVE9V?= =?utf-8?B?UlFsZndsakdJWnVzR2pBd3VFdWhPK3k4V21GME5JU0F3RjU2Wi9OUm5XQ2Fo?= =?utf-8?B?dVpOeXhmRTFHRVlWaG0zMnNUR3ZZc3pJSVA2dytpcXFXT1FDeXhQMXN1OUx2?= =?utf-8?B?RER6MDhNL1haYUluUjN3SFJtNUdTMG5vYTE2eGFqR2ZaVlVoTG9MSWxWNG5L?= =?utf-8?B?QTRyUytuSjYzNjJvZkw2R2RNKzEzaUJjcmVYckxieXRMWEs3OXF3c3ZUcitT?= =?utf-8?B?N2dkTi9HOGNhTlQvWkNkVit3NC8rZTQ0MnRvTWFWQUgrOTVJUmx0R2M4YTNC?= =?utf-8?B?dWc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: c066c4c4-ff84-4da8-71ce-08dd240af7bd X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5772.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Dec 2024 11:06:08.3446 (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: DaXVSU2HdwbbqhonKmvdQ/z0S6tub5JBGUfJP3ymRh5v6bp/GNObiqnVFwzckTH1ANHG0Wok1Sy5od7NyORUBxrEDEnIBy8v9Bmqao7Q2YY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4847 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 Hi, I think using rte_malloc(rte_calloc) here would be a better choice because: - As Andre mentioned allocation happens outside of the performance measurement section - Due to relatively large size of the memory allocated for ip_batch/next_hops some CPUs may experience TLB cache pressure, which will affect performance measurement results. With that being said Acked-by: Vladimir Medvedkin On 24/12/2024 01:47, Andre Muezerie wrote: > On Mon, Dec 23, 2024 at 01:30:00PM -0800, Stephen Hemminger wrote: >> On Mon, 23 Dec 2024 13:10:33 -0800 >> Andre Muezerie wrote: >> >>> From: Andre Muezerie >>> To: Vladimir Medvedkin >>> Cc: dev@dpdk.org, Andre Muezerie >>> Subject: [PATCH] app/test: fix stack overflow in fib6_perf_autotest >>> Date: Mon, 23 Dec 2024 13:10:33 -0800 >>> X-Mailer: git-send-email 1.8.3.1 >>> >>> Test fib6_perf_autotest was hitting a stack overflow on Windows >>> with MSVC. >>> >>> The fix is to move some of the data from the stack to the heap. >>> >>> Signed-off-by: Andre Muezerie >> Use regular malloc please. >> rte_malloc comes from hugepages which are more limited and slower to manipulate. > I recently submitted a patch for a test with a very similar issue and > during review one of the reviewers encouraged me to use rte_calloc to > allocate memory for the arrays, which I think makes sense (I had used > malloc initially): > > https://inbox.dpdk.org/dev/20241218151206.GA25758@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net/ > > Even though this is a perf test, the code responsible for the memory > allocations is not in the path for which time measurements are being > taken (points between rte_rdtsc calls), so perf for the memory > allocation code is probably not so critical. > > That being said, if you still feel strongly that malloc should be used > instead let me know and I can make that change. > > Thanks, > > Andre Muezerie -- Regards, Vladimir