Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jun 2014 08:09:41 +0000 (UTC)
From:      Alexander Motin <mav@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: r267571 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201406170809.s5H89fXs031396@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Jun 17 08:09:40 2014
New Revision: 267571
URL: http://svnweb.freebsd.org/changeset/base/267571

Log:
  MFC r267029, r267038:
  Replace gethrtime() with cpu_ticks(), as source of random for the taskqueue
  selection.  gethrtime() in our port updated with HZ rate, so unusable for
  this specific purpose, completely draining benefit of multiple taskqueues.

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Tue Jun 17 08:02:50 2014	(r267570)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Tue Jun 17 08:09:40 2014	(r267571)
@@ -953,7 +953,11 @@ spa_taskq_dispatch_ent(spa_t *spa, zio_t
 	if (tqs->stqs_count == 1) {
 		tq = tqs->stqs_taskq[0];
 	} else {
+#ifdef _KERNEL
+		tq = tqs->stqs_taskq[cpu_ticks() % tqs->stqs_count];
+#else
 		tq = tqs->stqs_taskq[gethrtime() % tqs->stqs_count];
+#endif
 	}
 
 	taskq_dispatch_ent(tq, func, arg, flags, ent);



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