Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Oct 2014 04:07:08 +0000 (UTC)
From:      Bryan Venteicher <bryanv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r272722 - stable/10/sys/vm
Message-ID:  <201410080407.s984781T016730@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bryanv
Date: Wed Oct  8 04:07:07 2014
New Revision: 272722
URL: https://svnweb.freebsd.org/changeset/base/272722

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/10/sys/vm/uma_core.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/vm/uma_core.c
==============================================================================
--- stable/10/sys/vm/uma_core.c	Wed Oct  8 01:03:32 2014	(r272721)
+++ stable/10/sys/vm/uma_core.c	Wed Oct  8 04:07:07 2014	(r272722)
@@ -898,9 +898,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?201410080407.s984781T016730>