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 1C51945501; Wed, 26 Jun 2024 17:00:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 103EC402CC; Wed, 26 Jun 2024 17:00:11 +0200 (CEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mails.dpdk.org (Postfix) with ESMTP id 4799F4026B for ; Wed, 26 Jun 2024 17:00:02 +0200 (CEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1f9ffd24262so36600315ad.0 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=SQDU+TJw5lTQ9vpxA/aDeHFG6fsiRHorW8bXAUsoSs+txoSqlelPT12+cW7s9Lmrqg Ib4sdKvFn43l08zfvEZv5gz/ZbVladdOEX4defu+H884n3YbI/CtsxaDPImu2zZyMyWm 5F20A+YqrV+1urgDdhd8lOayPpv23cuc+iGtE2iYJDFcW47QtcAS+w1IUVEw4SGY0R2c cFabpV1NFwh3ZpUfajjO/8SjqPJebGnJEl64plfJydmAIMqVsPhFy1hiHCrquMcppxF+ xTTa51ynWNW0UV93gRpR1CSLcipWPtAsfi0ZJmACopYOOC7wO8kgREsEdMOdhrAsP5jL oLtA== X-Gm-Message-State: AOJu0YxUMw0zfuPeA2fCAjMxbB6et1huTFcWLZBK9TB613riZT91tWOD Uv5l0THcXCo3zFz7SjfknGXQ7phNwQEfsPjY0ngnsR0gikDwZXXxFLmWe3EDDBc= 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: 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 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