From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 9 05:45:20 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 E388137B401 for ; Wed, 9 Apr 2003 05:45:18 -0700 (PDT) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52EFF43F75 for ; Wed, 9 Apr 2003 05:45:17 -0700 (PDT) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h39Cj7E03929; Wed, 9 Apr 2003 14:45:07 +0200 (MEST) Date: Wed, 9 Apr 2003 14:45:07 +0200 (CEST) From: Harti Brandt To: ticso@cicely.de In-Reply-To: <20030409114957.GN83126@cicely9.cicely.de> Message-ID: <20030409144042.B901@beagle.fokus.fraunhofer.de> References: <20030409114957.GN83126@cicely9.cicely.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org Subject: Re: realtime problem 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: Wed, 09 Apr 2003 12:45:20 -0000 On Wed, 9 Apr 2003, Bernd Walter wrote: BW>I need a realtime behavour in the (-current) kernel with 1ms BW>resolution and a presision of 500us. BW>I thought about these two ways: BW>- use timeout(9), but it seems that on i386 we only have a BW> resolution of 10ms. BW> And I don't know of what presision quality I can expect. BW> Can the resolution changed to 1ms as we have on alpha? BW>- attach to the clock service routine. BW> I asume the presision will be good enough. BW> But how can I find out the resolution on a given hardware? BW> BW>What is the best way to solve the problem? You must change HZ by putting options HZ=2000 or whatever you want in your config file. You should also ensure, that you have no miibus ethernet cards in your system, or comment out the relevant sections in dev/mii that periodically call the status update stuff. I fact I have used a HZ=10000 machine to simulate a 120000 packets/sec satellite link with good success (jitters are in the order of 300usecs). If you really mean 'real-time' with bounded times for interrupts and so on, that will be much harder :-) See Terry's mail. harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org