[PATCH -perfbook 2/5] CodeSamples/formal/herd/Makefile: Add KLITMUS7_EXTRAOPTS variable

Akira Yokosawa <[email protected]> Sat, 27 Dec 2025 17:41:23 +0900
Newsgroups org.kernel.vger.perfbook
Message-ID <[email protected]>
klitmus tests involving RCU, expecially with unconditional
rcu_synchronize(), tend to take much longer these days even with the
default "-expedited true" klitmus7 option.
Remove explicit "-rcu yes" from klitmus7's command arg and add a
variable KLITMUS7_EXTRAOPTS so that those tests can be added by saying:

    make KLITMUS7_EXTRAOPTS='-rcu yes' cross-klitmus7

Signed-off-by: Akira Yokosawa <[email protected]>
---
 CodeSamples/formal/herd/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CodeSamples/formal/herd/Makefile b/CodeSamples/formal/herd/Makefile
index 959b8ed7..ba023d0d 100644
--- a/CodeSamples/formal/herd/Makefile
+++ b/CodeSamples/formal/herd/Makefile
@@ -114,7 +114,7 @@ cross-klitmus: klitmus.tar
 
 klitmus.tar: litmus2herd $(KLITMUS_TEST)
 	mkdir -p klitmus
-	klitmus7 -rcu yes -o klitmus $(LITMUS7_HERD_TEST) $(KLITMUS_TEST)
+	klitmus7 -o klitmus $(KLITMUS7_EXTRAOPTS) $(LITMUS7_HERD_TEST) $(KLITMUS_TEST)
 	tar cf klitmus.tar ./klitmus
 
 help:
@@ -124,6 +124,7 @@ help:
 	@echo "Other targets:"
 	@echo "    run-herd7:       Examine transformed litmus tests by herd7 with LKMM"
 	@echo "    cross-klitmus7:  Cross-compile transformed litmus tests by klitmus7"
+	@echo "        Say \"make KLITMUS7_EXTRAOPTS='-rcu yes' cross-klitmus7\" to include RCU tests."
 	@echo "    run-absperf:     Run memory model benchmark tests of absperf"
 	@echo "    run-absperf-all: Run all absperf tests (including those take quite a while)"
 	@echo "    run-dblcheck4:   Run C-double-check-rcu-4 (takes 20 mins or so)"
-- 
2.43.0