svn commit: r262168 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Alexander Motin
mav at FreeBSD.org
Tue Feb 18 14:58:38 UTC 2014
Author: mav
Date: Tue Feb 18 14:58:37 2014
New Revision: 262168
URL: http://svnweb.freebsd.org/changeset/base/262168
Log:
MFC r260236:
In dmu_zfetch_stream_reclaim() replace division with multiplication and
move it out of the loop and lock.
Modified:
stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c
Directory Properties:
stable/9/ (props changed)
stable/9/sys/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Tue Feb 18 14:56:44 2014 (r262167)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c Tue Feb 18 14:58:37 2014 (r262168)
@@ -604,14 +604,16 @@ static zstream_t *
dmu_zfetch_stream_reclaim(zfetch_t *zf)
{
zstream_t *zs;
+ clock_t ticks;
+ ticks = zfetch_min_sec_reap * hz;
if (! rw_tryenter(&zf->zf_rwlock, RW_WRITER))
return (0);
for (zs = list_head(&zf->zf_stream); zs;
zs = list_next(&zf->zf_stream, zs)) {
- if (((ddi_get_lbolt() - zs->zst_last)/hz) > zfetch_min_sec_reap)
+ if (ddi_get_lbolt() - zs->zst_last > ticks)
break;
}
More information about the svn-src-stable-9
mailing list