[PATCH v3 1/4] eal: deprecate old coremask-based EAL parameters
Bruce Richardson
bruce.richardson at intel.com
Fri May 2 18:00:42 CEST 2025
On Fri, May 02, 2025 at 08:51:22AM -0700, Stephen Hemminger wrote:
> On Fri, 2 May 2025 16:11:31 +0100
> Bruce Richardson <bruce.richardson at intel.com> wrote:
>
> > As the number of cores/cpus on platforms has increased over the years,
> > the use of coremasks rather than core-lists for identifying DPDK cores
> > has become more and more unwieldy. At this point, let's deprecate the
> > coremask-based EAL parameters for future removal, and point users to the
> > core-list based versions instead.
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
>
> Agree.
>
> There are some more syntax options on Linux kernel command line:
> https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/kernel-parameters.rst#cpu-lists
>
> cpu lists
> Some kernel parameters take a list of CPUs as a value, e.g. isolcpus, nohz_full, irqaffinity, rcu_nocbs. The format of this list is:
>
> <cpu number>,...,<cpu number>
> or
>
> <cpu number>-<cpu number> (must be a positive range in ascending order)
> or a mixture
>
> <cpu number>,...,<cpu number>-<cpu number>
>
This we already support.
> Note that for the special case of a range one can split the range into equal sized groups and for each group use some amount from the beginning of that group:
>
> <cpu number>-<cpu number>:<used size>/<group size>
> For example one can add to the command line following parameter:
>
> isolcpus=1,2,10-20,100-2000:2/25
> where the final item represents CPUs 100,101,125,126,150,151,...
>
> The value "N" can be used to represent the numerically last CPU on the system, i.e "foo_cpus=16-N" would be equivalent to "16-31" on a 32 core system.
>
> Keep in mind that "N" is dynamic, so if system changes cause the bitmap width to change, such as less cores in the CPU list, then N and any ranges using N will also change. Use the same on a small 4 core system, and "16-N" becomes "16-3" and now the same boot input will be flagged as invalid (start > end).
>
> The special case-tolerant group name "all" has a meaning of selecting all CPUs, so that "nohz_full=all" is the equivalent of "nohz_full=0-N".
>
> The semantics of "N" and "all" is supported on a level of bitmaps and holds for all users of bitmap_parselist().
>
Those would be good/interesting extensions to have, if someone wants to add
them to EAL. Hopefully after this patchset, adding them should be easier as
I think we should only have one place in EAL where we parse groups like that:
"eal_parse_set()" function.
/Bruce
More information about the dev
mailing list