On 20/01/2025 16:05, Eelco Chaudron wrote:
>
>
> On 15 Jan 2025, at 10:20, Roi Dayan via dev wrote:
>
>> Allow to set oom-score with --oom-score argument.
>> This argument can be set in ovs config file.
>> In rhel can set OPTIONS in /etc/sysconfig/openvswitch.
>> In debian can set OVS_CTL_OPTS in /etc/default/openvswitch-switch.
>>
>> Signed-off-by: Roi Dayan <[email protected]>
>> Acked-by: Eli Britstein <[email protected]>
>> ---
>
> One small nit below, but I guess we also need to update the ovs-ctl.8.rst
> file.
sure. thanks.
i see there is a missmatch of more args appearing there and not here or here
but not there. for a different commit to fix.
>
> //Eelco
>
>> utilities/ovs-ctl.in | 2 ++
>> utilities/ovs-lib.in | 4 ++++
>> 2 files changed, 6 insertions(+)
>>
>> diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
>> index 57abd3a5b45b..7521ae629c1d 100644
>> --- a/utilities/ovs-ctl.in
>> +++ b/utilities/ovs-ctl.in
>> @@ -350,6 +350,7 @@ set_defaults () {
>> OVS_VSWITCHD_OPTIONS=
>> OVSDB_SERVER_UMASK=
>> OVS_VSWITCHD_UMASK=
>> + OOM_SCORE=
>>
>> DB_FILE=$dbdir/conf.db
>> DB_SOCK=$rundir/db.sock
>> @@ -429,6 +430,7 @@ Other important options for "start", "restart" and
>> "force-reload-kmod":
>> --ovs-vswitchd-umask=MODE Set umask prior to run ovs-vswitchd daemon.
>> This is useful to manage daemon's sockets
>> permissions.
>> Default is not to change umask (inherited from
>> shell).
>> + --oom-score=SCORE Set oom-score after starting ovs daemon.
>
> I would move this to the less important options section below.
>>
>> Less important options for "start", "restart" and "force-reload-kmod":
>> --daemon-cwd=DIR set working dir for OVS daemons (default:
>> $DAEMON_CWD)
>> diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in
>> index d162227dc5e5..dded0b7c7dca 100644
>> --- a/utilities/ovs-lib.in
>> +++ b/utilities/ovs-lib.in
>> @@ -236,6 +236,10 @@ start_daemon () {
>> umask "$previuos_umask_value"
>> fi
>>
>> + if test X"$OOM_SCORE" != X; then
>> + echo "$OOM_SCORE" > /proc/`cat $rundir/$daemon.pid`/oom_score_adj
>> 2>/dev/null
>> + fi
>> +
>> if test X"$strace" != X; then
>> # Strace doesn't have the -D option so we attach after the fact.
>> setsid $strace -o "$logdir/$daemon.strace.log" \
>> --
>> 2.21.0
>>
>> _______________________________________________
>> dev mailing list
>> [email protected]
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev