Hi If you're not going to read much, please begin from VVV below
I'm working on a port of currently modula2-based EDM CNC system to Linux base. Since this is a port, there's a need to create the same environment as in original system, which is relatively simple all based on i8254 timer (it's a cool Russian soft, really). So as for today I've made the following (it's all about linux-2.6.5 kernel):
1) The scheduler is now working from rtc's IRQ8 (at 1024Hz) => i8254's channel #0 is free and available 2) local_irq_disable() etc. are reimplemented to mask interrupts (all but IRQ0) in interrupt controller, so cli/sti sections do not disable timer's interrupts (this involves several changes in i386 arch files) Ant, as it seems, at this point the system responds quite satisfactory. The top criteria is not that hi, stable 1Khz interrupts (say, +-0.25ms) is enough. My test suite is just fun (copied from old system's crush-test). I establish 1-6 Khz IRQ0 and change speaker's gate bit so it gives sound of given frequency, then I do different actions such as walking through X, syncing disks etc and if things go bad, I here how the sound clicks (even short 1-period holes are noticable). Original 2.6.5, ofcourse, is bad-bad, but with my patches I just couldn't break the sound. Going to make more statistics via Pentium's time stamp counter.So. Thanks for reading. I see, that some or all of this is just what RTAI and RTLinux do (never looked into), but it's way more interesting to self-code it and, the main, I get exactly what I need, no more, no less. Maybe this is interesting for someone else? If so, great!
VVV
Here's what I really need and haven't yet found.
- Information on sources of hardware latencies in PC's, mainly x86 (I excpect there are I/O issues on buses' level, though I don't know the arch well enough /yet/).
- Are there other real-time constraints in mainstream Linux kernel than interrupt disabling?
- As I know, current real-time Linux solutions give 1 ms granularity (am I wrong? sorry then). What stops developers from going farther?
Thank you and with best regards, Dmitry M. Shatrov