Date: Sun, 5 Oct 2014 03:18:31 +0000 (UTC) From: Bryan Venteicher <bryanv@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272550 - head/sys/vm Message-ID: <201410050318.s953IVbq002183@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bryanv Date: Sun Oct 5 03:18:30 2014 New Revision: 272550 URL: https://svnweb.freebsd.org/changeset/base/272550 Log: 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. Reviewed by: jhb MFC after: 3 days Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sun Oct 5 02:52:54 2014 (r272549) +++ head/sys/vm/uma_core.c Sun Oct 5 03:18:30 2014 (r272550) @@ -897,9 +897,7 @@ zone_drain_wait(uma_zone_t zone, int wai 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410050318.s953IVbq002183>