]> git.proxmox.com Git - mirror_spl.git/commit
Add new lock types MUTEX_NOLOCKDEP, and RW_NOLOCKDEP
authorOlaf Faaland <faaland1@llnl.gov>
Tue, 6 Oct 2015 21:01:46 +0000 (14:01 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sat, 12 Dec 2015 00:18:54 +0000 (16:18 -0800)
commit692ae8d3981e4ef20c0cd0cc229ec31753d220a6
tree8316514ae61bdff0b2097595485dd7a5abb530df
parent61bbbd9a775a5517af513e5014edbdd73a32f7e4
Add new lock types MUTEX_NOLOCKDEP, and RW_NOLOCKDEP

When running a kernel with CONFIG_LOCKDEP=y, lockdep reports possible
recursive locking in some cases and possible circular locking dependency
in others, within the SPL and ZFS modules.

When lockdep detects these conditions, it disables further lock analysis
for all locks.  This causes /proc/lock_stats not to reflect full
information about lock contention, even in locks without dependency
issues.

This commit creates a new type of mutex, MUTEX_NOLOCKDEP.  This mutex
type causes subsequent attempts to take or release those locks to be
wrapped in lockdep_off() and lockdep_on().

This commit also creates an RW_NOLOCKDEP type analagous to
MUTEX_NOLOCKDEP.

MUTEX_NOLOCKDEP and RW_NOLOCKDEP are also defined in zfs, in a commit to
that repo, for userspace builds.

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #480
include/sys/mutex.h
include/sys/rwlock.h