preemptible kernel patch

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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

Re: preemptible kernel patch
Quoted text here. Click to load it

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

Quoted text here. Click to load it

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.

Quoted text here. Click to load it

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
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


Quoted text here. Click to load it

Re: preemptible kernel patch

Quoted text here. Click to load it

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ň
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







Quoted text here. Click to load it

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

Re: preemptible kernel patch



Quoted text here. Click to load it

MontaVista has backported it to 2.4, so it should be fairly easy to
insert it there as well. I am not sure however where you can download
the patch.

Freddy

Site Timeline