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 8315145804 for ; Fri, 23 Aug 2024 18:22:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 714454336F; Fri, 23 Aug 2024 18:22:20 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 1E9BE402BE for ; Fri, 23 Aug 2024 18:22:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724430138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BMmw99G3r1c+OCA1L/R2IsvHijQI+Hclhkfqv9SDRz8=; b=VUOXPEOvrSnxTKOYGuZJt6NVLwmo7Srs1ebbyDBHZtkYy5w2hztdNzFbvJn/ytJJNEM4M2 hL+O8eRiwDHci9cPXfCg/V5UxytHORsyS+jl8XlLq56BwSsuXA5XDkkWKxWK3kYerNtr0H 2pJSijzfHkFTZ+neC6I31ndzr2s/9WU= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-62-GwT6-pFiOUe_J68Z48DiXw-1; Fri, 23 Aug 2024 12:22:16 -0400 X-MC-Unique: GwT6-pFiOUe_J68Z48DiXw-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0618B1955BF6; Fri, 23 Aug 2024 16:22:16 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.193.224]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A3B0A1956053; Fri, 23 Aug 2024 16:22:14 +0000 (UTC) From: Kevin Traynor 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 21.11.8 Date: Fri, 23 Aug 2024 17:18:22 +0100 Message-ID: <20240823161929.1004778-74-ktraynor@redhat.com> In-Reply-To: <20240823161929.1004778-1-ktraynor@redhat.com> References: <20240823161929.1004778-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.8 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/28/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://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/a0119434791a6c71bfe6372b9572a8f8618b6b70 Thanks. Kevin --- >From a0119434791a6c71bfe6372b9572a8f8618b6b70 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 [ 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 16b58d861b..05d45d7f54 100644 --- a/lib/eal/linux/eal_memalloc.c +++ b/lib/eal/linux/eal_memalloc.c @@ -1035,5 +1035,5 @@ eal_memalloc_alloc_seg_bulk(struct rte_memseg **ms, int n_segs, size_t page_sz, 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; -- 2.46.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-08-23 17:18:11.992440765 +0100 +++ 0074-eal-linux-lower-log-level-on-allocation-attempt-fail.patch 2024-08-23 17:18:09.753430221 +0100 @@ -1 +1 @@ -From 8f4611d893b4eeffb942fffdadc4cde394e4c309 Mon Sep 17 00:00:00 2001 +From a0119434791a6c71bfe6372b9572a8f8618b6b70 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8f4611d893b4eeffb942fffdadc4cde394e4c309 ] + @@ -66 +67,0 @@ -Cc: stable@dpdk.org @@ -75 +76 @@ -index 0cc3295994..e354efc95d 100644 +index 16b58d861b..05d45d7f54 100644 @@ -78 +79 @@ -@@ -1062,5 +1062,5 @@ eal_memalloc_alloc_seg_bulk(struct rte_memseg **ms, int n_segs, size_t page_sz, +@@ -1035,5 +1035,5 @@ eal_memalloc_alloc_seg_bulk(struct rte_memseg **ms, int n_segs, size_t page_sz, @@ -81,2 +82,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",