[dpdk-dev] [PATCH v5] build: optional NUMA and cpu counts detection

Bruce Richardson bruce.richardson at intel.com
Thu Sep 9 10:01:16 CEST 2021


On Thu, Sep 09, 2021 at 07:20:27AM +0000, Juraj Linkeš wrote:
> 
> 
> > -----Original Message-----
> > From: Bruce Richardson <bruce.richardson at intel.com>
> > Sent: Tuesday, August 31, 2021 10:03 AM
> > To: Juraj Linkeš <juraj.linkes at pantheon.tech>
> > Cc: Piotr Kubaj <pkubaj at anongoth.pl>; David Christensen
> > <drc at linux.vnet.ibm.com>; thomas at monjalon.net;
> > david.marchand at redhat.com; Honnappa.Nagarahalli at arm.com;
> > Ruifeng.Wang at arm.com; ferruh.yigit at intel.com; jerinjacobk at gmail.com;
> > jerinj at marvell.com; stephen at networkplumber.org; dev at dpdk.org
> > Subject: Re: [PATCH v5] build: optional NUMA and cpu counts detection
> > 
> > On Tue, Aug 31, 2021 at 07:54:16AM +0000, Juraj Linkeš wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Piotr Kubaj <pkubaj at anongoth.pl>
> > > > Sent: Tuesday, August 31, 2021 2:55 AM
> > > > To: Juraj Linkeš <juraj.linkes at pantheon.tech>
> > > > Cc: David Christensen <drc at linux.vnet.ibm.com>; thomas at monjalon.net;
> > > > david.marchand at redhat.com; bruce.richardson at intel.com;
> > > > Honnappa.Nagarahalli at arm.com; Ruifeng.Wang at arm.com;
> > > > ferruh.yigit at intel.com; jerinjacobk at gmail.com; jerinj at marvell.com;
> > > > stephen at networkplumber.org; dev at dpdk.org
> > > > Subject: Re: [PATCH v5] build: optional NUMA and cpu counts
> > > > detection
> > > >
> > > > Hi,
> > > >
> > > > sorry for the late answer.
> > >
> > > Thanks for the answer anyway, better late than never.
> > >
> > > >
> > > > I suppose you mean sysctl command, not systemctl.
> > > >
> > >
> > > That's right. What does lscpu say? Are the NUMA nodes non-contiguous like
> > this?:
> > > NUMA node0 CPU(s):   0-63
> > > NUMA node8 CPU(s):   64-127
> > > NUMA node252 CPU(s):
> > > NUMA node253 CPU(s):
> > > NUMA node254 CPU(s):
> > > NUMA node255 CPU(s):
> > >
> > > > On dual CPU systems, it returns 2. On single CPU ones, 1.
> > >
> > > I asked the previous question so that we know the actual numa node number
> > of the second CPU. If it's 8, then sysctl does some renumeration and we can't
> > use it.
> > >
> > > Bruce, maybe we should just parse lscpu output? That introduces a
> > dependency, but that may not be such a big deal as lscpu is pretty common.
> > >
> > Until we are sure that we need it, can we just keep things simple? Perhaps we
> > can use lscpu if present, and fallback to sysctl output if not.
> 
> Piotr says lscpu isn't available on ppc FreeBSD. I think this leaves us with two options:
> 1. either use sysctl with the risk that it may not return an accurate value
> 2. not support PPC for numa detection
> 
> What do you think?

I think point #2 is more not supporting FreeBSD on PPC for numa detection
rather than not supporting PPC generally, right? Personally, I am just in
favour of #1 for the sake of moving forward and giving us best support with
simplest code. If or when someone does hit this (FreeBSD+PPC) as a problem,
then we can work with them to find best solution for fixing it. Right now
we don't have anyone with the PPC+FreeBSD setup, so I'd rather ignore it
than implement more complicated solutions that we can't test "just in
case".

/Bruce


More information about the dev mailing list