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 C725E455AD for ; Mon, 15 Jul 2024 17:28:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C13DC40BA4; Mon, 15 Jul 2024 17:28:50 +0200 (CEST) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mails.dpdk.org (Postfix) with ESMTP id CD910402DD for ; Mon, 15 Jul 2024 17:28:49 +0200 (CEST) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-426526d30aaso31046915e9.0 for ; Mon, 15 Jul 2024 08:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057329; x=1721662129; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RJCjVkw6iVU2e3B6dzTYE3MEkxXcobjoCmu5BaZXj3s=; b=P5BDESQSXFlJyd5cHj+6bwOEf3wEiDMgh7fJA47TbYQkufce/6dwos0SECe1XYpSed q3Lx7xKYsoLwQQNkHRIt8g8+ztwoGizVUDMS4c4jSF9Bp11pxvSvcCtOHZnadpE3sHqn t8xLizhEmbouCciBIcZRcCVOUNJQA4pmKgXOsbfpy9anrdUKH7w8DAATFT0C0fOWIS/S +5cFbOT0e5+iq2VJBszosOXNkhuUaD8keOkrS4aNuG233UzAGMi1f5+FY87gFD0uU68X mYFtEVCYqL53nc3GNZDB5N/QpF2edgsH36E+jbT4rssii84p+dh+tg4D8DB+W+WlrUF+ 1K6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057329; x=1721662129; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RJCjVkw6iVU2e3B6dzTYE3MEkxXcobjoCmu5BaZXj3s=; b=oIeD7yyA5oOvFcNlHu7L4fKEhCtljz9s67q0TDtYTbA/HrK0Ndj75cM66VZSaG1KrF bdduRVY9BY27jUojBpr/yCiFnnUfIeHopGvj6h9wCULsqHKHsN3BxBk/o0rGgKRv4jZu PO8wQ6TTsCfME0LNLNMO6a3QRGEnm2DGmlM13wCsb++QBb0SqVK7NPaD0ngWxyeBI5v/ cpadKTSdbpsg5r+iZY3TM8cHyP/Sb1bQtzGh023MWlW8b57CJDO+WKaDJmyO8aMCEq41 JDAjN3m2IJGb2FeoyKwXWOVsevxQHPs59K+F7ZuJ8F/eaRSABFSBwHPLFlD89hEWCkV3 k8bQ== X-Forwarded-Encrypted: i=1; AJvYcCXwl38BnFAQsmLG+qW3yqq1xfW83Qm1+HJjRD6m2VqfyKxssIH4qSHYrAkV1CxOQJTk+2A/smXBXmCXnOtP21w= X-Gm-Message-State: AOJu0YwiwuxzAnxg90hZmhMdDRecKjYgzvsZUC/cXXPUjdbEQFfLGrUe IXv4PgbAPDAiCzZxtuFWiAQpwztFUAVfeuy5fB+Z477xt36cudDF X-Google-Smtp-Source: AGHT+IGHwV+emCp0DJLvXz5YzbbuLnNTvr4sLiyKT9bR+SV+D8hazi7idvAG8+NfGA8axPL+ZQb4/Q== X-Received: by 2002:a05:600c:70a:b0:426:6320:226a with SMTP id 5b1f17b1804b1-426707db6f3mr140146515e9.15.1721057329439; Mon, 15 Jul 2024 08:28:49 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f2d7c9csm126002615e9.48.2024.07.15.08.28.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:28:48 -0700 (PDT) From: luca.boccassi@gmail.com 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 22.11.6 Date: Mon, 15 Jul 2024 16:26:10 +0100 Message-Id: <20240715152704.2229503-32-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/17/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/b929a370ef2064f97a3e37810f2331e552dde220 Thanks. Luca Boccassi --- >From b929a370ef2064f97a3e37810f2331e552dde220 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 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.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:36.321854357 +0100 +++ 0032-eal-linux-lower-log-level-on-allocation-attempt-fail.patch 2024-07-15 16:19:34.528205609 +0100 @@ -1 +1 @@ -From 8f4611d893b4eeffb942fffdadc4cde394e4c309 Mon Sep 17 00:00:00 2001 +From b929a370ef2064f97a3e37810f2331e552dde220 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 9853ec78a2..b9fc83fe6a 100644 @@ -82,2 +83,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",