From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FC95C433E7 for ; Mon, 12 Oct 2020 08:38:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 190E520757 for ; Mon, 12 Oct 2020 08:38:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726680AbgJLIiQ (ORCPT ); Mon, 12 Oct 2020 04:38:16 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:5416 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbgJLIiQ (ORCPT ); Mon, 12 Oct 2020 04:38:16 -0400 X-IronPort-AV: E=Sophos;i="5.77,366,1596492000"; d="scan'208";a="472083300" Received: from abo-173-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 10:38:14 +0200 Date: Mon, 12 Oct 2020 10:38:14 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Sumera Priyadarsini cc: Julia.Lawall@lip6.fr, michal.lkml@markovi.net, linux-doc@vger.kernel.org, Gilles.Muller@lip6.fr, corbet@lwn.net, nicolas.palix@imag.fr, linux-kernel@vger.kernel.org, cocci@systeme.lip6.fr Subject: Re: [Cocci] [PATCH v4 2/3] scripts: coccicheck: Change default condition for parallelism In-Reply-To: <13de95fe3959459ac9ae8c74d99eb7e3c5702a2d.1602410019.git.sylphrenadin@gmail.com> Message-ID: References: <13de95fe3959459ac9ae8c74d99eb7e3c5702a2d.1602410019.git.sylphrenadin@gmail.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Sun, 11 Oct 2020, Sumera Priyadarsini wrote: > 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 Applied, thanks. > --- > scripts/coccicheck | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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 > -- > 2.25.1 > > _______________________________________________ > Cocci mailing list > Cocci@systeme.lip6.fr > https://systeme.lip6.fr/mailman/listinfo/cocci >