svn commit: r272725 - stable/8/sys/vm

Bryan Venteicher bryanv at FreeBSD.org
Wed Oct 8 04:34:47 UTC 2014


Author: bryanv
Date: Wed Oct  8 04:34:46 2014
New Revision: 272725
URL: https://svnweb.freebsd.org/changeset/base/272725

Log:
  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.

Modified:
  stable/8/sys/vm/uma_core.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/vm/   (props changed)

Modified: stable/8/sys/vm/uma_core.c
==============================================================================
--- stable/8/sys/vm/uma_core.c	Wed Oct  8 04:25:17 2014	(r272724)
+++ stable/8/sys/vm/uma_core.c	Wed Oct  8 04:34:46 2014	(r272725)
@@ -761,9 +761,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_lock, PVM, "zonedrain", 1);
-		mtx_lock(&uma_mtx);
 	}
 	zone->uz_flags |= UMA_ZFLAG_DRAINING;
 	bucket_cache_drain(zone);


More information about the svn-src-all mailing list