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

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

--4SFOXa2GPu3tIq4H
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Apr 15, 2013 at 10:18:15PM +0300, Konstantin Belousov wrote:
> 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?
>=20
> Define earlier first.
>=20
> If you have taken sufficient measures to prevent preemption and interrupt=
ion,
> 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.
>=20
> On the other hand, if interrupts are allowed, all bets are off.

So if we consider only one thread, it is not possible for it to obtain
time t0, be scheduled to different CPU and obtain t1 where t1 < t0?

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://mobter.com

--4SFOXa2GPu3tIq4H
Content-Type: application/pgp-signature

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

iEYEARECAAYFAlFsVvoACgkQForvXbEpPzQzzQCeOMrSkgTMbYMjl8If37USSBdT
c7wAn1w8SL3vUVYHUMHseuDWom7+klgb
=/CA5
-----END PGP SIGNATURE-----

--4SFOXa2GPu3tIq4H--



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