Skip to content

Commit

Permalink
scripts: coccicheck: Change default condition for parallelism
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sylfrena authored and JuliaLawall committed Oct 12, 2020
1 parent 2f324dd commit c586456
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/coccicheck
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c586456

Please sign in to comment.