]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
devclass_alloc_unit: move "at" hint test to after device-in-use test
authorAdam Fenn <adam@fenn.io>
Mon, 2 Aug 2021 16:27:17 +0000 (11:27 -0500)
committerKyle Evans <kevans@FreeBSD.org>
Fri, 27 Aug 2021 01:10:58 +0000 (20:10 -0500)
commitedcdb6d19e1b03170a6ba37f45e23ef64b5d8d1d
treeec0c9f1a53390047582cba27e9ade5471355c3a5
parentd7d2f810f8a9a21282803bf886705656f1af26c3
devclass_alloc_unit: move "at" hint test to after device-in-use test

Only perform this expensive operation when the unit number is a
potential candidate (i.e. not already in use), thereby reducing device
scan time on systems with many devices, unit numbers, and drivers.

Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
X-NetApp-PR: #61

(cherry picked from commit 8ca384eb1d429aae866f53abfadafc71ab009dc6)
sys/kern/subr_bus.c