diff options
author | Sumera Priyadarsini <sylphrenadin@gmail.com> | 2020-10-11 15:59:42 +0530 |
---|---|---|
committer | Julia Lawall <Julia.Lawall@lip6.fr> | 2020-10-12 10:37:56 +0200 |
commit | c5864560d935db879cafa21feca0156d91eba842 (patch) | |
tree | 333a8061c885f324a4fc6e54aaf42c6d9bd0ec28 | |
parent | 2f324dd8ab2e3d8b097f3eac6d380d1adbdbe6e6 (diff) | |
download | linux-c5864560d935db879cafa21feca0156d91eba842.tar.gz linux-c5864560d935db879cafa21feca0156d91eba842.tar.bz2 linux-c5864560d935db879cafa21feca0156d91eba842.zip |
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 <sylphrenadin@gmail.com>
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
-rwxr-xr-x | scripts/coccicheck | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/coccicheck b/scripts/coccicheck index d67907b8a38b..209bb0427b43 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 |