]> 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>
Thu, 26 Aug 2021 17:28:38 +0000 (12:28 -0500)
commit453e51048a83b8b73706a8f8520ad7ce193c0f51
tree166001eb7e48e1a19f4c01a3e647de0bb2d5a3be
parent2cbe61a73d861810b3cee4da6464b0e01d1399ae
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