Re: [ovs-dev] [PATCH 1/2] dpdk: Remove default values for socket-mem and limit.
"Rosemarie O'Riorden" writes: > From: Rosemarie O'Riorden > > This change removes the default values for EAL args socket-mem and > socket-limit. As DPDK supports dynamic memory allocation, there is no > need to allocate a certain amount of memory on start-up, nor limit the > amount of memory available, if not requested. > > Currently, socket-mem has a default value of 1024 when it is not > configured by the user, and socket-limit takes on the value of socket-mem, > 1024, by default. With this change, socket-mem is not configured by default, > meaning that socket-limit is not either. Neither, either or both options can > be set. > > Reported at: https://bugzilla.redhat.com/show_bug.cgi?id=1949850 > Signed-off-by: Rosemarie O'Riorden > --- > Documentation/intro/install/dpdk.rst | 3 +-- > NEWS | 2 ++ > lib/dpdk.c | 2 +- > vswitchd/vswitch.xml | 4 ++-- > 4 files changed, 6 insertions(+), 5 deletions(-) > > diff --git a/Documentation/intro/install/dpdk.rst > b/Documentation/intro/install/dpdk.rst > index 612f2fdbc..92d1c8119 100644 > --- a/Documentation/intro/install/dpdk.rst > +++ b/Documentation/intro/install/dpdk.rst > @@ -290,8 +290,7 @@ listed below. Defaults will be provided for all values > not explicitly set. > > ``dpdk-socket-mem`` >Comma separated list of memory to pre-allocate from hugepages on specific > - sockets. If not specified, 1024 MB will be set for each numa node by > - default. > + sockets. If not specified, this option will not be set by default. > > ``dpdk-hugepage-dir`` >Directory where hugetlbfs is mounted > diff --git a/NEWS b/NEWS > index f02f07cdf..6245b28d2 100644 > --- a/NEWS > +++ b/NEWS > @@ -22,6 +22,8 @@ Post-v2.15.0 > Available only if DPDK experimantal APIs enabled during the build. > * Add hardware offload support for VXLAN flows (experimental). > Available only if DPDK experimantal APIs enabled during the build. > + * EAL option --socket-mem is no longer configured by default upon > + start-up. > - ovsdb-tool: > * New option '--election-timer' to the 'create-cluster' command to set > the > leader election timer during cluster creation. > diff --git a/lib/dpdk.c b/lib/dpdk.c > index 2eaaa569c..1c128fca3 100644 > --- a/lib/dpdk.c > +++ b/lib/dpdk.c > @@ -167,7 +167,7 @@ construct_dpdk_mutex_options(const struct smap > *ovs_other_config, > {"memory type", > {"dpdk-alloc-mem", "dpdk-socket-mem", NULL,}, > {"-m", "--socket-mem",NULL,}, > - default_dpdk_socket_mem, 1 > + NULL, 0 ^ I think the indentation here is incorrect It's probably best to remove the default_dpdk_socket_mem variable and construct_dpdk_socket_mem function, as well. They will have no more in-tree users. > }, > }; > > diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml > index 4597a215d..52fd52ce6 100644 > --- a/vswitchd/vswitch.xml > +++ b/vswitchd/vswitch.xml > @@ -362,8 +362,8 @@ >preallocate 2048MB and socket 3 (no value given) to preallocate > 0MB. > > > - If dpdk-socket-mem and dpdk-alloc-mem are not specified, > dpdk-socket-mem > - will be used and the default value is 1024 for each numa node. If > + If dpdk-socket-mem and dpdk-alloc-mem are not specified, neither > + will be used and there is no default value for each numa node. If >dpdk-socket-mem and dpdk-alloc-mem are specified at same time, >dpdk-socket-mem will be used as default. Changing this value >requires restarting the daemon. ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH 1/2] dpdk: Remove default values for socket-mem and limit.
On Wed, Jun 30, 2021 at 4:48 PM Rosemarie O'Riorden wrote: > > From: Rosemarie O'Riorden > > This change removes the default values for EAL args socket-mem and > socket-limit. As DPDK supports dynamic memory allocation, there is no > need to allocate a certain amount of memory on start-up, nor limit the > amount of memory available, if not requested. > > Currently, socket-mem has a default value of 1024 when it is not > configured by the user, and socket-limit takes on the value of socket-mem, > 1024, by default. With this change, socket-mem is not configured by default, > meaning that socket-limit is not either. Neither, either or both options can > be set. > > Reported at: https://bugzilla.redhat.com/show_bug.cgi?id=1949850 > Signed-off-by: Rosemarie O'Riorden > --- > Documentation/intro/install/dpdk.rst | 3 +-- > NEWS | 2 ++ > lib/dpdk.c | 2 +- > vswitchd/vswitch.xml | 4 ++-- > 4 files changed, 6 insertions(+), 5 deletions(-) > > diff --git a/Documentation/intro/install/dpdk.rst > b/Documentation/intro/install/dpdk.rst > index 612f2fdbc..92d1c8119 100644 > --- a/Documentation/intro/install/dpdk.rst > +++ b/Documentation/intro/install/dpdk.rst > @@ -290,8 +290,7 @@ listed below. Defaults will be provided for all values > not explicitly set. > > ``dpdk-socket-mem`` >Comma separated list of memory to pre-allocate from hugepages on specific > - sockets. If not specified, 1024 MB will be set for each numa node by > - default. > + sockets. If not specified, this option will not be set by default. > > ``dpdk-hugepage-dir`` >Directory where hugetlbfs is mounted > diff --git a/NEWS b/NEWS > index f02f07cdf..6245b28d2 100644 > --- a/NEWS > +++ b/NEWS > @@ -22,6 +22,8 @@ Post-v2.15.0 > Available only if DPDK experimantal APIs enabled during the build. > * Add hardware offload support for VXLAN flows (experimental). > Available only if DPDK experimantal APIs enabled during the build. > + * EAL option --socket-mem is no longer configured by default upon > + start-up. > - ovsdb-tool: > * New option '--election-timer' to the 'create-cluster' command to set > the > leader election timer during cluster creation. > diff --git a/lib/dpdk.c b/lib/dpdk.c > index 2eaaa569c..1c128fca3 100644 > --- a/lib/dpdk.c > +++ b/lib/dpdk.c > @@ -167,7 +167,7 @@ construct_dpdk_mutex_options(const struct smap > *ovs_other_config, > {"memory type", > {"dpdk-alloc-mem", "dpdk-socket-mem", NULL,}, > {"-m", "--socket-mem",NULL,}, > - default_dpdk_socket_mem, 1 > + NULL, 0 Just nit-picking. Changing from default_dpdk_socket_mem to NULL is sort of redundant given that you already set default_option to 0. No reason to change it. But if you are going to remove it might as well remove declaration and initialization as well > }, > }; > > diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml > index 4597a215d..52fd52ce6 100644 > --- a/vswitchd/vswitch.xml > +++ b/vswitchd/vswitch.xml > @@ -362,8 +362,8 @@ >preallocate 2048MB and socket 3 (no value given) to preallocate > 0MB. > > > - If dpdk-socket-mem and dpdk-alloc-mem are not specified, > dpdk-socket-mem > - will be used and the default value is 1024 for each numa node. If > + If dpdk-socket-mem and dpdk-alloc-mem are not specified, neither > + will be used and there is no default value for each numa node. If >dpdk-socket-mem and dpdk-alloc-mem are specified at same time, >dpdk-socket-mem will be used as default. Changing this value >requires restarting the daemon. > -- > 2.31.1 > ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev