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 6EE56457A1 for ; Mon, 12 Aug 2024 14:54:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 63326402C3; Mon, 12 Aug 2024 14:54:43 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2045.outbound.protection.outlook.com [40.107.236.45]) by mails.dpdk.org (Postfix) with ESMTP id 66F544029C for ; Mon, 12 Aug 2024 14:54:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=l/a3+76Rk2ggIMyr4o1zl9O+AZh28JUWsYjEbXDn3z/smm1y3Ss+jiUKMRrsT68HuRMdg0aQYbBHEMRFpigHJN5qxcTiWirrMzEvU3ptU0/49T+wBe8NxKAopddBZVQAOEJVCyoQdrrA0XtvJIqqazTSr4w1FeUjEQNBxVXkXXXulcOXVaVZ3D7f8zgPoDHtvEZ/KGWVJ2Z3bJjOa8bLOvb3V9AqylBhvTiHes2Wnzd1c97O6gggCc7Iion1k/XWEoYOf2cI5QK7zjTTHtpV9AWH1YIjqu0qs5KeTVYPNs3TVWySTVOxkGURil36nSnQPNCXHIxy/H8gUg6VGUn/Yw== 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=NgyKZ2a4kTAO5FHnIDPCPhn3B7cc8NMFeZfj/XqyrSw=; b=jC3xqkrf5fKTRiNpPEjYI/3KyzQNMDBiAv+QUBTQR7peR0a+EDxFT56e1cL2JVQ4pPkYS83NOcqCumUBiAPdlwyVDZVtcRNWBWutmbY9utfixy+OKGBYd4D0cWAL7Ka+KQFV7YnzEFr85/j3TqPtR/jzMAsN6jNl/L/y6NFbKwDpIOd+OYS+84VDwU8afiMrzO9FiX82TSPNBhbow6lCiFvh29Z5pho4XYWVj1sL+Kak0FbP8IFnZ9KE8pImAb92IoGMQ8aKl8ue0S6/A40oWxapphrXrIwyaBnnEez2eTtuIL/DDLU290fbYQNQRciEPiQZir2eWqMtdi0DBVnLEQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NgyKZ2a4kTAO5FHnIDPCPhn3B7cc8NMFeZfj/XqyrSw=; b=i8zdYTbgFcGqR+g0UdPGdwlJc8XXQu1JWetF5Pbg5gpZ3opVzyrJmgFkaGhTMMARyfPmOE7pQTjmOzsB6TZzK1cUnWklHq0u29gM0h3+Lsndcpi7Qu25QAf3CfaQt5JhU27BWTgLs1f5q8aldirZqdvoJhVAhAm3F5KFtZaosQjSP5CHJ5qCzYGCq/X5uoME8inwO4AOhFrClfNp+6Q0DXQAQARG9H33Bevpr1J3/Lfk/XJv9CoZetYIi6cwbfI7UpzNsvLERKVCwZlZjVckhFN4R1iu2RBgeVXygEAJgbokrZCcYMg5hu3pypruI3KJku+Cgva8S6VTLMn1E9w0yA== Received: from SA9PR13CA0059.namprd13.prod.outlook.com (2603:10b6:806:22::34) by CYYPR12MB8750.namprd12.prod.outlook.com (2603:10b6:930:be::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.20; Mon, 12 Aug 2024 12:54:37 +0000 Received: from SA2PEPF00003F66.namprd04.prod.outlook.com (2603:10b6:806:22:cafe::28) by SA9PR13CA0059.outlook.office365.com (2603:10b6:806:22::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.22 via Frontend Transport; Mon, 12 Aug 2024 12:54:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SA2PEPF00003F66.mail.protection.outlook.com (10.167.248.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.8 via Frontend Transport; Mon, 12 Aug 2024 12:54:36 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 12 Aug 2024 05:54:24 -0700 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 12 Aug 2024 05:54:22 -0700 From: Xueming Li To: David Marchand CC: , Stephen Hemminger , dpdk stable Subject: patch 'eal/linux: lower log level on allocation attempt failure' has been queued to stable release 23.11.2 Date: Mon, 12 Aug 2024 20:48:36 +0800 Message-ID: <20240812125035.389667-40-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240812125035.389667-1-xuemingl@nvidia.com> References: <20240712110153.309690-23-xuemingl@nvidia.com> <20240812125035.389667-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00003F66:EE_|CYYPR12MB8750:EE_ X-MS-Office365-Filtering-Correlation-Id: 06920107-cec8-4892-827d-08dcbacdec0c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?StIucBEXzEEvLZskfG6ZqivR3dbnBut7vXlahPsjDv6Saa0pVpAdjc1bmTAX?= =?us-ascii?Q?vqSL87GRrwLCPJa2K7K63pBWIcPKwjjvaFrCihZSZ4xS7IkqGzTu1iszBxqv?= =?us-ascii?Q?X6rjBoVQI3+IcxxmREvKIVJitU0fdfHFCT0vEcOkoLLdyiv5kuAdFhgHyPLP?= =?us-ascii?Q?aIE6yOa9YJhriNvfgRhtozq1Trn6enKNXebcFxdgnnISOgOIRZGQ5pLbNJHr?= =?us-ascii?Q?kugdYmECH1kY39vIr7ZHaCwZOiXAHKHpyG+vqLM2RzBQHJxW5SEz9bnzj+r1?= =?us-ascii?Q?F8YXY3KDyO2qVzBjGbgQsMM3on70m2AV/rmhrvNOZ96xaZW6yPc5p3ne/m3d?= =?us-ascii?Q?FGlvRX2nZitaVwufSV3g2a5Bel8o9EmoVe1271PhZjn9jVVFklYcxRITfURl?= =?us-ascii?Q?bawwGGwDVhCVftNUIKlyuVmBDnisKb/hL/PcWBih0R2/IXSXiDk4I3k+v9nt?= =?us-ascii?Q?SHEaknyTS3FGxwhznuUeXC1ulBi7jZgan/6re8vQDPD8ajWJ3Ejwvmog9Qso?= =?us-ascii?Q?m/MKCo+PZ3LK/egajuRNLiY9Htt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+UcTtWIwtgrKXBwA2TRcWl7jMfW?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(376014)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2024 12:54:36.9666 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 06920107-cec8-4892-827d-08dcbacdec0c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00003F66.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8750 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 23.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/14/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f563086258ad779c923da91ddfe8a918ac8ca3a5 Thanks. Xueming Li --- >From f563086258ad779c923da91ddfe8a918ac8ca3a5 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Wed, 26 Jun 2024 16:51:42 +0200 Subject: [PATCH] eal/linux: lower log level on allocation attempt failure Cc: Xueming Li [ upstream commit 8f4611d893b4eeffb942fffdadc4cde394e4c309 ] On a ARM system with only 2MB hugepages configured, EAL emits an error log with allocations larger than 512MB. Example with testpmd: $ dpdk-testpmd --in-memory --no-pci --log-level=*:debug -- -i ... EAL: In-memory mode enabled, hugepages of size 33554432 bytes will be allocated anonymously EAL: No free 32768 kB hugepages reported on node 0 EAL: In-memory mode enabled, hugepages of size 65536 bytes will be allocated anonymously EAL: No free 64 kB hugepages reported on node 0 EAL: In-memory mode enabled, hugepages of size 1073741824 bytes will be allocated anonymously EAL: No free 1048576 kB hugepages reported on node 0 ... EAL: Detected memory type: socket_id:0 hugepage_sz:1073741824 EAL: Detected memory type: socket_id:0 hugepage_sz:33554432 EAL: Detected memory type: socket_id:0 hugepage_sz:2097152 EAL: Detected memory type: socket_id:0 hugepage_sz:65536 EAL: Creating 2 segment lists: n_segs:32 socket_id:0 hugepage_sz:1073741824 ... EAL: Creating 2 segment lists: n_segs:1024 socket_id:0 hugepage_sz:33554432 ... EAL: Creating 4 segment lists: n_segs:8192 socket_id:0 hugepage_sz:2097152 ... EAL: Creating 4 segment lists: n_segs:8192 socket_id:0 hugepage_sz:65536 ... EAL: Trying to obtain current memory policy. EAL: Setting policy MPOL_PREFERRED for socket 0 EAL: alloc_seg(): mmap() failed: Cannot allocate memory EAL: Ask a virtual area of 0x40000000 bytes EAL: Virtual area found at 0x140000000 (size = 0x40000000) EAL: attempted to allocate 2 segments, but only 0 were allocated EAL: Restoring previous memory policy: 4 EAL: Trying to obtain current memory policy. EAL: Setting policy MPOL_PREFERRED for socket 0 EAL: eal_memalloc_alloc_seg_bulk(): couldn't find suitable memseg_list EAL: Restoring previous memory policy: 4 EAL: Trying to obtain current memory policy. EAL: Setting policy MPOL_PREFERRED for socket 0 EAL: Restoring previous memory policy: 4 EAL: request: mp_malloc_sync EAL: No shared files mode enabled, IPC is disabled EAL: Heap on socket 0 was expanded by 1064MB ... The reason is that the memzone allocation (~1GB large) would require 17017 (32kB) segments. However, as displayed in the early logs, a 32kB memory segment list can only host 8192 segments (controlled by the build option RTE_MAX_MEMSEG_PER_LIST). This log message is misleading as there is no issue in the end: the allocation succeeded with 2MB hugepages. Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime") Signed-off-by: David Marchand Acked-by: Stephen Hemminger --- lib/eal/linux/eal_memalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c index 9853ec78a2..b9fc83fe6a 100644 --- a/lib/eal/linux/eal_memalloc.c +++ b/lib/eal/linux/eal_memalloc.c @@ -1061,7 +1061,7 @@ eal_memalloc_alloc_seg_bulk(struct rte_memseg **ms, int n_segs, size_t page_sz, /* memalloc is locked, so it's safe to use thread-unsafe version */ ret = rte_memseg_list_walk_thread_unsafe(alloc_seg_walk, &wa); if (ret == 0) { - RTE_LOG(ERR, EAL, "%s(): couldn't find suitable memseg_list\n", + RTE_LOG(DEBUG, EAL, "%s(): couldn't find suitable memseg_list\n", __func__); ret = -1; } else if (ret > 0) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-08-12 20:44:03.785595698 +0800 +++ 0039-eal-linux-lower-log-level-on-allocation-attempt-fail.patch 2024-08-12 20:44:02.015069279 +0800 @@ -1 +1 @@ -From 8f4611d893b4eeffb942fffdadc4cde394e4c309 Mon Sep 17 00:00:00 2001 +From f563086258ad779c923da91ddfe8a918ac8ca3a5 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 8f4611d893b4eeffb942fffdadc4cde394e4c309 ] @@ -66 +68,0 @@ -Cc: stable@dpdk.org @@ -75 +77 @@ -index 0cc3295994..e354efc95d 100644 +index 9853ec78a2..b9fc83fe6a 100644 @@ -82,2 +84,2 @@ -- EAL_LOG(ERR, "%s(): couldn't find suitable memseg_list", -+ EAL_LOG(DEBUG, "%s(): couldn't find suitable memseg_list", +- RTE_LOG(ERR, EAL, "%s(): couldn't find suitable memseg_list\n", ++ RTE_LOG(DEBUG, EAL, "%s(): couldn't find suitable memseg_list\n",