I'd like to have some comments about RT tasks implementation in a SMPsystem because POSIX it's not clear about how the priority rules apply tomultiprocessor systems.The Balanced Multi Queue Scheduler ( BMQS, http://www.xmailserver.org/linux-patches/mss-2.html )i'm working on tries to keep CPU schedulers the more independent aspossible and currently implements two kind of RT tasks, local one andglobal ones.Local RT tasks apply POSIX priority rules inside the local CPU, that meansthat an RT task running on CPU0 cannot preempt another task ( being itnormal or RT ) on CPU1. This keeps schedulers interlocking very lowbecause of the very fast path in reschedule_idle() ( no multi lockacquisition, CPU queue loops, etc...).Global RT tasks, that live in a separate run queue, have the ability topreempt remote CPU and this can lead ( in the unfortunate case that thelast CPU running the RT task is running another RT task ) to an highercost in reschedule_idle().The check for a global RT task selection is done in a very fast way beforechecking the local queue :

and this does not affect the scheduler latency at all.On the contrary, by having a separate queue for global RT tasks, canimprove it in high run queue load cases.The local/global RT task selection is done with setscheduler() with a new( or'ed ) flag SCHED_RTGLOBAL, and this means that the default is RT tasklocal.I'd like to have comments on this before jumping to the next Schedulerissue ( balancing mode ).