From owner-freebsd-net@FreeBSD.ORG Fri Dec 7 10:46:48 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64EDE16A468 for ; Fri, 7 Dec 2007 10:46:48 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-3.dlr.de (smtp-3.dlr.de [195.37.61.187]) by mx1.freebsd.org (Postfix) with ESMTP id 00A4513C4CE for ; Fri, 7 Dec 2007 10:46:47 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from knop-beagle.kn.op.dlr.de ([129.247.173.6]) by smtp-3.dlr.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Fri, 7 Dec 2007 11:46:45 +0100 Date: Fri, 7 Dec 2007 11:46:45 +0100 (CET) From: Harti Brandt X-X-Sender: brandt_h@knop-beagle.kn.op.dlr.de To: "Bruce M. Simpson" In-Reply-To: <47591EC2.9060902@FreeBSD.org> Message-ID: <20071207113727.J30903@knop-beagle.kn.op.dlr.de> References: <27cb3ada0712061914g4aff5a7eq7d5cc64ba3d493ed@mail.gmail.com> <47591EC2.9060902@FreeBSD.org> X-OpenPGP-Key: harti@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 07 Dec 2007 10:46:45.0549 (UTC) FILETIME=[760BDDD0:01C838BE] Cc: Len Gross , "freebsd-net@freebsd.org" Subject: Re: TDMA / Interrupts / Pre-emptible X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Harti Brandt List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2007 10:46:48 -0000 On Fri, 7 Dec 2007, Bruce M. Simpson wrote: BMS>I can't comment on kernel scheduler jitter though, so someone who is working BMS>directly in that area will hopefully respond -- arch@ or hackers@ might be a BMS>better place to field that question. BMS> BMS>I believe microsecond resolution for your app should be possible in the BMS>kernel. If it isn't, I'd like to know why. [It would be really, really nice BMS>to have better real-time support in FreeBSD, i.e. a deadline scheduler.] A couple of years I did exactly the same as the OP - implementing a satellite MAC layer (FM-TDMA) on a cluster of 5 FreeBSD machines. I think it was the time when we moved from 4.X to 5.0 or 5.1. I could not get it reliable because the jitter in the kernel (I implemented everything in netgraph over ethernet) was in the order of several 100 usec. I had HZ at 10000 (all my simulation machines run on that). I tried really hard to find out where these jitters came from, but failed. Trying to trace the timing of execution changed the figures completely each time. Finally I gave up, because the project luckily ended :-/ At one point I tried to bump HZ to 20000 or so, but at this point TCP broke. I think this might have come from the RTT computation which is/was done in ticks and the square of something would overflow the variable. One must also carefully choose the ethernet adapter for this kind of things, because it may add any kind of jitter/delay. At that time the best where the DEC/intel if_dc types. Of course with the actual kernel the situation may be quite different. Don't know what influence have interrupt threads and this stuff. I would be interested to hear how things work out and, yeah, better real-time support would be great :-) Regards, harti