]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r368116: kern: cpuset: drop the lock to allocate domainsets
authorKyle Evans <kevans@FreeBSD.org>
Fri, 4 Dec 2020 02:18:40 +0000 (02:18 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Fri, 4 Dec 2020 02:18:40 +0000 (02:18 +0000)
commit99fafc4b1b7971cd5b6fd16faac894778685b1ab
tree0480fc8a7cabd382717775157e49bf07420418a6
parent8dab523fe8c6d925b3bc348e1282235676b987a3
MFC r368116: kern: cpuset: drop the lock to allocate domainsets

Restructure the loop a little bit to make it a little more clear how it
really operates: we never allocate any domains at the beginning of the first
iteration, and it will run until we've satisfied the amount we need or we
encounter an error.

The lock is now taken outside of the loop to make stuff inside the loop
easier to evaluate w.r.t. locking.

This fixes it to not try and allocate any domains for the freelist under the
spinlock, which would have happened before if we needed any new domains.
sys/kern/kern_cpuset.c