]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Split gethrtime() and gethrtime_waitfree() and make the former use
authordelphij <delphij@FreeBSD.org>
Fri, 1 Aug 2014 22:33:23 +0000 (22:33 +0000)
committerdelphij <delphij@FreeBSD.org>
Fri, 1 Aug 2014 22:33:23 +0000 (22:33 +0000)
commit3582d4b4c2b42c1ec0bcb73779e4f08ec87cbf4d
treea848d992309674f4e665f6b9fb1464704355abc7
parent5cc59eee8a8d7dc40d5e6871e2dcde065a4bce83
Split gethrtime() and gethrtime_waitfree() and make the former use
nanouptime() instead of getnanouptime().  nanouptime(9) provides more
precise result at expense of being slower.

In r269223, gethrtime() is used as creation time of dbuf, which in turn
acts as portion of lookup key to maintain AVL invariant where there can
not be duplicate items.  Before this change, gethrtime() have preferred
better execution time by sacrificing precision, which may lead to panic
on busy systems with:

panic: avl_find() succeeded inside avl_add()

Reported by: allanjude, mav
PR: kern/192284
MFC after: 11 days
X-MFC-with: r269223
sys/cddl/compat/opensolaris/sys/time.h