From owner-freebsd-current@FreeBSD.ORG Thu Dec 21 11:44:51 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F286016A40F for ; Thu, 21 Dec 2006 11:44:51 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout2.cac.washington.edu (mxout2.cac.washington.edu [140.142.33.4]) by mx1.freebsd.org (Postfix) with ESMTP id CF09C13C45F for ; Thu, 21 Dec 2006 11:44:51 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout2.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kBL3bute014020 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 20 Dec 2006 19:37:56 -0800 X-Auth-Received: from [192.168.0.101] (dsl254-013-145.sea1.dsl.speakeasy.net [216.254.13.145]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kBL3buX4015376 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 20 Dec 2006 19:37:56 -0800 Message-ID: <458A0193.1040108@u.washington.edu> Date: Wed, 20 Dec 2006 19:37:55 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.8 (X11/20061220) MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <45887A31.4050801@paradise.net.nz> <790a9fff0612191741r656fbbe0ic8660a9c59ba632b@mail.gmail.com> <45889598.3030408@u.washington.edu> <20061220.185514.-345500127.imp@bsdimp.com> In-Reply-To: <20061220.185514.-345500127.imp@bsdimp.com> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.12.20.192433 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __LINES_OF_YELLING 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Re: settimeofday function taking 24 - 30 minutes to complete X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Dec 2006 11:44:52 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 M. Warner Losh wrote: > In message: <45889598.3030408@u.washington.edu> > Garrett Cooper writes: > : Scot Hetzel wrote: > : > On 12/19/06, Mark Kirkwood wrote: > : >> Mark Kirkwood wrote: > : >> > : >> > Just tried out this on 6-STABLE > : >> > : >> > I can't get the hang at all (with or without thee extra includes): > : >> > > : >> > # time ./settimetest > : >> > INFO: Saved current time > : >> > INFO: settimeofday completed sucessfully > : >> > INFO: Reset time to original value > : >> > 0.000u 0.002s 0:00.00 0.0% 0+0k 0+0io 0pf+0w > : >> > > : >> > : >> Oops - thought I was reading -stable instead of -current list > : >> (doh).. sorry! Well at least you know it can work on *some* version of > : >> FreeBSD!....(I don't have any machines running -current at the moment to > : >> test). > : >> > : > > : > Here's the time for the test on FreeBSD/amd64 -CURRENT, update yesterday. > : > > : > hp010# date ; time ./t1 ; date > : > Tue Dec 19 19:07:33 CST 2006 > : > INFO: Saved current time > : > INFO: settimeofday completed sucessfully > : > INFO: Reset time to original value > : > 0.000u 1469.241s 0:00.00 0.0% 5+175k 0+0io 0pf+0w > : > Tue Dec 19 19:07:33 CST 2006 > : > hp010# date 200612191933 > : > Tue Dec 19 19:33:00 CST 2006 > : > > : > Scot > : Well, I'll find a random unused machine, setup FreeBSD on it with vmware > : and then try that out. Seems interesting that it takes 30 minutes to run > : instead of being done almost instantaneously. > > It does run almost instantly if you use a time from 2000. The date > command also causes the lockup if you say 'date 1970010100140' as > well. Looks like there's a loop in the kernel to do division, but I > can't quite find where it is. > > If you have a good test setup, maybe you can do a binary search in the > settimeofday code to find why a large leap backwards causes problems. > > Warner Why not just enabling debugging in the kernel and your source, and step through a much as possible using gdb to find the problem? Finally got back to installing FBSD in a virtual machine, so I could figure out where you are in current :D. The only other problem is that I don't have a 64-bit box and you do.. - -Garrett -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFigGTEnKyINQw/HARAmy4AJ46UUe0d4czoqWn0o8nUSCgFQXhawCfV4pv lbsH583vT7zn9VGSUSa+9TI= =SCBA -----END PGP SIGNATURE-----