Skip to content

Commit c586456

Browse files
SylfrenaJuliaLawall
authored andcommitted
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>
1 parent 2f324dd commit c586456

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/coccicheck

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ else
7979
THREADS_PER_CORE=$(lscpu | grep "Thread(s) per core: " | tr -cd "[:digit:]")
8080
if [ -z "$J" ]; then
8181
NPROC=$(getconf _NPROCESSORS_ONLN)
82-
if [ $THREADS_PER_CORE -gt 1 -a $NPROC -gt 2 ] ; then
82+
if [ $THREADS_PER_CORE -gt 1 -a $NPROC -gt 4 ] ; then
8383
NPROC=$((NPROC/2))
8484
fi
8585
else

0 commit comments

Comments
 (0)