aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2025-09-30 14:06:48 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2025-09-30 16:14:55 +0000
commit2bdc89535a8837347bb3b523715bba021dea4418 (patch)
tree437f667af9d58d3a0aa23ff6c21710d8f6c18c95
parentaa1afb69dcedfc68859815987c46997500f834c3 (diff)
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..
-rw-r--r--sys/amd64/include/param.h11
1 files changed, 10 insertions, 1 deletions
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_ */