From owner-freebsd-hackers Tue Aug 7 9:11:17 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from hotmail.com (f49.pav2.hotmail.com [64.4.37.49]) by hub.freebsd.org (Postfix) with ESMTP id 96FB237B405 for ; Tue, 7 Aug 2001 09:11:11 -0700 (PDT) (envelope-from weiguang_shi@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 7 Aug 2001 09:11:11 -0700 Received: from 129.128.29.128 by pv2fd.pav2.hotmail.msn.com with HTTP; Tue, 07 Aug 2001 16:11:11 GMT X-Originating-IP: [129.128.29.128] From: "Weiguang SHI" To: bright@mu.org, jeff@expertcity.com Cc: freebsd-hackers@freebsd.org Subject: Re: timing question Date: Tue, 07 Aug 2001 10:11:11 -0600 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 07 Aug 2001 16:11:11.0396 (UTC) FILETIME=[9320A640:01C11F5B] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >From: Alfred Perlstein >To: Jeff Behl >CC: "'freebsd-hackers@freebsd.org'" >Subject: Re: timing question >Date: Mon, 6 Aug 2001 14:49:55 -0500 > >* Jeff Behl [010806 12:48] wrote: > > please excuse and direct me to the right place if this isn't the >appropriate > > place to post this sort of question.... > > > > we're looking into moving to freebsd (yea!), but found the following > > problem. It seems that the shortest amount of time the below code will > > sleep for is 20 seconds! any call to nanosleep for 5,10, etc >miliseconds > > returns a 20 ms delay. are we doing something wrong? > >You may have to increase the kernel value for HZ so that you get >more fine grained clock interrupts. I didn't look at the code but if increasing the value of 'hz' will result in more clock-interrupts/sec thus more overhead, wouldn't it be better to auto-adjust the clock-interrupt rate somewhere in the OS to clock-interrupt at big strides in the beginning but at finer-grained interval as the actual timeout event approaches? Weiguang _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message