History

locking/rwsem: Make owner available even if !CONFIG_RWSEM_SPIN_ON_OWNER

The owner field in the rw_semaphore structure is used primarily for optimistic spinning. However, identifying the rwsem owner can also be helpful in debugging as well as tracing locking related issues when analyzing crash dump. The owner field may also store state information that can be important to the operation of the rwsem. So the owner field is now made a permanent member of the rw_semaphore structure irrespective of CONFIG_RWSEM_SPIN_ON_OWNER.

Waiman Long committed 7 years ago

Commit c71fd891 parent 69d927b4 files · +10 −32Browse files

Showing the changes to lib (1 of 4 files). Show all

Unified · Split

lib/Kconfig.debug+4−4
@@ -1095,7 +1095,7 @@ config PROVE_LOCKING · 1094 unmodified lines
1095 select DEBUG_SPINLOCK1095 select DEBUG_SPINLOCK
1096 select DEBUG_MUTEXES1096 select DEBUG_MUTEXES
1097 select DEBUG_RT_MUTEXES if RT_MUTEXES1097 select DEBUG_RT_MUTEXES if RT_MUTEXES
1098 select DEBUG_RWSEMS if RWSEM_SPIN_ON_OWNER1098 select DEBUG_RWSEMS
1099 select DEBUG_WW_MUTEX_SLOWPATH1099 select DEBUG_WW_MUTEX_SLOWPATH
1100 select DEBUG_LOCK_ALLOC1100 select DEBUG_LOCK_ALLOC
1101 select TRACE_IRQFLAGS1101 select TRACE_IRQFLAGS
@@ -1199,10 +1199,10 @@ config DEBUG_WW_MUTEX_SLOWPATH · 97 unmodified lines
1199 1199
1200config DEBUG_RWSEMS1200config DEBUG_RWSEMS
1201 bool "RW Semaphore debugging: basic checks"1201 bool "RW Semaphore debugging: basic checks"
1202 depends on DEBUG_KERNEL && RWSEM_SPIN_ON_OWNER1202 depends on DEBUG_KERNEL
1203 help1203 help
1204 This debugging feature allows mismatched rw semaphore locks and unlocks1204 This debugging feature allows mismatched rw semaphore locks
1205 to be detected and reported.1205 and unlocks to be detected and reported.
1206 1206
1207config DEBUG_LOCK_ALLOC1207config DEBUG_LOCK_ALLOC
1208 bool "Lock debugging: detect incorrect freeing of live locks"1208 bool "Lock debugging: detect incorrect freeing of live locks"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t