From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 09:57:21 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4218637B401; Tue, 1 Apr 2003 09:57:21 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4254343F85; Tue, 1 Apr 2003 09:57:20 -0800 (PST) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.8/8.12.8) with ESMTP id h31HvHSM057216; Tue, 1 Apr 2003 19:57:18 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Mike Silbersack From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 01 Apr 2003 10:50:22 MDT." <20030401104630.T1612@odysseus.silby.com> Date: Tue, 01 Apr 2003 19:57:17 +0200 Message-ID: <57215.1049219837@critter.freebsd.dk> cc: Yar Tikhiy cc: hackers@freebsd.org Subject: Re: "Expensive timeout(9) function..." X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2003 17:57:21 -0000 In message <20030401104630.T1612@odysseus.silby.com>, Mike Silbersack writes: >Yeah, I suppose limiting it to one mii_tick routine per second would help >somewhat... but it's still a bad situation. I wasn't advocating slowing it down that much, merely trying to run it sequentially out of timeout()'s hair. >Actually, we could improve it quite a bit if someone adds NANODELAY() >(hint, hint...) Couldn't we have a first-run nanodelay that just used >nanotime to do the counting for it? It should probably be called either nanosleep() or nanospin(). It is not a trivial task to do it. Writing the short end calibration code to be sufficiently robust and precise will take some time and a lot of experiments. There used to be a crumbled note with this somewhere in my stack of TODO items, but by now I suspect that it is ironed perfectly flat from the weight of all the stuff on top of it. But to add to my knowledge-base: What length of delays are you looking for ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.