Re: [PATCH]sched: Isochronous class v2 for unprivileged softrt scheduling

From: utz lehmann
Date: Fri Jan 21 2005 - 19:35:06 EST


On Sat, 2005-01-22 at 10:48 +1100, Con Kolivas wrote:
> utz lehmann wrote:
> > Hi
> >
> > I dislike the behavior of the SCHED_ISO patch that iso tasks are
> > degraded to SCHED_NORMAL if they exceed the limit.
> > IMHO it's better to throttle them at the iso_cpu limit.
> >
> > I have modified Con's iso2 patch to do this. If iso_cpu > 50 iso tasks
> > only get stalled for 1 tick (1ms on x86).
>
> Some tasks are so cache intensive they would make almost no forward
> progress running for only 1ms.

Ok. The throttle duration can be exceed.
What is a good value? 5ms, 10ms?

>
> > Fortunately there is a currently unused task prio (MAX_RT_PRIO-1) [1]. I
>
> Your implementation is not correct. The "prio" field of real time tasks
> is determined by MAX_RT_PRIO-1-rt_priority. Therefore you're limiting
> the best real time priority, not the other way around.

Really? The task prios are (lower value is higher priority):

0
.. For SCHED_FIFO/SCHED_RR (rt_priority 99..1)
98 MAX_RT_PRIO-2

99 MAX_RT_PRIO-1 ISO_PRIO (rt_priority 0)

100 MAX_RT_PRIO
.. For SCHED_NORMAL
139 MAX_PRIO-1

ISO_PRIO is between the SCHED_FIFO/SCHED_RR and the SCHED_NORMAL range.

>
> Throttling them for only 1ms will make it very easy to starve the system
> with 1 or more short running (<1ms) SCHED_NORMAL tasks running. Lower
> priority tasks will never run.
>
> Cheers,
> Con

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/