[dpdk-dev] [PATCH v12 09/14] build: optional NUMA and cpu counts detection

Honnappa Nagarahalli Honnappa.Nagarahalli at arm.com
Wed Nov 18 21:01:54 CET 2020


<snip>

> 
> On Wed, Nov 18, 2020 at 04:04:25PM +0100, Thomas Monjalon wrote:
> > 18/11/2020 15:54, Bruce Richardson:
> > > On Wed, Nov 18, 2020 at 03:42:36PM +0100, Thomas Monjalon wrote:
> > > > 18/11/2020 15:19, Juraj Linkeš:
> > > > > From: Thomas Monjalon <thomas at monjalon.net>
> > > > > > 16/11/2020 10:13, Bruce Richardson:
> > > > > > > On Mon, Nov 16, 2020 at 08:24:48AM +0100, Thomas Monjalon
> wrote:
> > > > > > > > 13/11/2020 15:31, Juraj Linkeš:
> > > > > > > > > +option('max_lcores', type: 'integer', value: 0,
> > > > > > > > > +	description: 'maximum number of cores/threads
> supported by EAL.
> > > > > > > > > +Set to positive integer to overwrite per-arch or
> > > > > > > > > +cross-compilation
> > > > > > defaults. Set to -1 to detect the number of cores on the build
> > > > > > machine.') option('max_numa_nodes', type: 'integer', value: 0,
> > > > > > > > > +	description: 'maximum number of NUMA nodes
> supported
> > > > > > > > > +by EAL. Set to positive integer to overwrite per-arch
> > > > > > > > > +or cross-compilation defaults. Set to -1 to detect the
> > > > > > > > > +number of numa nodes on the build machine.')
> > > > > > > >
> > > > > > > > First comment: I don't like having so long description.
> > > > > > > > Second: I don't understand.
> > > > > > > >
> > > > > > > > It is said the default value is 0 so I expect it means automatic
> detection.
> > > > > > > > But later it is said -1 is for detection. So ?
> > > > > > > >
> > > > > > > Zero is for the "per-arch or cross-compilation default".
> > > > > > > This was discussed quite a bit in previous versions and this
> > > > > > > was te best compromise we could come up with. Having a
> > > > > > > default of auto-detect is definitely not something I think
> > > > > > > we should go with - just thinking of all the build CI jobs
> > > > > > > running on
> > > > > > > 2 or 4 core VMs! However, Juraj really felt there was value
> > > > > > > in having auto-detection, so it's set as a -1 value, which I'm ok
> with.
> > > > > >
> > > > > > The problem is that I don't understand what 0 means.
> > > > > >
> > > > >
> > > > > There are three pieces of information which we need to convey:
> > > > > 1. The default value (0) indicates that per-arch or cross-compilation
> defaults will be used.
> > > > > 2. Positive integer values will be used instead of these defaults.
> > > >
> > > > Where these positive values come from?
> > > >
> > > > > 3. Detected values will be used for native build when the value is -1.
> > > >
> > > > Why not detect for any native build set up with 0 (default)?
> > > >
> > > That was one of the original suggestions, but I strongly disagreed
> > > with that, because many builds are done on hardware very different
> > > from the final deployment. It would mean that any builds done in
> > > e.g. jenkins or travis, with a 2-core vm, would be limited to running with
> two cores only.
> >
> > Yes that's the difference between native and cross build:
> > native build is not for running on a different machine.
> > I feel you have a different understanding of native build?
> >
> A cross-build is for running on a different architecture, not a different
> machine. I can build on my laptop to run on a Xeon server and it's still a native
> build rather than a cross build. For this discussion, a cross-build is considered
> something using a cross-file.
> 
This requires that the CPU on the laptop and the Xeon server support the same ISA version (I am not sure what it is called in x86). For ex: if the laptop supports AVX512, the Xeon server also needs to support AVX512. So, the user needs to be aware of all the instructions (or ISA version) on which the binary was built to be able to run it on another x86 machine. I am not sure if this is called out or understood by the users. In this regard, I tend to agree with Thomas that a native build is running on the same machine where it was built.

> /Bruce


More information about the dev mailing list