All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: Julia Lawall <Julia.Lawall@inria.fr>,
	Nicolas Palix <nicolas.palix@imag.fr>
Cc: cocci@inria.fr, linux-kernel@vger.kernel.org
Subject: [cocci] [PATCH 0/3] coccinelle: improve performance of mini_lock, double_lock and minmax
Date: Sat, 25 Jul 2026 20:32:38 +0900	[thread overview]
Message-ID: <20260725113303.691676-1-ekffu200098@gmail.com> (raw)

mini_lock, double_lock and minmax spend most of their time
searching files that have nothing to report. This series collects
the candidates first and runs the expensive rules only when one
exists.

For mini_lock and double_lock this also restores lost coverage.
For example, kernel/bpf/verifier.c exceeded the 200 second timeout
set by .cocciconfig, and coccicheck silently skipped the file.

The benchmark environment and command are as follows.
- AMD Ryzen 7 8845HS, 16 threads, 32 GiB RAM
- Ubuntu 24.04, spatch 1.1.1
- spatch -D report --very-quiet --no-includes --include-headers --cocci-file <script> <file>
  - timeout 200 is added for the whole tree runs

              kernel/bpf/verifier.c    whole tree
  mini_lock   812s -> 2.6s             1.5h -> 1.4h
  double_lock 12.2s -> 0.9s            2.0h -> 1.6h
  minmax      9.0s -> 1.7s             10.2h -> 5.5h

A report-mode run over every .c file in the tree produces
identical output for each script.

No functional change.

Sang-Heon Jeon (3):
  coccinelle: mini_lock: improve performance when searching loops
  coccinelle: double_lock: improve performance when no double lock
    exists
  coccinelle: misc: minmax: improve performance when no candidate exists

 scripts/coccinelle/locks/double_lock.cocci | 15 +++++++++++++-
 scripts/coccinelle/locks/mini_lock.cocci   | 24 ++++++++++++++++++++--
 scripts/coccinelle/misc/minmax.cocci       | 24 +++++++++++++++++-----
 3 files changed, 55 insertions(+), 8 deletions(-)

-- 
2.43.0


WARNING: multiple messages have this Message-ID (diff)
From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: Julia Lawall <Julia.Lawall@inria.fr>,
	Nicolas Palix <nicolas.palix@imag.fr>
Cc: cocci@inria.fr, linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] coccinelle: improve performance of mini_lock, double_lock and minmax
Date: Sat, 25 Jul 2026 20:32:38 +0900	[thread overview]
Message-ID: <20260725113303.691676-1-ekffu200098@gmail.com> (raw)

mini_lock, double_lock and minmax spend most of their time
searching files that have nothing to report. This series collects
the candidates first and runs the expensive rules only when one
exists.

For mini_lock and double_lock this also restores lost coverage.
For example, kernel/bpf/verifier.c exceeded the 200 second timeout
set by .cocciconfig, and coccicheck silently skipped the file.

The benchmark environment and command are as follows.
- AMD Ryzen 7 8845HS, 16 threads, 32 GiB RAM
- Ubuntu 24.04, spatch 1.1.1
- spatch -D report --very-quiet --no-includes --include-headers --cocci-file <script> <file>
  - timeout 200 is added for the whole tree runs

              kernel/bpf/verifier.c    whole tree
  mini_lock   812s -> 2.6s             1.5h -> 1.4h
  double_lock 12.2s -> 0.9s            2.0h -> 1.6h
  minmax      9.0s -> 1.7s             10.2h -> 5.5h

A report-mode run over every .c file in the tree produces
identical output for each script.

No functional change.

Sang-Heon Jeon (3):
  coccinelle: mini_lock: improve performance when searching loops
  coccinelle: double_lock: improve performance when no double lock
    exists
  coccinelle: misc: minmax: improve performance when no candidate exists

 scripts/coccinelle/locks/double_lock.cocci | 15 +++++++++++++-
 scripts/coccinelle/locks/mini_lock.cocci   | 24 ++++++++++++++++++++--
 scripts/coccinelle/misc/minmax.cocci       | 24 +++++++++++++++++-----
 3 files changed, 55 insertions(+), 8 deletions(-)

-- 
2.43.0


             reply	other threads:[~2026-07-25 11:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-25 11:32 Sang-Heon Jeon [this message]
2026-07-25 11:32 ` [PATCH 0/3] coccinelle: improve performance of mini_lock, double_lock and minmax Sang-Heon Jeon
2026-07-25 11:32 ` [cocci] [PATCH 1/3] coccinelle: mini_lock: improve performance when searching loops Sang-Heon Jeon
2026-07-25 11:32   ` Sang-Heon Jeon
2026-07-25 11:32 ` [cocci] [PATCH 2/3] coccinelle: double_lock: improve performance when no double lock exists Sang-Heon Jeon
2026-07-25 11:32   ` Sang-Heon Jeon
2026-07-25 11:32 ` [cocci] [PATCH 3/3] coccinelle: misc: minmax: improve performance when no candidate exists Sang-Heon Jeon
2026-07-25 11:32   ` Sang-Heon Jeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260725113303.691676-1-ekffu200098@gmail.com \
    --to=ekffu200098@gmail.com \
    --cc=Julia.Lawall@inria.fr \
    --cc=cocci@inria.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.palix@imag.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.