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
10951095 select DEBUG_SPINLOCK
10961096 select DEBUG_MUTEXES
10971097 select DEBUG_RT_MUTEXES if RT_MUTEXES
1098− select DEBUG_RWSEMS if RWSEM_SPIN_ON_OWNER
1098+ select DEBUG_RWSEMS
10991099 select DEBUG_WW_MUTEX_SLOWPATH
11001100 select DEBUG_LOCK_ALLOC
11011101 select TRACE_IRQFLAGS
@@ -1199,10 +1199,10 @@ config DEBUG_WW_MUTEX_SLOWPATH · 97 unmodified lines
11991199
12001200 config DEBUG_RWSEMS
12011201 bool "RW Semaphore debugging: basic checks"
1202− depends on DEBUG_KERNEL && RWSEM_SPIN_ON_OWNER
1202+ depends on DEBUG_KERNEL
12031203 help
1204− This debugging feature allows mismatched rw semaphore locks and unlocks
1205− to be detected and reported.
1204+ This debugging feature allows mismatched rw semaphore locks
1205+ and unlocks to be detected and reported.
12061206
12071207 config DEBUG_LOCK_ALLOC
12081208 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