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 865D5A0C41; Wed, 15 Sep 2021 18:34:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 70BAF4068F; Wed, 15 Sep 2021 18:34:25 +0200 (CEST) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 8DD194014F for ; Wed, 15 Sep 2021 18:34:24 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id n4so1958442plh.9 for ; Wed, 15 Sep 2021 09:34:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OYH2+gqx/6xAxxwcnfBmXi3wXRRPcDKbfLj0q+w7HKw=; b=akYM/tt99cQTlGTVAq9oAUKxzF/JDIAXN3DQUWcDNPLKwEtmYxi8XoT+t4ddLGNPe1 fMBoWiBO2if8ZoSlnT9BcOPaWpazHbNhtQMg2oLgKO1c+BXW5lIQIMZZ/2G0CO62egVn /EjJjD/TDw6JO8OF/j6SnUEy+W7FslhV/klYjxFQDU0zdo1c8X6cl1oOAJl3dUYxZLn7 Duygq6HT63bNTAJUTYYNDvwgYQNXmjwoeWXMVl04ldQWgqxgi2l6m4BY1k3ArWHr02ml kqXPHexCqcGM6bejGJn3pnBm8+wU6/xoMnraBMr/sHwdlLb869BOsILRlf2zJFpe5/Xu Ywfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OYH2+gqx/6xAxxwcnfBmXi3wXRRPcDKbfLj0q+w7HKw=; b=r60cwnwM3S8rdPZOcS7/qoAw5NGPuEQ/JUjB5AdDgbENPFeOm/SJG6/FSY/flgoBTJ e6i21hE7wF80BXvyBer7owEdLPRnnVl9v4g3++QZq5iRaiJOUXyDvk+vAluTuxrZRE2C ya4i0Z3PkPNvCY7Up4qg9fLL8TAXUyHmU762UHxKFKJTKWWIDW/SYWLsNng/948m32AD YTqvK8ZBLI5gsizz+0QGlmUnGWTZ21AOHIrvmQEWJ42t0Quoksi9MOmzBezi1utnQogA fZlAtLivkyi6uIFNqlZyyts5XrAlKNRYqX20l88e0oj+bFqgeNM4dgZit9XLsJs67MaB 9Gpw== X-Gm-Message-State: AOAM533thQEEGyAXT+cyVVAHBNPZZih+hC4qFRxrjBggTTb3fAeQJh9g 9tfkKBfZH8qW7Kl7lU6lx0/Z8g== X-Google-Smtp-Source: ABdhPJzyIJ9sKEh6psU1jqQoacfjGDFQIBrlc4wKSaQaGcixrV1Qw1DD15MAmEtBqJlXz/AEi1I/Ig== X-Received: by 2002:a17:90a:29a6:: with SMTP id h35mr724264pjd.188.1631723663617; Wed, 15 Sep 2021 09:34:23 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id 23sm381416pgk.89.2021.09.15.09.34.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Sep 2021 09:34:23 -0700 (PDT) Date: Wed, 15 Sep 2021 09:34:20 -0700 From: Stephen Hemminger To: Bruce Richardson Cc: Thomas Monjalon , anatoly.burakov@intel.com, david.marchand@redhat.com, dmitry.kozliuk@gmail.com, dev@dpdk.org Message-ID: <20210915093420.2765d5ff@hermes.local> In-Reply-To: References: <1768095.o955dqoAmz@thomas> <26751626.JyCatQyOe0@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] logs about hugepages detection 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 Sender: "dev" On Wed, 15 Sep 2021 15:59:38 +0100 Bruce Richardson wrote: > On Wed, Sep 15, 2021 at 04:39:21PM +0200, Thomas Monjalon wrote: > > 15/09/2021 16:25, Bruce Richardson: > > > On Wed, Sep 15, 2021 at 03:52:35PM +0200, Thomas Monjalon wrote: > > > > Hi, > > > > > > > > I would like to discuss some issues in logging of hugepage lookup. > > > > The issues to be discussed will be enumerated and numbered below. > > > > I will take an example of an x86 machine with 2M and 1G pages. > > > > I reserve only 2M pages: > > > > > > > > usertools/dpdk-hugepages.py -p 2M -r 80M > > > > > > > > If I start a DPDK application with --log-level info > > > > the only message I read makes me think something is wrong: > > > > > > > > EAL: No available 1048576 kB hugepages reported > > > > > > > > 1/ Log level is too high. > > > > > > > > > > Agreed. > > > > > > > If I start with EAL in debug level, I can see which page size is used: > > > > > > > > --log-level debug --log-level lib.eal:debug > > > > > > > > EAL: No available 1048576 kB hugepages reported > > > > [...] > > > > EAL: Detected memory type: socket_id:0 hugepage_sz:2097152 > > > > > > > > 2/ The positive message should be at the same level as the negative one. > > > > > > A bit uncertain about this, as I think it need not always be the case. I > > > think the log messages should be assessed independently. > > > > Not sure what you mean. Which level for which message? > > > > I mean the positive and negative log messages. I would assess the positive > log level independently of what the log level chosen for the negative one, > rather than saying they should be at the same level. > > > > > 3/ The sizes are sometimes written in bytes, sometimes in kB. > > > > It should be always the highest unit, including GB. > > > > > > > > When using the --in-memory mode, things are worst: > > > > > > > > EAL: No available 1048576 kB hugepages reported > > > > 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: No available 1048576 kB hugepages reported > > > > [...] > > > > EAL: Detected memory type: socket_id:0 hugepage_sz:1073741824 > > > > EAL: Detected memory type: socket_id:0 hugepage_sz:2097152 > > > > > > > > > > Yes, things should be consistent, having highest units is nice-to-have. If > > > everything is consistently reported in KB or MB it's probably fine. > > > > Fine but not nice :) > > I'm looking to improve the user experience, so "1GB" is definitely easier > > to read than "1048576 kB", not talking about "1073741824". > > > > Yes, agreed. The one small advantage of always just reporting in kB is > that it is the units used by the kernel in reporting the page sizes: > > $ ls /sys/kernel/mm/hugepages/ > hugepages-1048576kB hugepages-2048kB Agree the current messages are awkward. They are too noisy in normal (healthy case); I prefer if every thing is normal that EAL should print as little as possible, like one line. And if there is a config problem the current messages don't give the right diagnostic information for users.