diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-30 21:03:32 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 11:47:38 -0500 |
commit | 011173321f6fb36f47c3aaaf04218bf758b29e17 (patch) | |
tree | 139d8ac4fde351e503d87251c67e5f2083d5b671 /fs/bcachefs/six.h | |
parent | ee841b77b3bfc3443112b1be53ca23d522b82333 (diff) | |
download | linux-011173321f6fb36f47c3aaaf04218bf758b29e17.tar.gz linux-011173321f6fb36f47c3aaaf04218bf758b29e17.tar.bz2 linux-011173321f6fb36f47c3aaaf04218bf758b29e17.zip |
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/six.h')
-rw-r--r-- | fs/bcachefs/six.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/bcachefs/six.h b/fs/bcachefs/six.h index 4c268b0b8316..a7104ac1d35c 100644 --- a/fs/bcachefs/six.h +++ b/fs/bcachefs/six.h @@ -127,10 +127,6 @@ #include <linux/sched.h> #include <linux/types.h> -#ifdef CONFIG_SIX_LOCK_SPIN_ON_OWNER -#include <linux/osq_lock.h> -#endif - enum six_lock_type { SIX_LOCK_read, SIX_LOCK_intent, @@ -143,9 +139,6 @@ struct six_lock { unsigned intent_lock_recurse; struct task_struct *owner; unsigned __percpu *readers; -#ifdef CONFIG_SIX_LOCK_SPIN_ON_OWNER - struct optimistic_spin_queue osq; -#endif raw_spinlock_t wait_lock; struct list_head wait_list; #ifdef CONFIG_DEBUG_LOCK_ALLOC |