Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Oct 2017 16:16:27 +0000 (UTC)
From:      Ian Lepore <ian@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: r324756 - in stable/11/sys/cddl: compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201710191616.v9JGGR8W027044@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Thu Oct 19 16:16:26 2017
New Revision: 324756
URL: https://svnweb.freebsd.org/changeset/base/324756

Log:
  MFC r323985:
  
  Use nstosbt() instead of multiplying by SBT_1NS to avoid roundoff errors.
  
  Differential Revision:	https://reviews.freebsd.org/D11779

Modified:
  stable/11/sys/cddl/compat/opensolaris/sys/kcondvar.h
  stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cddl/compat/opensolaris/sys/kcondvar.h
==============================================================================
--- stable/11/sys/cddl/compat/opensolaris/sys/kcondvar.h	Thu Oct 19 16:07:57 2017	(r324755)
+++ stable/11/sys/cddl/compat/opensolaris/sys/kcondvar.h	Thu Oct 19 16:16:26 2017	(r324756)
@@ -63,13 +63,8 @@ static clock_t
 cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t tim, hrtime_t res,
     int flag)
 {
-	sbintime_t sbt;
-	sbintime_t pr;
 
-	sbt = tim * SBT_1NS;
-	pr = res * SBT_1NS;
-
-	return (cv_timedwait_sbt(cvp, mp, sbt, pr, 0));
+	return (cv_timedwait_sbt(cvp, mp, nstosbt(tim), nstosbt(res), 0));
 }
 
 #endif	/* _KERNEL */

Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
==============================================================================
--- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c	Thu Oct 19 16:07:57 2017	(r324755)
+++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c	Thu Oct 19 16:16:26 2017	(r324756)
@@ -806,8 +806,8 @@ dmu_tx_delay(dmu_tx_t *tx, uint64_t dirty)
 		continue;
 	mutex_exit(&curthread->t_delay_lock);
 #else
-	pause_sbt("dmu_tx_delay", wakeup * SBT_1NS,
-	    zfs_delay_resolution_ns * SBT_1NS, C_ABSOLUTE);
+	pause_sbt("dmu_tx_delay", nstosbt(wakeup),
+	    nstosbt(zfs_delay_resolution_ns), C_ABSOLUTE);
 #endif
 #else
 	hrtime_t delta = wakeup - gethrtime();



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