Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

six locks: Lock contended tracepoints

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>

+6 -2
+6 -2
fs/bcachefs/six.c
··· 11 11 #include <linux/sched/task.h> 12 12 #include <linux/slab.h> 13 13 14 + #include <trace/events/lock.h> 15 + 14 16 #include "six.h" 15 17 16 18 #ifdef DEBUG ··· 464 462 smp_mb__after_atomic(); 465 463 } 466 464 465 + trace_contention_begin(lock, 0); 466 + lock_contended(&lock->dep_map, ip); 467 + 467 468 if (six_optimistic_spin(lock, type)) 468 469 goto out; 469 - 470 - lock_contended(&lock->dep_map, ip); 471 470 472 471 wait->task = current; 473 472 wait->lock_want = type; ··· 549 546 six_clear_bitmask(lock, SIX_LOCK_HELD_write); 550 547 six_lock_wakeup(lock, atomic_read(&lock->state), SIX_LOCK_read); 551 548 } 549 + trace_contention_end(lock, 0); 552 550 553 551 return ret; 554 552 }