Do you have a question? Post it now! No Registration Necessary
May 24, 2004, 3:19 pm

Hello everybody,
My application is running on desktop Linux. I would like to add more
reliability and make it faster(Soft real time) on my embedded Linux
porting without making many changes to the application.
I have read few things about preemptible kernel patch, which sounds
ideal solution for some soft real time application like mine.
http://www.linuxdevices.com/articles/AT5152980814.html
RTAI, Rtlinux certainly is not good for me as i have to make changes
in the application.
I am running on 2.4 right now, 2.6 seems to have some good support for
soft real time applications.
I am not sure how exactly i can apply preemptible kernel patch.
What changes do i have to make in the application to run with
preemptible kernel patch.
And very important , how do I compare it with original system after
applying the patch , and get nice interrupt latency and jitter
characteristic :)
Can any one help ???
Thanks
Rushi
My application is running on desktop Linux. I would like to add more
reliability and make it faster(Soft real time) on my embedded Linux
porting without making many changes to the application.
I have read few things about preemptible kernel patch, which sounds
ideal solution for some soft real time application like mine.
http://www.linuxdevices.com/articles/AT5152980814.html
RTAI, Rtlinux certainly is not good for me as i have to make changes
in the application.
I am running on 2.4 right now, 2.6 seems to have some good support for
soft real time applications.
I am not sure how exactly i can apply preemptible kernel patch.
What changes do i have to make in the application to run with
preemptible kernel patch.
And very important , how do I compare it with original system after
applying the patch , and get nice interrupt latency and jitter
characteristic :)
Can any one help ???
Thanks
Rushi

Re: preemptible kernel patch

Adding the preemption patches will not make it any faster, and, in fact,
will slightly degrade application throughput.

Right. A real time application is one where the time it takes to get
the answer is as important as the answer. It doesn't have to be fast,
just very predictable.

You run your application before and after. If your application can't
see the difference, you don't need the preemption patches.
What are you seeing with your application (and what is your
application?) that makes you think the preemption patches will help?
--
Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.8" / 37N 20' 14.9"
Internet: steve @ Watt.COM Whois: SW32
Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.8" / 37N 20' 14.9"
Internet: steve @ Watt.COM Whois: SW32
We've slightly trimmed the long signature. Click to see the full one.

Re: preemptible kernel patch
Thanks Steve,
My application is a video capturing application running with Linux
BTTV and reading some custom I/O, Network data transfer and few more
things. basically i am doing around 4-5 major tasks simultaneously in
different child processes.
Now with frame capturing if i try to do many tasks simultaneously it
drops the frame capture rate so the quality of the video drops down,
so if i improve the performance by preemptive patch of the system and
ask the system to go and capture the frame as a top priority task, i
might able to get faster frame rate with all other task i am handling.
Any suggestions ??? What do you say ???
Thanks
Rushi
steve@nos

My application is a video capturing application running with Linux
BTTV and reading some custom I/O, Network data transfer and few more
things. basically i am doing around 4-5 major tasks simultaneously in
different child processes.
Now with frame capturing if i try to do many tasks simultaneously it
drops the frame capture rate so the quality of the video drops down,
so if i improve the performance by preemptive patch of the system and
ask the system to go and capture the frame as a top priority task, i
might able to get faster frame rate with all other task i am handling.
Any suggestions ??? What do you say ???
Thanks
Rushi
steve@nos


Re: preemptible kernel patch

First:
Do you know where frames get dropped? Do you send the images over
network? Using UDP? ...
Second:
Video - 25-30 frames / second or something like that? At least two buffers
(ping pong) would give you 1/30 second to move the frame. That is more than
ten milli seconds - should almost be possible without preemption...
So have you made the time critical process RT (SCHED_RR or SCHED_FIFO)
with 'sched_setscheduler(pid, SCHED_RR, param)'
BTW do not use maximum, use lowest... there are probably no other RT
processes running in your system...
/RogerL
--
Roger Larsson
Skellefteå
Roger Larsson
Skellefteå
We've slightly trimmed the long signature. Click to see the full one.

Re: preemptible kernel patch
Great Roger,
Erectly what i was looking for , you are right i am not doing any time
critical processes.
I do continues recording in background and than do lots of other tasks
like reading the I/Os , deleting the previous recording, transferring
the data over the socket, and scanning few other system variables.
If i start doing any of this processes in parallel with frame
capturing from memory ( ya i am using two buffers) capturing drops
down to less frames per second.
But if I schedule the PID of capturing process to higher priority (as
you have mentioned), i am sure it will make lot of different.
Let me try it tomorrow....
Thanks

Erectly what i was looking for , you are right i am not doing any time
critical processes.
I do continues recording in background and than do lots of other tasks
like reading the I/Os , deleting the previous recording, transferring
the data over the socket, and scanning few other system variables.
If i start doing any of this processes in parallel with frame
capturing from memory ( ya i am using two buffers) capturing drops
down to less frames per second.
But if I schedule the PID of capturing process to higher priority (as
you have mentioned), i am sure it will make lot of different.
Let me try it tomorrow....
Thanks


Re: preemptible kernel patch
If you are intending that anyway, you should try Kernel 2.6, as the
preemption is already present there.
Kernel preemption only helps high priority tasks to more likely meet
time constrains.
So you at first would run your application with "realtime priority" to
schedule it before any time-sliced applications.
-Michael
preemption is already present there.
Kernel preemption only helps high priority tasks to more likely meet
time constrains.
So you at first would run your application with "realtime priority" to
schedule it before any time-sliced applications.
-Michael
Site Timeline
- » task queues
- — Next thread in » Embedded Linux
-
- » How do I check if a process is running or not?
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » WHO experts weigh in on COVID-19 vaccine dose interval
- — The site's Newest Thread. Posted in » Electronics Design
-
- » Dyrektywa o zakazie obrotu prekursorami materiaÅ‚ ów wybuchowych
- — The site's Last Updated Thread. Posted in » Electronics (Polish)
-