For a few days, I've been working on a new implementation of rtapi
called "uspace".  If you read the -commit message or lurk on the -devel
IRC channel, you have seen some talk about this already.

"Uspace" uses POSIX threads, rather than the old libpth implementation.
If the rtapi_app executable is setuid root, then it will enable I/O via
iopl() and RT-PREEMPT style realtime via SCHED_FIFO.  If it's not setuid
root, then the functionality is roughly similar to what the old "sim"
rtapi implementation supplied, running the realtime code but without
giving any realtime guarantees or access to hardware.

I have been testing on a Core 2 Duo desktop with Debian 7 and Debian's
3.2.0-rt-amd64 kernel.  When I run latency-test with a 25us thread and a
1ms thread, my latencies are ~16us; when I run just a 1ms thread, my
latencies are ~90us. (16us is about the same as cyclictest, not sure why
I get a higher latency with just one thread though--this is something
I'll be looking into)

I haven't actually toggled any I/O bits yet, but in a case of famous
last words, I figure that will "just work" once I build serport on it
(the hardware has no parport).

This work is distinct from Michael Buesch's work and from the work in
machinekit.  One specific bit of code is adapted pretty directly from
ubc3, though -- a function called harden_rt().  I'm also glad that I had
the ubc3 code to study as I wrote my implementation.

The main "feature" of my implementation is that the branch will only
contain this one topic, though I hope that it will be possible to base
some other projects (hm2-eth and userspace pci come to mind) on top of
my branch.  I hope that by having a focused purpose, it will be
uncontroversial to merge.  By contrast, the work in machinekit branches
such as the ubc3 branch is structured so that it is not possible to
merge only their POSIX Threads implementation; a lot of other unrelated
work would have to be merged at the same time, including work that some
developers (including me) consider downright undesirable.

My work introduces a C++ class interface to writing new userspace
realtime layers.  As written, the layer was able to cater to both pth
and posix threads implementations (the Posix-specific stuff is around 150
lines out of about 950; 8 methods must be implemented for a new rtos), so it
may be the case that this work would also ease porting to xenomai
userspace or rtai lxrt; I have no personal interest in this work.
Because it's not needed, the Pth implementation was deleted.

Right now I reserve the right to rebase the branch frequently, so if you
want to base work on that branch before it's marged to some branch with
immutable history then please be familiar with how to manage your git
workflow when upstream rebases (discussed in the git-rebase manpage).  I
hope that the rebasing will actually settle down once buildbot is happy
with it, though.

Thanks to those on IRC with kind words so far, and to cradek for some
initial review of the code. (and catching why period couldn't be
"unsigned long")

Follow-ups to list please.

Jeff

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to