summaryrefslogtreecommitdiff
path: root/fs/bcachefs/Kconfig
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-10-30 21:03:32 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-01 11:47:38 -0500
commit011173321f6fb36f47c3aaaf04218bf758b29e17 (patch)
tree139d8ac4fde351e503d87251c67e5f2083d5b671 /fs/bcachefs/Kconfig
parentee841b77b3bfc3443112b1be53ca23d522b82333 (diff)
bcachefs: six locks: Simplify optimistic spinning
osq lock maintainers don't want it to be used outside of kernel/locking/ - but, we can do better. Since we have lock handoff signalled via waitlist entries, there's no reason for optimistic spinning to have to look at the lock at all - aside from checking lock-owner; we can just spin looking at our waitlist entry. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/Kconfig')
-rw-r--r--fs/bcachefs/Kconfig10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/bcachefs/Kconfig b/fs/bcachefs/Kconfig
index fddc7be58022..7d3ac9556c98 100644
--- a/fs/bcachefs/Kconfig
+++ b/fs/bcachefs/Kconfig
@@ -85,6 +85,16 @@ config BCACHEFS_NO_LATENCY_ACCT
help
This disables device latency tracking and time stats, only for performance testing
+config BCACHEFS_SIX_OPTIMISTIC_SPIN
+ bool "Optimistic spinning for six locks"
+ depends on BCACHEFS_FS
+ depends on SMP
+ default y
+ help
+ Instead of immediately sleeping when attempting to take a six lock that
+ is held by another thread, spin for a short while, as long as the
+ thread owning the lock is running.
+
config MEAN_AND_VARIANCE_UNIT_TEST
tristate "mean_and_variance unit tests" if !KUNIT_ALL_TESTS
depends on KUNIT