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 28ED745501 for ; Wed, 26 Jun 2024 17:00:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28E43402D0; Wed, 26 Jun 2024 17:00:12 +0200 (CEST) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mails.dpdk.org (Postfix) with ESMTP id 48F904026C for ; Wed, 26 Jun 2024 17:00:02 +0200 (CEST) Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-718354c17e4so3450739a12.1 for ; Wed, 26 Jun 2024 08:00:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1719414001; x=1720018801; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=7lIWuF67phQLKLUDK7lDkSjMciS2eQ+byXGkb1V7mMk=; b=ybx4ZhtY83r2e0FU1buJ9iZhwy4vUw6QEVYUbbGGpa/YEZfRq1RWgATQpKNnT93DGl G+LZLTidL2ryNjz4TrRyoUKQo2j/pU4fX1cU8wIkkxeomqXJ6pS4+UNYaVuMWMFJ/MxP qCdBq7K19F7R6weyjIjiQeOXWdtjzwGJXONJcyIRZvb7pCuGSlXTmm521EsU3FpQOElT mZQSv7xf0ThHFYDjNNINQrZX434eo3/19ysFHiO3NAXgea5/TDBFW1jg6wMd8tYUJR+2 V6HGKDVLYzR42BU+VOHziD/Z7CbRJXZtwV7MAJBCzZPeGMosljr1JT/Vp3IO7bvG/gtw 5M1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719414001; x=1720018801; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7lIWuF67phQLKLUDK7lDkSjMciS2eQ+byXGkb1V7mMk=; b=u4putGhtAGKH1czyxnAAF8qIF3FOmmCzVw4upr3/qExITdQdca9aitESDDheN+qhsC xCNuydKaBx+qEKeEEoHpyBk6OgkhZNOblRn2fJlsDw2+LKjrt+MaC2fBCyUDdUitt1rd XOJ9cr8O5mZtAopAQ/E34WGCizV5ogmveBe31LbKthymvxtBRYE/ztrbSGEoAidKNWC9 vn5ey0CRd5WoJ20OPN0CXblC9dWEcf1nzTVOLbRACVjSLDySVfI2DRnzK+NTuuPWYh7y SmQJXsK8My4BHtyBYuv+KvLTPT5LJnPQYbsEZ9TU8v4A5WsPIt1HLTkHu1BoTIRE9YKH FbkQ== X-Forwarded-Encrypted: i=1; AJvYcCUg2VnfZkZRUrHaMN9vqF6AA/s95rmRIgqnJy/0iC6Cesq67nKPzH2fG707NjmyphA32V4/QqXmD6A9qztATNQ= X-Gm-Message-State: AOJu0Yxl2zDgYXWbM05LGC30V7OKwAN8kNLvquApV2pD+TPvfINo51IO bIbXNXLq2MM0glw66+G39vivLZht/34y/c0wHu2XAH4u8pGFKHWZypKuI25JxPc= X-Google-Smtp-Source: AGHT+IHORjBgpwNbQ/ZLCWhHy+DoFrrYJbxtiHKOB9wyNJHMK/3kzMbuApXAKhkCvBxAvHaHI+12Bw== X-Received: by 2002:a17:90b:3901:b0:2c8:a666:1944 with SMTP id 98e67ed59e1d1-2c8a6661a3emr6181485a91.42.1719414001351; Wed, 26 Jun 2024 08:00:01 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c8d7b4f821sm1769158a91.0.2024.06.26.08.00.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 08:00:00 -0700 (PDT) Date: Wed, 26 Jun 2024 07:59:59 -0700 From: Stephen Hemminger To: David Marchand Cc: dev@dpdk.org, Ales Musil , stable@dpdk.org, Anatoly Burakov Subject: Re: [PATCH] eal/linux: lower log level on allocation attempt failure Message-ID: <20240626075959.6e27b59f@hermes.local> In-Reply-To: <20240626145142.1697935-1-david.marchand@redhat.com> References: <20240626145142.1697935-1-david.marchand@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Wed, 26 Jun 2024 16:51:42 +0200 David Marchand wrote: > 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") > Cc: stable@dpdk.org > > Signed-off-by: David Marchand > --- Acked-by: Stephen Hemminger