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 25671455D8; Tue, 9 Jul 2024 10:57:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 67577427E6; Tue, 9 Jul 2024 10:57:46 +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 3A0ED40E4D for ; Tue, 9 Jul 2024 10:57:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720515463; 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=DuDe6ncvLUJNEVhejo0O1FjTslm0lalVPAmag29PETo=; b=fEWfpUGHpFKSorHFHTTjR/KG+9jtulwt/+OJthBjx+6/WcPEur2TOg3Y7uNcaE5gbj2xrW ecj54gGnk8YHFVe1oSbr3oXCwf0reZsyBr4QPP3kgwozZ89183MSBvKawvNx8dJ41dlZFh iuUXR+sM4w8gLEWGeKJkcgnfCONWMiQ= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-536-1Mca96q9Os2sVu_tjIqzRA-1; Tue, 09 Jul 2024 04:57:42 -0400 X-MC-Unique: 1Mca96q9Os2sVu_tjIqzRA-1 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2ee87d500caso50084951fa.3 for ; Tue, 09 Jul 2024 01:57:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720515460; x=1721120260; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DuDe6ncvLUJNEVhejo0O1FjTslm0lalVPAmag29PETo=; b=BcNmOWPSeLm9aTkUFSGVNuE33kaDCP3HnjxvKNy5fw55eo+F1Y9fbUp3edlJrBAYNl Qf6gl8yYoEp3Clzy1X9Nrj4Ec78XYPc0kujebMyBzg5ZwWrmuSxcjcvsY/1CB5eNK2Oq PZsbDaI53l4oWPYN6nIRbskk5VRYG9SsyDoMnpwK2AmvZnawT7Jq1Te4patkv6acBH0i Y9u8cI2Spmw3XZopneI/2xcFwBij+xiwy/E4Zb6MEdWNbe9/WmlQgjGRSek17Gi/6Wyh dDhODSuCR+XKW6jH1S0eaMPLP3sPLrmpBfsc6mm305SUUWuVADVKPtFj3mbTYwz3TX9e sgjw== X-Gm-Message-State: AOJu0YwVLD7dZ+cuN8oXrRgFylEs0d/oYkMqcMAWA3QHKl+ZrBmWsqQp n0wPHEgRzFzbkiK9v9RmrbrSdaPnshLwbUAZmUqJmDuL4XKxarorpLJDIJ6BTtTXL1u75ofg8P2 QQhQnKInn6qfwxWeTdJH439Te10gS+B2d51WYnHHPL5TZH7tWEy09MN6nfKYKB6k4AUa3ErkijT vUHWFogkfjIbcRNyI= X-Received: by 2002:a2e:9b0f:0:b0:2ec:550e:24f3 with SMTP id 38308e7fff4ca-2eeb30bc603mr15323841fa.10.1720515460592; Tue, 09 Jul 2024 01:57:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEfubv8TZccyO8hi54P+rYt+jF7+U4w+g/Kq/octtCRhMcQyKGkTcS6WTEh2W4260XWWgpU3fgI4qVmID8XGa0= X-Received: by 2002:a2e:9b0f:0:b0:2ec:550e:24f3 with SMTP id 38308e7fff4ca-2eeb30bc603mr15323641fa.10.1720515460200; Tue, 09 Jul 2024 01:57:40 -0700 (PDT) MIME-Version: 1.0 References: <20240626145142.1697935-1-david.marchand@redhat.com> <20240626075959.6e27b59f@hermes.local> In-Reply-To: <20240626075959.6e27b59f@hermes.local> From: David Marchand Date: Tue, 9 Jul 2024 10:57:28 +0200 Message-ID: Subject: Re: [PATCH] eal/linux: lower log level on allocation attempt failure To: David Marchand Cc: dev@dpdk.org, Ales Musil , stable@dpdk.org, Anatoly Burakov , Stephen Hemminger X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, Jun 26, 2024 at 5:00=E2=80=AFPM Stephen Hemminger wrote: > > 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=3D*: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 =3D 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 buil= d > > 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 Applied, thanks. --=20 David Marchand