devstat overhead VS precision

Konstantin Belousov kostikbel at gmail.com
Mon Apr 15 19:18:19 UTC 2013


On Mon, Apr 15, 2013 at 08:42:03PM +0200, Pawel Jakub Dawidek wrote:
> On a mostly unrelated note when two threads (T0 and T1) call get*time()
> on two different cores, but T0 does that a bit earlier is it possible
> that T0 can get later time than T1?

Define earlier first.

If you have taken sufficient measures to prevent preemption and interruption,
e.g. by entering spinlock before the fragment that calls get*, then no,
it is impossible, at least not with any x86 timekeeping hardware we use.

On the other hand, if interrupts are allowed, all bets are off.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20130415/5194b1cc/attachment.sig>


More information about the freebsd-geom mailing list