From owner-freebsd-arch@FreeBSD.ORG Wed Jun 6 19:50:07 2012 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43C171065670; Wed, 6 Jun 2012 19:50:07 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id D355F8FC16; Wed, 6 Jun 2012 19:50:06 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id q56JjBx3036296 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Wed, 6 Jun 2012 13:45:12 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201206061423.53179.jhb@freebsd.org> Date: Wed, 6 Jun 2012 13:45:05 -0600 Content-Transfer-Encoding: 7bit Message-Id: <78461459-8D90-4AD1-9983-3522E4DA5816@bsdimp.com> References: <20120606165115.GQ85127@deviant.kiev.zoral.com.ua> <201206061423.53179.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Wed, 06 Jun 2012 13:45:13 -0600 (MDT) Cc: Konstantin Belousov , freebsd-arch@FreeBSD.org Subject: Re: Fast gettimeofday(2) and clock_gettime(2) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 19:50:07 -0000 On Jun 6, 2012, at 12:23 PM, John Baldwin wrote: > 2) You read tk->tk_boottime without the tk_current protection in your > non-uptime routines. This is racey as the kernel alters the > boottime when it skews time for large adjustments from ntp, etc. One of the 'etc' is leap seconds. Warner