From owner-freebsd-current Mon Aug 30 16:34:59 1999 Delivered-To: freebsd-current@freebsd.org Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (Postfix) with ESMTP id 5C19415042 for <current@FreeBSD.ORG>; Mon, 30 Aug 1999 16:34:53 -0700 (PDT) (envelope-from julian@whistle.com) Received: from current1.whistle.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.9.1a/8.9.1) with SMTP id QAA81289; Mon, 30 Aug 1999 16:31:43 -0700 (PDT) Date: Mon, 30 Aug 1999 16:32:26 -0700 (PDT) From: Julian Elischer <julian@whistle.com> To: Peter Jeremy <jeremyp@gsmx07.alcatel.com.au> Cc: jlemon@americantv.com, current@FreeBSD.ORG Subject: Re: HEADS UP In-Reply-To: <99Aug31.085422est.40344@border.alcanet.com.au> Message-ID: <Pine.BSF.3.95.990830162225.339M-100000@current1.whistle.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 31 Aug 1999, Peter Jeremy wrote: > Jonathan Lemon <jlemon@americantv.com> wrote: > >On Aug 08, 1999 at 03:01:32PM -0700, Julian Elischer wrote: > >> I don't want to sound ungrateful, but couldn't we have defined these in > >> terms of Usecs and translated? > ... > > I think that having it in units of usec is > >probably better than msec; it provides more in the way of > >"forward compatability", > > Given a 32-bit integer, it also puts a much lower limit on the > maximum. This is likely to bite on TCP keep-alives - currently they > are set to 2 hours. We can't represent 2 hours as usecs in 32 bits. > > > and allows for a larger HZ. > > Not really. The only problem is that the rounding errors get more > noticable as the number of units approaches HZ. This is an artifact > that should be pointed out in the description - eg if you ask for > 2msec on an Alpha, you'll probably get 1.66msec. there are very few values that could make sense in both Hours scale and usecs scale.. thus items that could be small could be in uSecs and items that could be big could be in Secs.. A small set of functions could be used to make this uniform through the system syscall_Secs_to_hz(ulong *ticks, boolean Allow_zero SYSCTL_HANDLER_ARGS) syscall_mSecs_to_hz(ulong *ticks, boolean Allow_zero, SYSCTL_HANDLER_ARGS) syscall_uSecs_to_hz(ulong *ticks, boolean Allow_zero, SYSCTL_HANDLER_ARGS) > > Peter > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message