Date: Tue, 18 Feb 2014 14:58:38 +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-9@freebsd.org Subject: svn commit: r262168 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201402181458.s1IEwcHj096678@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402181458.s1IEwcHj096678>