Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Feb 2017 21:09:21 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314058 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201702212109.v1LL9Lr5077634@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Tue Feb 21 21:09:21 2017
New Revision: 314058
URL: https://svnweb.freebsd.org/changeset/base/314058

Log:
  zfs: lower priority of zio_write_issue threads by four
  
  The difference of one was insignificant because zio_write_issue threads
  ended up on the same run queues as other zio threads.
  See sys/priority.h and sys/runq.h for more details.
  
  Add a comment describing FreeBSD priority considerations and restore
  the illumos variant of the code for comparison.
  
  Obtained from:	Panzura
  MFC after:	2 weeks
  Sponsored by:	Panzura

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Tue Feb 21 21:06:12 2017	(r314057)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Tue Feb 21 21:09:21 2017	(r314058)
@@ -922,9 +922,17 @@ spa_taskqs_init(spa_t *spa, zio_type_t t
 			 * The write issue taskq can be extremely CPU
 			 * intensive.  Run it at slightly lower priority
 			 * than the other taskqs.
+			 * FreeBSD notes:
+			 * - numerically higher priorities are lower priorities;
+			 * - if priorities divided by four (RQ_PPQ) are equal
+			 *   then a difference between them is insignificant.
 			 */
 			if (t == ZIO_TYPE_WRITE && q == ZIO_TASKQ_ISSUE)
-				pri++;
+#ifdef illumos
+				pri--;
+#else
+				pri += 4;
+#endif
 
 			tq = taskq_create_proc(name, value, pri, 50,
 			    INT_MAX, spa->spa_proc, flags);



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