Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Apr 2013 22:18:15 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        freebsd-hackers@FreeBSD.org, Alexander Motin <mav@FreeBSD.org>, freebsd-geom@FreeBSD.org
Subject:   Re: devstat overhead VS precision
Message-ID:  <20130415191815.GR2930@kib.kiev.ua>
In-Reply-To: <20130415184203.GA1839@garage.freebsd.pl>
References:  <51692C95.3010901@FreeBSD.org> <20130415184203.GA1839@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help

--6cExhHXXDEBW2NKZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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.

--6cExhHXXDEBW2NKZ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQIcBAEBAgAGBQJRbFJ2AAoJEJDCuSvBvK1B23MQAJEv7S5Z6HpuFZZEPrvvoFAJ
uoYC+eIVzmQ0tcf6BsCjhd0/hqwjzF34be8wtaAvJdzBoMgJ44RJci2bCl0NHM6L
Onwt6L8o4Tdx5gc6LzrERH78aCrpIBtOrg5y/oOr+9ecv4EKLuCm8xQf4SDQyY4F
qcteyKQOaWDyZkRZQ7FMH9FpRPHQ+1yVEWsyxoqLck4hASoE87/ogieWPr2/4RGg
jMzH8UFgdmnv3FgMZc+9ksHcZZctoOZt613O+LyVX6/vQwHubeefXcRbuGxnbE2h
1LAIlzIUWwm2H6LkWrqBM6TABu17vb1YPRgGtg8hE7Gfktd7QT31IZ3NL5IO9DRE
9esF9Ya32zrCcFOXZb/TkmC9RsdcjCwQHhK/VR1rUe6ZP3C5sq1yTWwMFG2GtXIv
zdMrqOlJO69Cw3efrMcPBtRY0U5b48KtOmLqK/ntuRjo7I1np4c+tXEdRpRgSJy3
+aVBJHijtId4jahvwN2+DswXw8gxhYRs692IuR+P5VSg+d5Il/NSve8RFj0SfCO1
SP4eY+MfDBbxQOoxGTjDVNNK9uRKRDAF/6Hx0zB/nvySXLDBMG9whmVXj4pYSFfL
dF310fGGxKiUGZ1vr/ESAPB220TNg1O0PS1nb0r9caJHWj+FK/7b4FdrCZi5Dspy
p7uuueUvPU+Ja9a5IF/V
=XPWU
-----END PGP SIGNATURE-----

--6cExhHXXDEBW2NKZ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130415191815.GR2930>