diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-03-30 10:01:09 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-04-20 09:39:06 +0200 |
commit | 36cf5b220e8b5f191342d13ed2d069d2bbca77d5 (patch) | |
tree | 5d249a5cbfdce77212e1006887781088718a3fe0 | |
parent | b2e24c55ef8dd7d0b45ea43eb7615a836f06aaf6 (diff) | |
download | ptxdist-36cf5b220e8b5f191342d13ed2d069d2bbca77d5.tar.gz ptxdist-36cf5b220e8b5f191342d13ed2d069d2bbca77d5.tar.xz |
[ptxdist] add option to modify scheduling priority (nice)
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rwxr-xr-x | bin/ptxdist | 11 | ||||
-rw-r--r-- | scripts/libptxdist.sh | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index 674ed1d3a..e8a33db9b 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -836,6 +836,9 @@ Options: --load-average=<n>, -l<n> try to limit load to <n> + --nice=<n>, -n<n> run with reduced scheduling priority (i.e. nice) + (default = 10) + -k keep going. Continue as much as possible after an error. @@ -1299,6 +1302,14 @@ parse_first() --load-average=*) PTXDIST_LOADMFLAGS_INTERN="-l${arg#*=}" ;; + -n*) + PTX_NICE="${arg#*n}" + PTX_NICE="${PTX_NICE:-10}" + ;; + --nice=*) + PTX_NICE="${arg#*=}" + PTX_NICE="${PTX_NICE:-10}" + ;; -q|--quiet) PTXDIST_QUIET=1 ;; diff --git a/scripts/libptxdist.sh b/scripts/libptxdist.sh index 8e12f8f55..6af6aaaa3 100644 --- a/scripts/libptxdist.sh +++ b/scripts/libptxdist.sh @@ -344,7 +344,7 @@ ptxd_make() { for lib in "${SCRIPTSDIR}/lib/ptxd_make_"*.sh; do source "${lib}" || ptxd_bailout "failed to source lib: ${lib}" done - "${PTXCONF_SETUP_HOST_MAKE}" \ + ${PTX_NICE:+nice -n ${PTX_NICE}} "${PTXCONF_SETUP_HOST_MAKE}" \ "${PTX_MAKE_ARGS[@]}" "${PTXDIST_PARALLELMFLAGS_EXTERN}" \ -f "${RULESDIR}/other/Toplevel.make" "${@}" || return } |