[ovs-dev] [PATCH ovn 2/2] ovn-macros.at: Enable northd parallelization

Mark Michelson mmichels at redhat.com
Wed Jun 16 20:56:50 UTC 2021


For this and patch 1:

Acked-by: Mark Michelson <mmichels at redhat.com>

I have a small question below that may or may not require a change to 
the series. If a change is needed, it's so small that it's not worth 
having you upload a new version of the patch. Whoever merges this series 
can make the change.

On 6/15/21 6:33 PM, Fabrizio D'Angelo wrote:
> - Add NORTHD_USE_PARALLELIZATION variable to enable it in ovn_start.
> 
> - Add NORTHD_DUMMY_NUMA variable for passing --dummy-numa flag when
>    tests are run in a low CPU system.
> 
> Signed-off-by: Fabrizio D'Angelo <fdangelo at redhat.com>
> ---
>   tests/ovn-macros.at | 40 +++++++++++++++++++++++++++++++++++++++-
>   1 file changed, 39 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at
> index cd02b6986..1e9b47537 100644
> --- a/tests/ovn-macros.at
> +++ b/tests/ovn-macros.at
> @@ -170,6 +170,10 @@ ovn_start_northd() {
>           ovn-northd-ddlog) northd_args="$northd_args --ddlog-record=${AZ:+$AZ/}northd$suffix/replay.dat -v" ;;
>       esac
>   
> +    if test X$NORTHD_DUMMY_NUMA = Xyes; then
> +        northd_args="$northd_args --dummy-numa=\"0,0,1,1\""
> +    fi
> +
>       local name=${d_prefix}northd${suffix}
>       echo "${prefix}starting $name"
>       test -d "$ovs_base/$name" || mkdir "$ovs_base/$name"
> @@ -184,7 +188,7 @@ ovn_start_northd() {
>   # ovn-sbctl and ovn-nbctl use them by default, and starts ovn-northd running
>   # against them.
>   #
> -# Normally this starts an active northd and a backup norhtd.  The following
> +# Normally this starts an active northd and a backup northd.  The following
>   # options are accepted to adjust that:
>   #   --backup-northd=none    Don't start a backup northd.
>   #   --backup-northd=paused  Start the backup northd in the paused state.
> @@ -246,6 +250,10 @@ ovn_start () {
>       if test X$NORTHD_USE_DP_GROUPS = Xyes; then
>           ovn-nbctl set NB_Global . options:use_logical_dp_groups=true
>       fi
> +
> +    if test X$NORTHD_USE_PARALLELIZATION = Xyes; then
> +        ovn-nbctl set NB_Global . options:use_parallel_build=true
> +    fi
>   }
>   
>   # Interconnection networks.
> @@ -558,3 +566,33 @@ m4_define([OVN_FOR_EACH_NORTHD_WITHOUT_DP_GROUPS],
>     [m4_foreach([NORTHD_TYPE], [ovn-northd, ovn-northd-ddlog],
>        [m4_foreach([NORTHD_USE_DP_GROUPS], [no], [$1
>   ])])])
> +
> +# Test parallelization with dp groups enabled and disabled
> +m4_define([OVN_NORTHD_PARALLELIZATION_DUMMY], [
> +m4_pushdef([NORTHD_TYPE], [ovn_northd])
> +m4_pushdef(NORTHD_DUMMY_NUMA, [yes])
> +[m4_foreach([NORTHD_USE_DP_GROUPS], [yes, no],
> +    [[NORTHD_USE_PARALLELIZATION], [yes]
> +])]])
> +
> +m4_define([OVN_NORTHD_PARALLELIZATION_NO_DUMMY], [
> +m4_pushdef([NORTHD_TYPE], [ovn_northd])
> +m4_pushdef(NORTHD_DUMMY_NUMA, [yes])
> +[m4_foreach([NORTHD_USE_DP_GROUPS], [yes, no],
> +    [[NORTHD_USE_PARALLELIZATION], [yes]
> +])]])
> +
> +# Use --dummy-numa if system has low cores
> +m4_define([HOST_HAS_LOW_CORES], [
> +    if test $(nproc) -le 4; then

Shouldn't this be -lt instead of -le?

> +        :
> +        $1
> +    else
> +        :
> +        $2
> +    fi
> +])
> +
> +m4_define([NORTHD_PARALLELIZATION], [
> +    HOST_HAS_LOW_CORES([OVN_NORTHD_PARALLELIZATION_DUMMY], [OVN_NORTHD_PARALLELIZATION_NO_DUMMY])
> +])
> 



More information about the dev mailing list