summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-03-24 22:13:00 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2021-03-24 22:13:00 -0400
commitc88113e255c449bee983e6456b9c5ee24426e166 (patch)
treebc905a85747f58087254f730c395a48023ff4913 /include/linux
parent9f69a652dc33611db3c4a3d4ebda00a3ff8b3ca6 (diff)
Update bcachefs sources to ad68801b93 bcachefs: Use pcpu mode of six locks for interior nodes
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/six.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/six.h b/include/linux/six.h
index a16e94f4..0e6df059 100644
--- a/include/linux/six.h
+++ b/include/linux/six.h
@@ -80,7 +80,8 @@ union six_lock_state {
};
struct {
- unsigned read_lock:28;
+ unsigned read_lock:27;
+ unsigned write_locking:1;
unsigned intent_lock:1;
unsigned waiters:3;
/*
@@ -107,6 +108,7 @@ struct six_lock {
unsigned intent_lock_recurse;
struct task_struct *owner;
struct optimistic_spin_queue osq;
+ unsigned __percpu *readers;
raw_spinlock_t wait_lock;
struct list_head wait_list[2];
@@ -194,4 +196,7 @@ void six_lock_increment(struct six_lock *, enum six_lock_type);
void six_lock_wakeup_all(struct six_lock *);
+void six_lock_pcpu_free(struct six_lock *);
+void six_lock_pcpu_alloc(struct six_lock *);
+
#endif /* _LINUX_SIX_H */