]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
devfs: introduce a per-dev lock to protect ->si_devsw
authormjg <mjg@FreeBSD.org>
Sat, 30 Nov 2019 16:46:19 +0000 (16:46 +0000)
committermjg <mjg@FreeBSD.org>
Sat, 30 Nov 2019 16:46:19 +0000 (16:46 +0000)
commitafeeba244b442c9a6ca3431938b8ac5e57f2061d
tree7a71b8844df00f07122582515c0b4f4c80bcbf04
parent7cd6d1bac3e226039ae067d7581c671c06066650
devfs: introduce a per-dev lock to protect ->si_devsw

This allows bumping threadcount without taking the global devmtx lock.

In particular this eliminates contention on said lock while using bhyve
with multiple vms.

Reviewed by: kib
Tested by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22548
sys/fs/devfs/devfs_devs.c
sys/fs/devfs/devfs_int.h
sys/kern/kern_conf.c
sys/kern/subr_witness.c