1 // SPDX-License-Identifier: GPL-2.0-or-later
3 #include <linux/compiler.h>
4 #include <linux/export.h>
5 #include <linux/percpu.h>
6 #include <linux/processor.h>
8 #include <linux/topology.h>
9 #include <linux/sched/clock.h>
10 #include <asm/qspinlock.h>
11 #include <asm/paravirt.h>
17 struct qspinlock
*lock
;
19 u8 sleepy
; /* 1 if the previous vCPU was preempted or
20 * if the previous node was sleepy */
21 u8 locked
; /* 1 if lock acquired */
26 struct qnode nodes
[MAX_NODES
];
29 /* Tuning parameters */
30 static int steal_spins __read_mostly
= (1 << 5);
31 static int remote_steal_spins __read_mostly
= (1 << 2);
32 #if _Q_SPIN_TRY_LOCK_STEAL == 1
33 static const bool maybe_stealers
= true;
35 static bool maybe_stealers __read_mostly
= true;
37 static int head_spins __read_mostly
= (1 << 8);
39 static bool pv_yield_owner __read_mostly
= true;
40 static bool pv_yield_allow_steal __read_mostly
= false;
41 static bool pv_spin_on_preempted_owner __read_mostly
= false;
42 static bool pv_sleepy_lock __read_mostly
= true;
43 static bool pv_sleepy_lock_sticky __read_mostly
= false;
44 static u64 pv_sleepy_lock_interval_ns __read_mostly
= 0;
45 static int pv_sleepy_lock_factor __read_mostly
= 256;
46 static bool pv_yield_prev __read_mostly
= true;
47 static bool pv_yield_sleepy_owner __read_mostly
= true;
48 static bool pv_prod_head __read_mostly
= false;
50 static DEFINE_PER_CPU_ALIGNED(struct qnodes
, qnodes
);
51 static DEFINE_PER_CPU_ALIGNED(u64
, sleepy_lock_seen_clock
);
53 #if _Q_SPIN_SPEC_BARRIER == 1
54 #define spec_barrier() do { asm volatile("ori 31,31,0" ::: "memory"); } while (0)
56 #define spec_barrier() do { } while (0)
59 static __always_inline
bool recently_sleepy(void)
61 /* pv_sleepy_lock is true when this is called */
62 if (pv_sleepy_lock_interval_ns
) {
63 u64 seen
= this_cpu_read(sleepy_lock_seen_clock
);
66 u64 delta
= sched_clock() - seen
;
67 if (delta
< pv_sleepy_lock_interval_ns
)
69 this_cpu_write(sleepy_lock_seen_clock
, 0);
76 static __always_inline
int get_steal_spins(bool paravirt
, bool sleepy
)
78 if (paravirt
&& sleepy
)
79 return steal_spins
* pv_sleepy_lock_factor
;
84 static __always_inline
int get_remote_steal_spins(bool paravirt
, bool sleepy
)
86 if (paravirt
&& sleepy
)
87 return remote_steal_spins
* pv_sleepy_lock_factor
;
89 return remote_steal_spins
;
92 static __always_inline
int get_head_spins(bool paravirt
, bool sleepy
)
94 if (paravirt
&& sleepy
)
95 return head_spins
* pv_sleepy_lock_factor
;
100 static inline u32
encode_tail_cpu(int cpu
)
102 return (cpu
+ 1) << _Q_TAIL_CPU_OFFSET
;
105 static inline int decode_tail_cpu(u32 val
)
107 return (val
>> _Q_TAIL_CPU_OFFSET
) - 1;
110 static inline int get_owner_cpu(u32 val
)
112 return (val
& _Q_OWNER_CPU_MASK
) >> _Q_OWNER_CPU_OFFSET
;
116 * Try to acquire the lock if it was not already locked. If the tail matches
117 * mytail then clear it, otherwise leave it unchnaged. Return previous value.
119 * This is used by the head of the queue to acquire the lock and clean up
120 * its tail if it was the last one queued.
122 static __always_inline u32
trylock_clean_tail(struct qspinlock
*lock
, u32 tail
)
124 u32 newval
= queued_spin_encode_locked_val();
128 "1: lwarx %0,0,%2,%7 # trylock_clean_tail \n"
129 /* This test is necessary if there could be stealers */
132 /* Test whether the lock tail == mytail */
135 /* Merge the new locked value */
138 /* If the lock tail matched, then clear it, otherwise leave it. */
140 "2: stwcx. %1,0,%2 \n"
142 "\t" PPC_ACQUIRE_BARRIER
" \n"
144 : "=&r" (prev
), "=&r" (tmp
)
145 : "r" (&lock
->val
), "r"(tail
), "r" (newval
),
147 "r" (_Q_TAIL_CPU_MASK
),
148 "i" (_Q_SPIN_EH_HINT
)
155 * Publish our tail, replacing previous tail. Return previous value.
157 * This provides a release barrier for publishing node, this pairs with the
158 * acquire barrier in get_tail_qnode() when the next CPU finds this tail
161 static __always_inline u32
publish_tail_cpu(struct qspinlock
*lock
, u32 tail
)
168 "\t" PPC_RELEASE_BARRIER
" \n"
169 "1: lwarx %0,0,%2 # publish_tail_cpu \n"
174 : "=&r" (prev
), "=&r"(tmp
)
175 : "r" (&lock
->val
), "r" (tail
), "r"(_Q_TAIL_CPU_MASK
)
181 static __always_inline u32
set_mustq(struct qspinlock
*lock
)
186 "1: lwarx %0,0,%1 # set_mustq \n"
191 : "r" (&lock
->val
), "r" (_Q_MUST_Q_VAL
)
197 static __always_inline u32
clear_mustq(struct qspinlock
*lock
)
202 "1: lwarx %0,0,%1 # clear_mustq \n"
207 : "r" (&lock
->val
), "r" (_Q_MUST_Q_VAL
)
213 static __always_inline
bool try_set_sleepy(struct qspinlock
*lock
, u32 old
)
216 u32
new = old
| _Q_SLEEPY_VAL
;
218 BUG_ON(!(old
& _Q_LOCKED_VAL
));
219 BUG_ON(old
& _Q_SLEEPY_VAL
);
222 "1: lwarx %0,0,%1 # try_set_sleepy \n"
229 : "r" (&lock
->val
), "r"(old
), "r" (new)
232 return likely(prev
== old
);
235 static __always_inline
void seen_sleepy_owner(struct qspinlock
*lock
, u32 val
)
237 if (pv_sleepy_lock
) {
238 if (pv_sleepy_lock_interval_ns
)
239 this_cpu_write(sleepy_lock_seen_clock
, sched_clock());
240 if (!(val
& _Q_SLEEPY_VAL
))
241 try_set_sleepy(lock
, val
);
245 static __always_inline
void seen_sleepy_lock(void)
247 if (pv_sleepy_lock
&& pv_sleepy_lock_interval_ns
)
248 this_cpu_write(sleepy_lock_seen_clock
, sched_clock());
251 static __always_inline
void seen_sleepy_node(void)
253 if (pv_sleepy_lock
) {
254 if (pv_sleepy_lock_interval_ns
)
255 this_cpu_write(sleepy_lock_seen_clock
, sched_clock());
256 /* Don't set sleepy because we likely have a stale val */
260 static struct qnode
*get_tail_qnode(struct qspinlock
*lock
, int prev_cpu
)
262 struct qnodes
*qnodesp
= per_cpu_ptr(&qnodes
, prev_cpu
);
266 * After publishing the new tail and finding a previous tail in the
267 * previous val (which is the control dependency), this barrier
268 * orders the release barrier in publish_tail_cpu performed by the
269 * last CPU, with subsequently looking at its qnode structures
272 smp_acquire__after_ctrl_dep();
274 for (idx
= 0; idx
< MAX_NODES
; idx
++) {
275 struct qnode
*qnode
= &qnodesp
->nodes
[idx
];
276 if (qnode
->lock
== lock
)
283 /* Called inside spin_begin(). Returns whether or not the vCPU was preempted. */
284 static __always_inline
bool __yield_to_locked_owner(struct qspinlock
*lock
, u32 val
, bool paravirt
, bool mustq
)
288 bool preempted
= false;
290 BUG_ON(!(val
& _Q_LOCKED_VAL
));
298 owner
= get_owner_cpu(val
);
299 yield_count
= yield_count_of(owner
);
301 if ((yield_count
& 1) == 0)
302 goto relax
; /* owner vcpu is running */
306 seen_sleepy_owner(lock
, val
);
310 * Read the lock word after sampling the yield count. On the other side
311 * there may a wmb because the yield count update is done by the
312 * hypervisor preemption and the value update by the OS, however this
313 * ordering might reduce the chance of out of order accesses and
314 * improve the heuristic.
318 if (READ_ONCE(lock
->val
) == val
) {
321 yield_to_preempted(owner
, yield_count
);
326 /* Don't relax if we yielded. Maybe we should? */
336 /* Called inside spin_begin(). Returns whether or not the vCPU was preempted. */
337 static __always_inline
bool yield_to_locked_owner(struct qspinlock
*lock
, u32 val
, bool paravirt
)
339 return __yield_to_locked_owner(lock
, val
, paravirt
, false);
342 /* Called inside spin_begin(). Returns whether or not the vCPU was preempted. */
343 static __always_inline
bool yield_head_to_locked_owner(struct qspinlock
*lock
, u32 val
, bool paravirt
)
347 if ((val
& _Q_MUST_Q_VAL
) && pv_yield_allow_steal
)
350 return __yield_to_locked_owner(lock
, val
, paravirt
, mustq
);
353 static __always_inline
void propagate_sleepy(struct qnode
*node
, u32 val
, bool paravirt
)
360 if (!pv_yield_sleepy_owner
)
363 next
= READ_ONCE(node
->next
);
370 owner
= get_owner_cpu(val
);
371 if (vcpu_is_preempted(owner
))
375 /* Called inside spin_begin() */
376 static __always_inline
bool yield_to_prev(struct qspinlock
*lock
, struct qnode
*node
, int prev_cpu
, bool paravirt
)
379 bool preempted
= false;
384 if (!pv_yield_sleepy_owner
)
388 * If the previous waiter was preempted it might not be able to
389 * propagate sleepy to us, so check the lock in that case too.
391 if (node
->sleepy
|| vcpu_is_preempted(prev_cpu
)) {
392 u32 val
= READ_ONCE(lock
->val
);
394 if (val
& _Q_LOCKED_VAL
) {
395 if (node
->next
&& !node
->next
->sleepy
) {
397 * Propagate sleepy to next waiter. Only if
398 * owner is preempted, which allows the queue
399 * to become "non-sleepy" if vCPU preemption
400 * ceases to occur, even if the lock remains
403 if (vcpu_is_preempted(get_owner_cpu(val
)))
404 node
->next
->sleepy
= 1;
407 preempted
= yield_to_locked_owner(lock
, val
, paravirt
);
411 node
->sleepy
= false;
418 yield_count
= yield_count_of(prev_cpu
);
419 if ((yield_count
& 1) == 0)
420 goto relax
; /* owner vcpu is running */
427 smp_rmb(); /* See __yield_to_locked_owner comment */
429 if (!READ_ONCE(node
->locked
)) {
430 yield_to_preempted(prev_cpu
, yield_count
);
442 static __always_inline
bool steal_break(u32 val
, int iters
, bool paravirt
, bool sleepy
)
444 if (iters
>= get_steal_spins(paravirt
, sleepy
))
447 if (IS_ENABLED(CONFIG_NUMA
) &&
448 (iters
>= get_remote_steal_spins(paravirt
, sleepy
))) {
449 int cpu
= get_owner_cpu(val
);
450 if (numa_node_id() != cpu_to_node(cpu
))
456 static __always_inline
bool try_to_steal_lock(struct qspinlock
*lock
, bool paravirt
)
458 bool seen_preempted
= false;
464 /* XXX: should spin_on_preempted_owner do anything here? */
468 /* Attempt to steal the lock */
471 bool preempted
= false;
473 val
= READ_ONCE(lock
->val
);
474 if (val
& _Q_MUST_Q_VAL
)
478 if (unlikely(!(val
& _Q_LOCKED_VAL
))) {
480 if (__queued_spin_trylock_steal(lock
))
484 preempted
= yield_to_locked_owner(lock
, val
, paravirt
);
487 if (paravirt
&& pv_sleepy_lock
) {
489 if (val
& _Q_SLEEPY_VAL
) {
492 } else if (recently_sleepy()) {
496 if (pv_sleepy_lock_sticky
&& seen_preempted
&&
497 !(val
& _Q_SLEEPY_VAL
)) {
498 if (try_set_sleepy(lock
, val
))
499 val
|= _Q_SLEEPY_VAL
;
504 seen_preempted
= true;
506 if (!pv_spin_on_preempted_owner
)
509 * pv_spin_on_preempted_owner don't increase iters
510 * while the owner is preempted -- we won't interfere
511 * with it by definition. This could introduce some
512 * latency issue if we continually observe preempted
513 * owners, but hopefully that's a rare corner case of
514 * a badly oversubscribed system.
519 } while (!steal_break(val
, iters
, paravirt
, sleepy
));
526 static __always_inline
void queued_spin_lock_mcs_queue(struct qspinlock
*lock
, bool paravirt
)
528 struct qnodes
*qnodesp
;
529 struct qnode
*next
, *node
;
531 bool seen_preempted
= false;
537 BUILD_BUG_ON(CONFIG_NR_CPUS
>= (1U << _Q_TAIL_CPU_BITS
));
539 qnodesp
= this_cpu_ptr(&qnodes
);
540 if (unlikely(qnodesp
->count
>= MAX_NODES
)) {
542 while (!queued_spin_trylock(lock
))
547 idx
= qnodesp
->count
++;
549 * Ensure that we increment the head node->count before initialising
550 * the actual node. If the compiler is kind enough to reorder these
551 * stores, then an IRQ could overwrite our assignments.
554 node
= &qnodesp
->nodes
[idx
];
557 node
->cpu
= smp_processor_id();
561 tail
= encode_tail_cpu(node
->cpu
);
564 * Assign all attributes of a node before it can be published.
565 * Issues an lwsync, serving as a release barrier, as well as a
568 old
= publish_tail_cpu(lock
, tail
);
571 * If there was a previous node; link it and wait until reaching the
572 * head of the waitqueue.
574 if (old
& _Q_TAIL_CPU_MASK
) {
575 int prev_cpu
= decode_tail_cpu(old
);
576 struct qnode
*prev
= get_tail_qnode(lock
, prev_cpu
);
578 /* Link @node into the waitqueue. */
579 WRITE_ONCE(prev
->next
, node
);
581 /* Wait for mcs node lock to be released */
583 while (!READ_ONCE(node
->locked
)) {
586 if (yield_to_prev(lock
, node
, prev_cpu
, paravirt
))
587 seen_preempted
= true;
592 smp_rmb(); /* acquire barrier for the mcs lock */
595 * Generic qspinlocks have this prefetch here, but it seems
596 * like it could cause additional line transitions because
597 * the waiter will keep loading from it.
599 if (_Q_SPIN_PREFETCH_NEXT
) {
600 next
= READ_ONCE(node
->next
);
606 /* We're at the head of the waitqueue, wait for the lock. */
612 val
= READ_ONCE(lock
->val
);
613 if (!(val
& _Q_LOCKED_VAL
))
617 if (paravirt
&& pv_sleepy_lock
&& maybe_stealers
) {
619 if (val
& _Q_SLEEPY_VAL
) {
622 } else if (recently_sleepy()) {
626 if (pv_sleepy_lock_sticky
&& seen_preempted
&&
627 !(val
& _Q_SLEEPY_VAL
)) {
628 if (try_set_sleepy(lock
, val
))
629 val
|= _Q_SLEEPY_VAL
;
633 propagate_sleepy(node
, val
, paravirt
);
634 preempted
= yield_head_to_locked_owner(lock
, val
, paravirt
);
639 seen_preempted
= true;
641 if (paravirt
&& preempted
) {
644 if (!pv_spin_on_preempted_owner
)
650 if (!mustq
&& iters
>= get_head_spins(paravirt
, sleepy
)) {
653 val
|= _Q_MUST_Q_VAL
;
659 /* If we're the last queued, must clean up the tail. */
660 old
= trylock_clean_tail(lock
, tail
);
661 if (unlikely(old
& _Q_LOCKED_VAL
)) {
662 BUG_ON(!maybe_stealers
);
663 goto again
; /* Can only be true if maybe_stealers. */
666 if ((old
& _Q_TAIL_CPU_MASK
) == tail
)
667 goto release
; /* We were the tail, no next. */
669 /* There is a next, must wait for node->next != NULL (MCS protocol) */
670 next
= READ_ONCE(node
->next
);
673 while (!(next
= READ_ONCE(node
->next
)))
680 * Unlock the next mcs waiter node. Release barrier is not required
681 * here because the acquirer is only accessing the lock word, and
682 * the acquire barrier we took the lock with orders that update vs
683 * this store to locked. The corresponding barrier is the smp_rmb()
684 * acquire barrier for mcs lock, above.
686 if (paravirt
&& pv_prod_head
) {
687 int next_cpu
= next
->cpu
;
688 WRITE_ONCE(next
->locked
, 1);
690 asm volatile("miso" ::: "memory");
691 if (vcpu_is_preempted(next_cpu
))
694 WRITE_ONCE(next
->locked
, 1);
696 asm volatile("miso" ::: "memory");
701 * Clear the lock before releasing the node, as another CPU might see stale
702 * values if an interrupt occurs after we increment qnodesp->count
703 * but before node->lock is initialized. The barrier ensures that
704 * there are no further stores to the node after it has been released.
711 void queued_spin_lock_slowpath(struct qspinlock
*lock
)
714 * This looks funny, but it induces the compiler to inline both
715 * sides of the branch rather than share code as when the condition
716 * is passed as the paravirt argument to the functions.
718 if (IS_ENABLED(CONFIG_PARAVIRT_SPINLOCKS
) && is_shared_processor()) {
719 if (try_to_steal_lock(lock
, true)) {
723 queued_spin_lock_mcs_queue(lock
, true);
725 if (try_to_steal_lock(lock
, false)) {
729 queued_spin_lock_mcs_queue(lock
, false);
732 EXPORT_SYMBOL(queued_spin_lock_slowpath
);
734 #ifdef CONFIG_PARAVIRT_SPINLOCKS
735 void pv_spinlocks_init(void)
740 #include <linux/debugfs.h>
741 static int steal_spins_set(void *data
, u64 val
)
743 #if _Q_SPIN_TRY_LOCK_STEAL == 1
744 /* MAYBE_STEAL remains true */
747 static DEFINE_MUTEX(lock
);
750 * The lock slow path has a !maybe_stealers case that can assume
751 * the head of queue will not see concurrent waiters. That waiter
752 * is unsafe in the presence of stealers, so must keep them away
757 if (val
&& !steal_spins
) {
758 maybe_stealers
= true;
759 /* wait for queue head waiter to go away */
762 } else if (!val
&& steal_spins
) {
764 /* wait for all possible stealers to go away */
766 maybe_stealers
= false;
776 static int steal_spins_get(void *data
, u64
*val
)
783 DEFINE_SIMPLE_ATTRIBUTE(fops_steal_spins
, steal_spins_get
, steal_spins_set
, "%llu\n");
785 static int remote_steal_spins_set(void *data
, u64 val
)
787 remote_steal_spins
= val
;
792 static int remote_steal_spins_get(void *data
, u64
*val
)
794 *val
= remote_steal_spins
;
799 DEFINE_SIMPLE_ATTRIBUTE(fops_remote_steal_spins
, remote_steal_spins_get
, remote_steal_spins_set
, "%llu\n");
801 static int head_spins_set(void *data
, u64 val
)
808 static int head_spins_get(void *data
, u64
*val
)
815 DEFINE_SIMPLE_ATTRIBUTE(fops_head_spins
, head_spins_get
, head_spins_set
, "%llu\n");
817 static int pv_yield_owner_set(void *data
, u64 val
)
819 pv_yield_owner
= !!val
;
824 static int pv_yield_owner_get(void *data
, u64
*val
)
826 *val
= pv_yield_owner
;
831 DEFINE_SIMPLE_ATTRIBUTE(fops_pv_yield_owner
, pv_yield_owner_get
, pv_yield_owner_set
, "%llu\n");
833 static int pv_yield_allow_steal_set(void *data
, u64 val
)
835 pv_yield_allow_steal
= !!val
;
840 static int pv_yield_allow_steal_get(void *data
, u64
*val
)
842 *val
= pv_yield_allow_steal
;
847 DEFINE_SIMPLE_ATTRIBUTE(fops_pv_yield_allow_steal
, pv_yield_allow_steal_get
, pv_yield_allow_steal_set
, "%llu\n");
849 static int pv_spin_on_preempted_owner_set(void *data
, u64 val
)
851 pv_spin_on_preempted_owner
= !!val
;
856 static int pv_spin_on_preempted_owner_get(void *data
, u64
*val
)
858 *val
= pv_spin_on_preempted_owner
;
863 DEFINE_SIMPLE_ATTRIBUTE(fops_pv_spin_on_preempted_owner
, pv_spin_on_preempted_owner_get
, pv_spin_on_preempted_owner_set
, "%llu\n");
865 static int pv_sleepy_lock_set(void *data
, u64 val
)
867 pv_sleepy_lock
= !!val
;
872 static int pv_sleepy_lock_get(void *data
, u64
*val
)
874 *val
= pv_sleepy_lock
;
879 DEFINE_SIMPLE_ATTRIBUTE(fops_pv_sleepy_lock
, pv_sleepy_lock_get
, pv_sleepy_lock_set
, "%llu\n");
881 static int pv_sleepy_lock_sticky_set(void *data
, u64 val
)
883 pv_sleepy_lock_sticky
= !!val
;
888 static int pv_sleepy_lock_sticky_get(void *data
, u64
*val
)
890 *val
= pv_sleepy_lock_sticky
;
895 DEFINE_SIMPLE_ATTRIBUTE(fops_pv_sleepy_lock_sticky
, pv_sleepy_lock_sticky_get
, pv_sleepy_lock_sticky_set
, "%llu\n");
897 static int pv_sleepy_lock_interval_ns_set(void *data
, u64 val
)
899 pv_sleepy_lock_interval_ns
= val
;
904 static int pv_sleepy_lock_interval_ns_get(void *data
, u64
*val
)
906 *val
= pv_sleepy_lock_interval_ns
;
911 DEFINE_SIMPLE_ATTRIBUTE(fops_pv_sleepy_lock_interval_ns
, pv_sleepy_lock_interval_ns_get
, pv_sleepy_lock_interval_ns_set
, "%llu\n");
913 static int pv_sleepy_lock_factor_set(void *data
, u64 val
)
915 pv_sleepy_lock_factor
= val
;
920 static int pv_sleepy_lock_factor_get(void *data
, u64
*val
)
922 *val
= pv_sleepy_lock_factor
;
927 DEFINE_SIMPLE_ATTRIBUTE(fops_pv_sleepy_lock_factor
, pv_sleepy_lock_factor_get
, pv_sleepy_lock_factor_set
, "%llu\n");
929 static int pv_yield_prev_set(void *data
, u64 val
)
931 pv_yield_prev
= !!val
;
936 static int pv_yield_prev_get(void *data
, u64
*val
)
938 *val
= pv_yield_prev
;
943 DEFINE_SIMPLE_ATTRIBUTE(fops_pv_yield_prev
, pv_yield_prev_get
, pv_yield_prev_set
, "%llu\n");
945 static int pv_yield_sleepy_owner_set(void *data
, u64 val
)
947 pv_yield_sleepy_owner
= !!val
;
952 static int pv_yield_sleepy_owner_get(void *data
, u64
*val
)
954 *val
= pv_yield_sleepy_owner
;
959 DEFINE_SIMPLE_ATTRIBUTE(fops_pv_yield_sleepy_owner
, pv_yield_sleepy_owner_get
, pv_yield_sleepy_owner_set
, "%llu\n");
961 static int pv_prod_head_set(void *data
, u64 val
)
963 pv_prod_head
= !!val
;
968 static int pv_prod_head_get(void *data
, u64
*val
)
975 DEFINE_SIMPLE_ATTRIBUTE(fops_pv_prod_head
, pv_prod_head_get
, pv_prod_head_set
, "%llu\n");
977 static __init
int spinlock_debugfs_init(void)
979 debugfs_create_file("qspl_steal_spins", 0600, arch_debugfs_dir
, NULL
, &fops_steal_spins
);
980 debugfs_create_file("qspl_remote_steal_spins", 0600, arch_debugfs_dir
, NULL
, &fops_remote_steal_spins
);
981 debugfs_create_file("qspl_head_spins", 0600, arch_debugfs_dir
, NULL
, &fops_head_spins
);
982 if (is_shared_processor()) {
983 debugfs_create_file("qspl_pv_yield_owner", 0600, arch_debugfs_dir
, NULL
, &fops_pv_yield_owner
);
984 debugfs_create_file("qspl_pv_yield_allow_steal", 0600, arch_debugfs_dir
, NULL
, &fops_pv_yield_allow_steal
);
985 debugfs_create_file("qspl_pv_spin_on_preempted_owner", 0600, arch_debugfs_dir
, NULL
, &fops_pv_spin_on_preempted_owner
);
986 debugfs_create_file("qspl_pv_sleepy_lock", 0600, arch_debugfs_dir
, NULL
, &fops_pv_sleepy_lock
);
987 debugfs_create_file("qspl_pv_sleepy_lock_sticky", 0600, arch_debugfs_dir
, NULL
, &fops_pv_sleepy_lock_sticky
);
988 debugfs_create_file("qspl_pv_sleepy_lock_interval_ns", 0600, arch_debugfs_dir
, NULL
, &fops_pv_sleepy_lock_interval_ns
);
989 debugfs_create_file("qspl_pv_sleepy_lock_factor", 0600, arch_debugfs_dir
, NULL
, &fops_pv_sleepy_lock_factor
);
990 debugfs_create_file("qspl_pv_yield_prev", 0600, arch_debugfs_dir
, NULL
, &fops_pv_yield_prev
);
991 debugfs_create_file("qspl_pv_yield_sleepy_owner", 0600, arch_debugfs_dir
, NULL
, &fops_pv_yield_sleepy_owner
);
992 debugfs_create_file("qspl_pv_prod_head", 0600, arch_debugfs_dir
, NULL
, &fops_pv_prod_head
);
997 device_initcall(spinlock_debugfs_init
);