That is part of the problem - being new to RT development and
methodologies, I don't know exactly how "best" *should* be defined for
my situation. most basic need for having RT on Linux is that we
want a deterministic turn-around time on our handling of the device
response on the serial port - as soon as an "answer" comes in, we're
just going to send the exact same "question" back out to the device,
triggering another "answer" - we just want to ensure that the handler
always will run immediately on receive, with nothing else being able to
delay it, even if the system is under a very heavy load from the video
stream processing, UDP broadcasting, DB hits, TCP/IP routing, and
custom TCP/IP protocol handling. The (theoretical) turn-around time on
the device is transmit time + around 2.5 mS processing (device-side) +
transmit time, so around 3-5 mS total round trip on a query/response
pairing - so if we send out a new "question" as the first thing in the
handler, we will have about 3-5 mS to process the response and shove it
into a shared memory area or a FIF or mailbox or whatever, in order
for a userland process to grab that data and shove it into the database
and out through the UDP broadcast - if it's practicle, we'd like the
"grab and shove" routine to be at least soft realtime, as we want
"live" data from the device to be part of the constant UDP broadcasting
packets. However, if updating what is sent out via the UDP packets is
delayed slightly, it's not as big a deal - as long as we have very
precise handling of the actual data, and it is recorded as such in the
database. Above all, though, no matter what else is going on, we need
an "immediate" handling of the serial device response, so we can get
another query sent out, and process the response we got before the new
response comes in.
My current slight leaning is towards just the 2.6 kernel with the
real-time preemption/HRT patch applied, however, I am worried that if
the system gets heavily loaded down, since that isn't a co-kernel
approach, the latency of the interrupt handling could get to be too
high - I haven't been able to find a definitive answer on whether or
not having the real-time preemption patch allows a specific thread to
be handled in a deterministic real-time fashion, no matter the load on
the rest of the system. So, that makes me lean towards RTAI (+/- LXRT),
however, this locks the code into a specific API, and if the Linux
kernel gets to the point that it can guarantee deterministic RT thread
handling, my preference would be to go the kernel path, as it seems
much more simple and clean to only have 1 S running at a time :) - but
that easily could be my mistaken impression from not knowing enough
about RT in general.
Now, when I get the embedded system hardware in here, I could run
benchmarks of all 3 configurations, however, this project is on a
fairly tight schedule, so if I can find enough "hard" information, or
even an overwhelming amount of experiential data, I would be able to
pre-select an option, and start diving into exactly what it will take
to do what we want with that option, before the hardware even gets
here.
So, lots'o'post later, anyone have any opinion/data on which one is
"best"? even any guidance or insight into what "best" I should be
looking for in this situation?
Thanks much for your time and patience with a "noob". <grin>
-James