Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2017 17:15:40 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r316709 - stable/11/sys/geom/mirror
Message-ID:  <201704111715.v3BHFeHq049181@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Tue Apr 11 17:15:39 2017
New Revision: 316709
URL: https://svnweb.freebsd.org/changeset/base/316709

Log:
  MFC r316175:
  Avoid sleeping when the mirror I/O queue is non-empty.

Modified:
  stable/11/sys/geom/mirror/g_mirror.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/geom/mirror/g_mirror.c
==============================================================================
--- stable/11/sys/geom/mirror/g_mirror.c	Tue Apr 11 17:13:56 2017	(r316708)
+++ stable/11/sys/geom/mirror/g_mirror.c	Tue Apr 11 17:15:39 2017	(r316709)
@@ -1894,6 +1894,10 @@ g_mirror_worker(void *arg)
 					kproc_exit(0);
 				}
 				mtx_lock(&sc->sc_queue_mtx);
+				if (bioq_first(&sc->sc_queue) != NULL) {
+					mtx_unlock(&sc->sc_queue_mtx);
+					continue;
+				}
 			}
 			sx_xunlock(&sc->sc_lock);
 			/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704111715.v3BHFeHq049181>