All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, Ray Kinsella <mdr@ashroe.eu>,
	Parav Pandit <parav@nvidia.com>, Xueming Li <xuemingl@nvidia.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Sachin Saxena <sachin.saxena@oss.nxp.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Long Li <longli@microsoft.com>
Subject: Re: [PATCH] drivers/bus: set device NUMA node to unknown by default
Date: Fri, 30 Sep 2022 10:11:19 +0200	[thread overview]
Message-ID: <Yzakp/SxpjXFcWPW@platinum> (raw)
In-Reply-To: <CAJFAV8wF1K4LFsFhuiKeAq2JMn_kPCUv41Lxd+f50QFLji=nmw@mail.gmail.com>

On Fri, Sep 30, 2022 at 09:10:55AM +0200, David Marchand wrote:
> On Thu, Sep 29, 2022 at 2:05 PM Olivier Matz <olivier.matz@6wind.com> wrote:
> >
> > The dev->device.numa_node field is set by each bus driver for
> > every device it manages to indicate on which NUMA node this device lies.
> >
> > When this information is unknown, the assigned value is not consistent
> > across the bus drivers.
> >
> > Set the default value to SOCKET_ID_ANY (-1) by all bus drivers
> > when the NUMA information is unavailable.
> >
> > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> 
> -  The dma/idxd driver, which has its own bus, seems ok, though I
> would align its code for readability.
> 
> @@ -322,7 +322,7 @@ dsa_scan(void)
> 
>         while ((wq = readdir(dev_dir)) != NULL) {
>                 struct rte_dsa_device *dev;
> -               int numa_node = -1;
> +               int numa_node = SOCKET_ID_ANY;
> 
>                 if (strncmp(wq->d_name, "wq", 2) != 0)
>                         continue;
> 
> 
> - There is an impact on upper classes of devices.
> 
> For ethdev, a port inherits the numa_node value from the rte_device object.
> Yet, rte_eth_dev_socket_id() is described as:
>  * @return
>  *   The NUMA socket ID to which the Ethernet device is connected or
>  *   a default of zero if the socket could not be determined.
>  *   -1 is returned is the port_id value is out of range.

Good catches, I'll fix them in v2.

Thanks,
Olivier

  reply	other threads:[~2022-09-30  8:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 12:05 [PATCH] drivers/bus: set device NUMA node to unknown by default Olivier Matz
2022-09-30  7:10 ` David Marchand
2022-09-30  8:11   ` Olivier Matz [this message]
2022-10-04 14:58   ` [PATCH v2] " Olivier Matz
2022-10-05  8:52     ` David Marchand
2022-10-05  9:04       ` Olivier Matz
2022-10-05  9:32         ` Thomas Monjalon
2022-10-06 19:31     ` David Marchand

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=Yzakp/SxpjXFcWPW@platinum \
    --to=olivier.matz@6wind.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=longli@microsoft.com \
    --cc=mdr@ashroe.eu \
    --cc=parav@nvidia.com \
    --cc=sachin.saxena@oss.nxp.com \
    --cc=sthemmin@microsoft.com \
    --cc=xuemingl@nvidia.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.