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 46152455D8 for ; Tue, 9 Jul 2024 10:57:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CD9240E4D; 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 2C58C40E38 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-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-536-P9AVwKH0NKmq3n0kjat9Dg-1; Tue, 09 Jul 2024 04:57:42 -0400 X-MC-Unique: P9AVwKH0NKmq3n0kjat9Dg-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2ee8ceb0852so49513751fa.0 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=QJk0fgKNQMcGWlxpHV/khdDadb0abxxdsBwCKn3zLoI084tRJvb1Fjle8UBq/AULs8 tTnUx8QTzlWsXuZzhM1Tgs/YaPMaW7r/UpnoXverOd+UQZ1/AmXByEQ4IhNqWAtKeIc5 ZWFMbW2+/iJupUcQ8nkNmMuSL+HbKoSZDBlK+btBur/vHoqgh9ELNoH2Ot6QestA/N25 tTO9f9uUMuh1ai4EPS7ngvyQl6T0PGuMwPmwrmyD0RUVSAvciARMTTxTi55lV6hef6dO Xp3TiRvPsbyp6DCikixfk57Lt6+2ca4rZKffxu9KPAQtIlwz9BMuTfvC1mR3CsvjXhNq u26A== X-Forwarded-Encrypted: i=1; AJvYcCVvDxxwdcXW+A5tusmrwWD+3LeMfkhqqt2POxkuJeZinyUc4fKB6y3PZcinkiNXOWKVwytlbXoPVOvpJDYBWyg= X-Gm-Message-State: AOJu0YwvMq+1hjRfFrRDlLjOVMYj9tzPm0eSpTZzEcYsGjwHj78Yh52X JMJRm0mzBGoX0x71IawaTrbojevokkooxnJmtdQ5wW0mUhFwZZUM/A+2XWMzNB5mWnbZb9EVFJA TsYF1gfJnUZrrBLZ64KFQS5+VEWJXdLWC6lBd0A/dCxP20dBQH/zojgMgjmR5xG4oGN9CUWaA1w NThE+a95goFfwx7yHJ0Zw= X-Received: by 2002:a2e:9b0f:0:b0:2ec:550e:24f3 with SMTP id 38308e7fff4ca-2eeb30bc603mr15323821fa.10.1720515460590; 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: 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, 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