Re: SCHED_RR and kernel threads

From: Con Kolivas
Date: Mon Nov 08 2004 - 15:31:40 EST


Stephen Warren wrote:
Hello.

We have an application that is running on kernel 2.6.9. This application
makes use of real-time threads, namely using the SCHED_RR policy.

It appears that during times of high application CPU usage, some
*kernel* threads don't get to run. As an example, this means that local
keyboard presses aren't processed (or are processed very slowly) by the
kernel, so our application never sees them. This has the effect of
hanging the system, since the way to get out of the higher CPU usage
portion of the application is to press the ESC key, and our application
never sees that keypress.

This appears to be due to the fact that the kernel threads are all
SCHED_OTHER, so our SCHED_RR user-space application trumps them!

Don't run your userspace at SCHED_RR? The kernel threads are SCHED_NORMAL precisely for the reason that you wont get real time performance if the kernel threads rear their ugly heads, albeit rarely.

Cheers,
Con

Attachment: signature.asc
Description: OpenPGP digital signature