Date: Mon, 08 Dec 2025 14:17:45 +0000 From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: e4e7b5840f97 - stable/15 - rc.subr: Remove misguided cpuset usage Message-ID: <6936de09.2eed7.6577f819@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e4e7b5840f97d7ee7963f8a4d3fc30ad0ad802af commit e4e7b5840f97d7ee7963f8a4d3fc30ad0ad802af Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-11-17 16:45:44 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-12-08 14:14:58 +0000 rc.subr: Remove misguided cpuset usage When running an rc command, if the target rc script defines <command>_cmd, e.g., start_cmd=..., then the run_rc_command() executes that instead of $command. In general it's a shell function, and "cpuset -l <n> <shell function>" doesn't work. Moreover, it doesn't really make sense to run cpuset for anything other than start_cmd. Other optional isolation mechanisms (e.g., <name>_fib, <name>_chroot) are only used when invoking $command directly as part of the "start" command. Make <name>_cpuset consistent with everything else by removing these extraneous cpuset invocations. Reviewed by: 0mp MFC after: 2 weeks Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53746 (cherry picked from commit 71f6592a01506899efd91306b6d8147f14a6b219) --- libexec/rc/rc.subr | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index ec4970c8db94..c8060c87eb6e 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1365,7 +1365,7 @@ run_rc_command() _run_rc_precmd || return 1 fi if ! checkyesno ${name}_svcj; then - _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || return 1 + _run_rc_doit "$_cmd $rc_extra_args" || return 1 else case "$rc_arg" in start) @@ -1394,7 +1394,7 @@ run_rc_command() name=svcj-${name} && _return=0 fi else - _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1 + _run_rc_doit "$_cmd $rc_extra_args" || _return=1 fi ;; stop) @@ -1402,7 +1402,7 @@ run_rc_command() $SERVICE -E _rc_svcj=jailing -j svcj-${name} ${name} ${_rc_prefix}stop $rc_extra_args || _return=1 $JAIL_CMD -r svcj-${name} 2>/dev/null else - _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1 + _run_rc_doit "$_cmd $rc_extra_args" || _return=1 fi ;; restart|status) ;; # no special case needed for svcj or handled somewhere else @@ -1412,7 +1412,7 @@ run_rc_command() if checkyesno _rc_svcj_extra_cmd && [ "${_rc_svcj}" != jailing ]; then $SERVICE -v -E _rc_svcj=jailing -j svcj-${name} ${name} ${_rc_prefix}${rc_arg} $rc_extra_args || _return=1 else - _run_rc_doit "$_cpusetcmd $_cmd $rc_extra_args" || _return=1 + _run_rc_doit "$_cmd $rc_extra_args" || _return=1 fi ;; esac
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6936de09.2eed7.6577f819>
