git: 2bdc89535a88 - main - amd64: bump sleepq hash size to 2048
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 30 Sep 2025 16:15:07 UTC
The branch main has been updated by mjg:
URL: https://cgit.FreeBSD.org/src/commit/?id=2bdc89535a8837347bb3b523715bba021dea4418
commit 2bdc89535a8837347bb3b523715bba021dea4418
Author: Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2025-09-30 14:06:48 +0000
Commit: Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2025-09-30 16:14:55 +0000
amd64: bump sleepq hash size to 2048
This is the most contended lock type during the first hour of -j 104 poudriere.
Drops significantly with the change.
Note there are suspicous acquires which most likely don't need to
happen, artificially exacerbating tehe problem..
---
sys/amd64/include/param.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/sys/amd64/include/param.h b/sys/amd64/include/param.h
index 5a9c3162e14c..0654bb9de790 100644
--- a/sys/amd64/include/param.h
+++ b/sys/amd64/include/param.h
@@ -150,6 +150,15 @@
(((va) >= kva_layout.dmap_low && (va) < kva_layout.dmap_high) || \
((va) >= kva_layout.km_low && (va) < kva_layout.km_high))
-#define SC_TABLESIZE 1024 /* Must be power of 2. */
+/*
+ * Must be power of 2.
+ *
+ * Perhaps should be autosized on boot based on found ncpus.
+ */
+#if MAXCPU > 256
+#define SC_TABLESIZE 2048
+#else
+#define SC_TABLESIZE 1024
+#endif
#endif /* !_AMD64_INCLUDE_PARAM_H_ */