Skip to contentSkip to conversation

kernel thread scheduling question

DISCUSSION Ben Greear 2 participants 2 messages Mar 30, 2004

lore
Share & tools
lore

Ben Greear

author
#0 lore raw

I have a kernel thread that I would like to have run at least every 1-2 miliseconds.

I think I would be happy if there were a way to have the process yield/schedule() at least once per ms with the understanding that it would get to wake again 1-2ms later. Is there a way to do such a thing without hacking up the scheduler code?

I have tried 2.6.4 with pre-empt, and setting the thread priority to -18, but I still see cases where the process is starved for 20+ milliseconds every 3-5 seconds or so. Other than this single process, there is not a big load on the system.

Any suggestions are welcome.

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#1 lore raw
Quoted 9 lines · Ben Greear

I have a kernel thread that I would like to have run at least every 1-2 miliseconds.

I think I would be happy if there were a way to have the process yield/schedule() at least once per ms with the understanding that it would get to wake again 1-2ms later. Is there a way to do such a thing without hacking up the scheduler code?

Quoted 5 lines

I have tried 2.6.4 with pre-empt, and setting the thread priority to -18, but I still see cases where the process is starved for 20+ milliseconds every 3-5 seconds or so. Other than this single process, there is not a big load on the system.

Use realtime scheduling. sched_setscheduler (2) is a good place to start.