Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jul 2016 21:56:34 +0000 (UTC)
From:      "Conrad E. Meyer" <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r302678 - head/sys/dev/ioat
Message-ID:  <201607122156.u6CLuYsP028689@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Tue Jul 12 21:56:34 2016
New Revision: 302678
URL: https://svnweb.freebsd.org/changeset/base/302678

Log:
  ioat(4): Don't shrink ring if active

Modified:
  head/sys/dev/ioat/ioat.c

Modified: head/sys/dev/ioat/ioat.c
==============================================================================
--- head/sys/dev/ioat/ioat.c	Tue Jul 12 21:52:26 2016	(r302677)
+++ head/sys/dev/ioat/ioat.c	Tue Jul 12 21:56:34 2016	(r302678)
@@ -1682,7 +1682,8 @@ ioat_shrink_timer_callback(void *arg)
 	}
 
 	order = ioat->ring_size_order;
-	if (ioat->is_resize_pending || order == IOAT_MIN_ORDER) {
+	if (ioat->is_completion_pending || ioat->is_resize_pending ||
+	    order == IOAT_MIN_ORDER) {
 		mtx_unlock(&ioat->submit_lock);
 		goto out;
 	}
@@ -1696,8 +1697,10 @@ ioat_shrink_timer_callback(void *arg)
 	KASSERT(ioat->ring_size_order == order,
 	    ("resize_pending protects order"));
 
-	if (newring != NULL)
+	if (newring != NULL && !ioat->is_completion_pending)
 		ring_shrink(ioat, order, newring);
+	else if (newring != NULL)
+		ioat_free_ring(ioat, (1 << (order - 1)), newring);
 
 	ioat->is_resize_pending = FALSE;
 	mtx_unlock(&ioat->submit_lock);



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