From owner-freebsd-current Mon Sep 22 08:59:18 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA21900 for current-outgoing; Mon, 22 Sep 1997 08:59:18 -0700 (PDT) Received: from pluto.plutotech.com (root@mail.plutotech.com [206.168.67.137]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA21887 for ; Mon, 22 Sep 1997 08:59:13 -0700 (PDT) Received: from narnia.plutotech.com (narnia.plutotech.com [206.168.67.130]) by pluto.plutotech.com (8.8.5/8.8.5) with ESMTP id JAA17865; Mon, 22 Sep 1997 09:59:04 -0600 (MDT) Message-Id: <199709221559.JAA17865@pluto.plutotech.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: Terry Lambert cc: gibbs@plutotech.com (Justin T. Gibbs), nate@mt.sri.com, current@FreeBSD.ORG Subject: Re: cvs commit: src/sys/conf files src/sys/dev/vx if_vx.c if_vxreg.h src/sys/i386/apm apm.c src/sys/i386/conf GENERIC files.i386 In-reply-to: Your message of "Mon, 22 Sep 1997 06:47:44 -0000." <199709220647.XAA16869@usr07.primenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 22 Sep 1997 09:58:54 -0600 From: "Justin T. Gibbs" Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >A more deterministic implementation would associate an absolute tick >value (rather than a count) with each entry, and insert entries in >sorted order. More deterministic for who? This trades O(1) insertion for O(hash chain length) insertion so that softclock will become O(timeouts for the current tick). As timeout often is called from an interrupt context it is not so clear where it is better to pay the price of non-determinism. Softclock has the luxury of lowering it's spl at deterministic intervals (see the implementation) while a caller from an interrupt context doesn't. the current implementation always blocks interrupts for a deterministic amount of time. What you propose doesn't. Even so, it is probably better to store an absolute tick value regardless so that you don't have to perform the subtraction. If and when we decide that we need higher resolution timer facilities, we can decide if a non-deterministic timeout() is an acceptable cost for that feature. > Terry Lambert > terry@lambert.org >--- >Any opinions in this posting are my own and not those of my present >or previous employers. -- Justin T. Gibbs =========================================== FreeBSD: Turning PCs into workstations ===========================================