提交 c5864560 编写于 作者: S Sumera Priyadarsini 提交者: Julia Lawall

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: NSumera Priyadarsini <sylphrenadin@gmail.com>
Signed-off-by: NJulia Lawall <Julia.Lawall@inria.fr>
上级 2f324dd8
...@@ -79,7 +79,7 @@ else ...@@ -79,7 +79,7 @@ else
THREADS_PER_CORE=$(lscpu | grep "Thread(s) per core: " | tr -cd "[:digit:]") THREADS_PER_CORE=$(lscpu | grep "Thread(s) per core: " | tr -cd "[:digit:]")
if [ -z "$J" ]; then if [ -z "$J" ]; then
NPROC=$(getconf _NPROCESSORS_ONLN) 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)) NPROC=$((NPROC/2))
fi fi
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册