Date: Tue, 31 May 2011 12:07:30 -0700 From: David P Discher <dpd@bitgravity.com> To: Andriy Gapon <avg@FreeBSD.org> Cc: freebsd-fs@FreeBSD.org, Artem Belevich <art@FreeBSD.org> Subject: Re: ZFS: arc_reclaim_thread running 100%, 8.1-RELEASE, LBOLT related Message-ID: <C48BAB2B-5667-458D-86A1-8B48C4189560@bitgravity.com> In-Reply-To: <4DE51DD3.6040602@FreeBSD.org> References: <0EFD28CD-F2E9-4AE2-B927-1D327EC99DB9@bitgravity.com> <BANLkTikVq0-En7=4Dy_dTf=tM55Cqou_mw@mail.gmail.com> <4DE50811.5060606@FreeBSD.org> <BANLkTinQkS36SQKpZhsavx3C_ad838DG=g@mail.gmail.com> <4DE51DD3.6040602@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On May 31, 2011, at 9:56 AM, Andriy Gapon wrote: >>=20 >> FYI, we've already changed clock_t for opensolaris code to int64_t in >> r218169 regardless of $MACHINE. >=20 > I think that's a good solution. > I hope that we don't have any place where osol clock_t would somehow = mix with fbsd > clock_t with detrimental effects. Well, clock_t to int64_t only fixes l2arc_reclaim_thread. If you look at lines 1712-1725 in = sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c, the arc_evict(), = (8.1-release), you'll see that clock_t is not use. So, yes, clock_t = will fix the l2arc issue, but not the arc_reclaim/arc evict issue of the = signed 64bit int overflowing for LBOLT. And from the conversation on this thread, there isn't any agreement on = how to really fix it. Someone please explain to me the units of LBOLT? =20 hz is cycles per second right ? #define LBOLT ((gethrtime() * hz) / NANOSEC) gethrtime() is returning nanoseconds. How is LBOLT in ticks-per-second = ? In sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c : 152 /* number of seconds before growing cache again */ 153 static int arc_grow_retry =3D 60; ... 2255 /* reset the growth delay for every = reclaim */ 2256 growtime =3D LBOLT + (arc_grow_retry * = hz); LBOLT is then clearly using it math with ticks-per-second. I'm I just = crazy ? It seems to me that in this case, line 2256 ... can't be added = together.=20 --- David P. Discher dpd@bitgravity.com * AIM: bgDavidDPD BITGRAVITY * http://www.bitgravity.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C48BAB2B-5667-458D-86A1-8B48C4189560>