From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 15 20:43:53 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 131AF1065676 for ; Thu, 15 Apr 2010 20:43:53 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 54C5B8FC20 for ; Thu, 15 Apr 2010 20:43:51 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA10611 for ; Thu, 15 Apr 2010 23:43:50 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1O2Vug-0006Lb-Fn for freebsd-hackers@freebsd.org; Thu, 15 Apr 2010 23:43:50 +0300 Message-ID: <4BC77A85.6070603@freebsd.org> Date: Thu, 15 Apr 2010 23:43:49 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4BACC791.70502@icyb.net.ua> <20100327214634.GI32799@server.vk2pj.dyndns.org> <86fx3k7jqi.fsf@ds4.des.no> <201003291044.28544.jhb@freebsd.org> <4BB22A42.7050003@icyb.net.ua> <4BBB2D69.80002@freebsd.org> In-Reply-To: <4BBB2D69.80002@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: periodically save current time to time-of-day hardware X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 20:43:53 -0000 on 06/04/2010 15:47 Andriy Gapon said the following: > on 30/03/2010 19:43 Andriy Gapon said the following: >> do you think that periodic saving of system clock to hardware and making resettodr >> asynchronous are dependent issues? Or are they orthogonal and can be implemented >> independently? > > A new version of the patch: > http://people.freebsd.org/~avg/periodic_resettodr.diff Given total lack of reviews and comments I am keeping this patch for my local use. > Some notes: > - this patch doesn't implement any resettodr enhancements proposed earlier: making > it non-blocking/asynchronous and saving time closer to seconds boundary; > - the patch adds code for saving time on shutdown, adds logic for checking ntp > synchronization status and for dynamically stoping/(re-)starting the callout via > period sysctl; > - the patch consists of two pieces: the first is abstracting ntp status check into > a separate function and the other is all the time saving code; > - I don't feel that kern_ntptime.c is best place for this code, I only chose it > because of ntp status checking; perhaps ntp_is_time_error needs to be made public > and the code moved to a better file; suggestion are welcome! > > I also welcome any comments and suggestions on code style, identifier naming, > logic, strategy, etc. > Thank you! > > P.S. it seems that machdep is not the best place for "RTC" sysctls, but I am > deferring this issue at the moment. > -- Andriy Gapon