From owner-freebsd-arch Fri Nov 17 23: 8:25 2000 Delivered-To: freebsd-arch@freebsd.org Received: from zibbi.icomtek.csir.co.za (zibbi.icomtek.csir.co.za [146.64.24.58]) by hub.freebsd.org (Postfix) with ESMTP id 78FD737B4C5; Fri, 17 Nov 2000 23:08:19 -0800 (PST) Received: (from jhay@localhost) by zibbi.icomtek.csir.co.za (8.11.0/8.11.0) id eAI786418833; Sat, 18 Nov 2000 09:08:06 +0200 (SAT) (envelope-from jhay) From: John Hay Message-Id: <200011180708.eAI786418833@zibbi.icomtek.csir.co.za> Subject: Re: new monotime() call for all architectures. In-Reply-To: <200011172240.eAHMdtJ07828@gratis.grondar.za> from Mark Murray at "Nov 18, 2000 00:39:57 am" To: mark@grondar.za (Mark Murray) Date: Sat, 18 Nov 2000 09:08:06 +0200 (SAT) Cc: jhay@icomtek.csir.co.za (John Hay), jhb@FreeBSD.ORG (John Baldwin), arch@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > It doesn't matter. He just needs a psuedo-timestamp for entropy gathering > > > purposes. It dosen't need to be entirely precise, so if different CPU's > > > counters are not 100% in sync it won't hurt anything. > > > > Ok, I just thought the "mono" in his function name is for monotonic. If > > you are staying on one processor it will work, but if the timestamps > > have scheduling inbetween the timestamps and you land on a different > > processor it won't be monotonic anymore. > > Actually, it does mean "monotonic", but I don't need strictly > monotonic. The "time" info is used to improve the quality of the > harvested entropy, but it is not specifically counted, so the > errors introduced by different CPU's counters are "free" ontropy. Maybe the interface should be private to the random code then. Otherwise a poor unsuspecting soul might assume he can use it in a driver or something and depend on it to be monotonic. John -- John Hay -- John.Hay@icomtek.csir.co.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message