freebsd-dev/sys/cddl/dev
Ryan Stone 6969ef6656 Correct a series of errors in the hand-rolled locking for drace_debug.c:
- Use spinlock_enter()/spinlock_exit() to prevent a thread holding a
  debug lock from being preempted to prevent other threads waiting
  on that lock from starvation.

- Handle the possibility of CPU migration in between the fetch of curcpu
  and the call to spinlock_enter() by saving curcpu in a local variable.

- Use memory barriers to prevent reordering of loads and stores of the
  data protected by the lock outside of the critical section

- Eliminate false sharing of the locks by moving them into the structures
  that they protect and aligning them to a cacheline boundary.

- Record the owning thread in the lock to make debugging future problems
  easier.

Reviewed by:	rpaulo (initial version)
MFC after:	2 weeks
2012-12-23 15:50:37 +00:00
..
cyclic Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
dtmalloc
dtrace Correct a series of errors in the hand-rolled locking for drace_debug.c: 2012-12-23 15:50:37 +00:00
fbt Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. 2011-11-07 06:44:47 +00:00
lockstat Implement DTrace for PowerPC. This includes both 32-bit and 64-bit. 2012-11-07 23:45:09 +00:00
profile Implement DTrace for PowerPC. This includes both 32-bit and 64-bit. 2012-11-07 23:45:09 +00:00
sdt Instead of only iterating over the set of known SDT probes when sdt.ko is 2012-03-27 15:07:43 +00:00
systrace Correct the types of the arguments to return probes of the syscall 2011-11-11 03:49:42 +00:00
prototype.c