From: Sumera Priyadarsini Date: Sun, 11 Oct 2020 10:29:42 +0000 (+0530) Subject: scripts: coccicheck: Change default condition for parallelism X-Git-Tag: v5.10.7~1380^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5864560d935db879cafa21feca0156d91eba842;p=platform%2Fkernel%2Flinux-rpi.git scripts: coccicheck: Change default condition for parallelism Currently, Coccinelle uses at most one thread per core by default in machines with more than 2 hyperthreads. However, for systems with only 4 hyperthreads, this does not improve performance. Modify coccicheck to use all available threads in machines with upto 4 hyperthreads. Signed-off-by: Sumera Priyadarsini Signed-off-by: Julia Lawall --- diff --git a/scripts/coccicheck b/scripts/coccicheck index d67907b..209bb04 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck @@ -79,7 +79,7 @@ else THREADS_PER_CORE=$(lscpu | grep "Thread(s) per core: " | tr -cd "[:digit:]") if [ -z "$J" ]; then NPROC=$(getconf _NPROCESSORS_ONLN) - if [ $THREADS_PER_CORE -gt 1 -a $NPROC -gt 2 ] ; then + if [ $THREADS_PER_CORE -gt 1 -a $NPROC -gt 4 ] ; then NPROC=$((NPROC/2)) fi else