From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 15 19:35:22 2013 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5F446D7D; Mon, 15 Apr 2013 19:35:22 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 2B1981625; Mon, 15 Apr 2013 19:35:21 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 7AA01229; Mon, 15 Apr 2013 21:31:41 +0200 (CEST) Date: Mon, 15 Apr 2013 21:37:30 +0200 From: Pawel Jakub Dawidek To: Konstantin Belousov Subject: Re: devstat overhead VS precision Message-ID: <20130415193730.GB1839@garage.freebsd.pl> References: <51692C95.3010901@FreeBSD.org> <20130415184203.GA1839@garage.freebsd.pl> <20130415191815.GR2930@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4SFOXa2GPu3tIq4H" Content-Disposition: inline In-Reply-To: <20130415191815.GR2930@kib.kiev.ua> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@FreeBSD.org, Alexander Motin , freebsd-geom@FreeBSD.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Apr 2013 19:35:22 -0000 --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--