[RFC PATCH v1 4/5] eal: rename --socket-mem/--socket-limit
fengchengwen
fengchengwen at huawei.com
Mon Sep 9 09:42:16 CEST 2024
On 2024/9/6 19:47, Anatoly Burakov wrote:
> Currently, --socket-mem and --socket-limit EAL flags effectively refer to
> NUMA nodes, not CPU sockets. Update the flag names to reflect this. Old
> flag names are still supported for backward compatibility.
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
>
> Notes:
> Technically, this is a user-facing change and so would require a
> deprecation notice. We can do it the other way around, and add
> support for --numa-mem/--numa-limit but do not expose it in
> documentation yet, and instead add a deprecation notice for next
> release. However, since old flags are kept for compatibility,
> nothing will break as a result of merging this series even if we
> didn't announce this change in advance. I'm open to feedback on
> how to best do this change.
>
...
> diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
> index cf174aeaa3..591028f641 100644
> --- a/lib/eal/linux/eal.c
> +++ b/lib/eal/linux/eal.c
> @@ -443,8 +443,8 @@ eal_usage(const char *prgname)
> printf("\nUsage: %s ", prgname);
> eal_common_usage();
> printf("EAL Linux options:\n"
> - " --"OPT_SOCKET_MEM" Memory to allocate on sockets (comma separated values)\n"
> - " --"OPT_SOCKET_LIMIT" Limit memory allocation on sockets (comma separated values)\n"
> + " --"OPT_NUMA_MEM" Memory to allocate on NUMA nodes (comma separated values)\n"
> + " --"OPT_NUMA_LIMIT" Limit memory allocation on NUMA nodes (comma separated values)\n"
> " --"OPT_HUGE_DIR" Directory where hugetlbfs is mounted\n"
> " --"OPT_FILE_PREFIX" Prefix for hugepage filenames\n"
> " --"OPT_CREATE_UIO_DEV" Create /dev/uioX (usually done by hotplug)\n"
> @@ -693,11 +693,11 @@ eal_parse_args(int argc, char **argv)
> }
> break;
> }
> - case OPT_SOCKET_MEM_NUM:
> + case OPT_NUMA_MEM_NUM:
> if (eal_parse_socket_arg(optarg,
> internal_conf->numa_mem) < 0) {
> EAL_LOG(ERR, "invalid parameters for --"
> - OPT_SOCKET_MEM);
> + OPT_NUMA_MEM);
This may confuse user, how about "invalid parameters for --numa-mem (aka --socket-mem)"
> eal_usage(prgname);
> ret = -1;
> goto out;
> @@ -705,11 +705,11 @@ eal_parse_args(int argc, char **argv)
> internal_conf->force_numa = 1;
> break;
>
> - case OPT_SOCKET_LIMIT_NUM:
> + case OPT_NUMA_LIMIT_NUM:
> if (eal_parse_socket_arg(optarg,
> internal_conf->numa_limit) < 0) {
> EAL_LOG(ERR, "invalid parameters for --"
> - OPT_SOCKET_LIMIT);
> + OPT_NUMA_LIMIT);
Same to above
> eal_usage(prgname);
> ret = -1;
> goto out;
>
More information about the dev
mailing list