TDMA / Interrupts / Pre-emptible
hartmut.brandt at dlr.de
Fri Dec 7 02:46:48 PST 2007
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>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 :-)
More information about the freebsd-net