Explorar o código

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 <[email protected]>
Signed-off-by: Julia Lawall <[email protected]>
Sumera Priyadarsini %!s(int64=4) %!d(string=hai) anos
pai
achega
c5864560d9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      scripts/coccicheck

+ 1 - 1
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