summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorbryanv <bryanv@FreeBSD.org>2014-10-08 04:07:07 +0000
committerbryanv <bryanv@FreeBSD.org>2014-10-08 04:07:07 +0000
commit69c5e8194e6aed53f9cff14f3a3491f09fab7fb3 (patch)
treec8ed488507c10e11dc823d86e2e1b7f840d5d906 /sys/vm
parent56f2d3397754ce603217961b02ec83965af862d4 (diff)
downloadFreeBSD-src-69c5e8194e6aed53f9cff14f3a3491f09fab7fb3.zip
FreeBSD-src-69c5e8194e6aed53f9cff14f3a3491f09fab7fb3.tar.gz
MFC 272550:
Remove stray uma_mtx lock/unlock in zone_drain_wait() Callers of zone_drain_wait(M_WAITOK) do not need to hold (and were not) the uma_mtx, but we would attempt to unlock and relock the mutex if we had to sleep because the zone was already draining. The M_NOWAIT callers may hold the uma_mtx, but we do not sleep in that case.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/uma_core.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index 0c28c18..f327d22 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -898,9 +898,7 @@ zone_drain_wait(uma_zone_t zone, int waitok)
while (zone->uz_flags & UMA_ZFLAG_DRAINING) {
if (waitok == M_NOWAIT)
goto out;
- mtx_unlock(&uma_mtx);
msleep(zone, zone->uz_lockptr, PVM, "zonedrain", 1);
- mtx_lock(&uma_mtx);
}
zone->uz_flags |= UMA_ZFLAG_DRAINING;
bucket_cache_drain(zone);
OpenPOWER on IntegriCloud