DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] bus: clarify log for non-NUMA-aware devices
Date: Tue, 27 Jul 2021 08:08:01 +0000	[thread overview]
Message-ID: <CH0PR12MB5091D70267F82F50B4B84FFBB9E99@CH0PR12MB5091.namprd12.prod.outlook.com> (raw)
In-Reply-To: <fc8437f5-867b-280b-3bc8-78259365ec92@oktetlabs.ru>

> -----Original Message-----
> From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Sent: 23 июля 2021 г. 23:07
> To: Dmitry Kozlyuk <dkozlyuk@nvidia.com>; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] bus: clarify log for non-NUMA-aware devices
> 
> External email: Use caution opening links or attachments
> 
> 
> On 6/16/21 1:07 PM, Dmitry Kozlyuk wrote:
> > PCI and vmbus drivers printed a warning when NUMA node had beed
> > reported as (-1) or not reported by OS:
> >
> >      EAL:   Invalid NUMA socket, default to 0
> >
> > This message and its level might confuse users, because configuration
> > is valid and nothing happens that requires attention or intervention.
> >
> > Reduce level to INFO, reword the message, and suppress it when there
> > is only one NUMA node, bacause NUMA-awareness does not matter in this
> case.
> >
> > Fixes: f0e0e86aa35d ("pci: move NUMA node check from scan to probe")
> > Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
> > Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> > Reviewed-by: Xueming Li <xuemingl@nvidia.com>
> > ---
> > v2: Add NUMA node count check (Stephen Hemminger).
> >
> >   doc/guides/nics/ena.rst          | 2 +-
> >   drivers/bus/pci/pci_common.c     | 4 ++--
> >   drivers/bus/vmbus/vmbus_common.c | 4 ++--
> >   3 files changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/doc/guides/nics/ena.rst b/doc/guides/nics/ena.rst index
> > 0f1f63f722..694ce1da74 100644
> > --- a/doc/guides/nics/ena.rst
> > +++ b/doc/guides/nics/ena.rst
> > @@ -234,7 +234,7 @@ Example output:
> >
> >      [...]
> >      EAL: PCI device 0000:00:06.0 on NUMA socket -1
> > -   EAL:   Invalid NUMA socket, default to 0
> > +   EAL:   Device is not NUMA-aware, defaulting socket to 0
> >      EAL:   probe driver: 1d0f:ec20 net_ena
> >
> >      Interactive-mode selected
> > diff --git a/drivers/bus/pci/pci_common.c
> > b/drivers/bus/pci/pci_common.c index 35d7d092d1..0bb56d9b7f 100644
> > --- a/drivers/bus/pci/pci_common.c
> > +++ b/drivers/bus/pci/pci_common.c
> > @@ -189,8 +189,8 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,
> >               return 1;
> >       }
> >
> > -     if (dev->device.numa_node < 0) {
> > -             RTE_LOG(WARNING, EAL, "  Invalid NUMA socket, default to 0\n");
> > +     if (rte_socket_count() > 1 && dev->device.numa_node < 0) {
> > +             RTE_LOG(INFO, EAL, "  Device is not NUMA-aware,
> > + defaulting socket to 0\n");
> >               dev->device.numa_node = 0;
> 
> Is it intended side-effect of the patch that above assignment is not done if node
> is negative and there is only one socket?

TBH, it was not intended, but after analyzing dev->device.numa_node usages,
I think this can be the right thing to do. Even if there is only one NUMA node,
its number may be different from 0, e. g. if we're running on a set of cores
that belong to another node. For safety we can change this patch to only affect logs,
then fix numa_node setting as a follow-up
(maybe set it to the real number of the only node).

> >       }
> >
> > diff --git a/drivers/bus/vmbus/vmbus_common.c
> > b/drivers/bus/vmbus/vmbus_common.c
> > index d25fd14ef5..5b654b0289 100644
> > --- a/drivers/bus/vmbus/vmbus_common.c
> > +++ b/drivers/bus/vmbus/vmbus_common.c
> > @@ -111,8 +111,8 @@ vmbus_probe_one_driver(struct rte_vmbus_driver
> *dr,
> >       /* reference driver structure */
> >       dev->driver = dr;
> >
> > -     if (dev->device.numa_node < 0) {
> > -             VMBUS_LOG(WARNING, "  Invalid NUMA socket, default to 0");
> > +     if (rte_socket_count() > 1 && dev->device.numa_node < 0) {
> > +             VMBUS_LOG(INFO, "  Device is not NUMA-aware, defaulting
> > + socket to 0\n");
> >               dev->device.numa_node = 0;
> 
> Same question here.
> 
> >       }
> >
> >


  reply	other threads:[~2021-07-27  8:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15 10:51 [dpdk-dev] [PATCH] " Dmitry Kozlyuk
2021-06-15 15:12 ` Stephen Hemminger
2021-06-16 10:07 ` [dpdk-dev] [PATCH v2] " Dmitry Kozlyuk
2021-07-23 20:07   ` Andrew Rybchenko
2021-07-27  8:08     ` Dmitry Kozlyuk [this message]
2021-07-27 10:27   ` [dpdk-dev] [PATCH v3] " Dmitry Kozlyuk
2021-07-28 22:06     ` [dpdk-dev] [PATCH v4] " Dmitry Kozlyuk
2021-07-29  7:45       ` Andrew Rybchenko
2021-07-30 16:18       ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2021-08-04  8:03       ` [dpdk-dev] [PATCH v5] " Dmitry Kozlyuk
2021-08-04  9:34         ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CH0PR12MB5091D70267F82F50B4B84FFBB9E99@CH0PR12MB5091.namprd12.prod.outlook.com \
    --to=dkozlyuk@nvidia.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).