Re: [patch, 2.6.11-rc2] sched: RLIMIT_RT_CPU_RATIO feature

From: Ingo Molnar
Date: Thu Jan 27 2005 - 04:02:07 EST



* Ingo Molnar <mingo@xxxxxxx> wrote:

> negative nice levels are a guaranteed way to monopolize the CPU.
> SCHED_FIFO with throttling could at most be used to 'steal' CPU time
> up to the threshold. Also, if a task 'runs away' in SCHED_FIFO mode it
> will be efficiently throttled. While if it 'runs away' in nice--20
> mode, it will take away 95+% of the CPU time quite agressively.
> Furthermore, more nice--20 tasks will do much more damage (try thunk.c
> at nice--20!), while more throttled SCHED_FIFO tasks only do damage to
> their own class - the guaranteed share of SCHED_OTHER tasks (and
> privileged RT tasks) is not affected.

furthermore, the current way of throttling SCHED_FIFO tasks that violate
the limit makes it less likely that application writers would abuse the
feature with CPU-intensive apps, because _if_ you violate the limit then
the penalty is high. E.g. a blatant violation of the limit via a pure
CPU loop ends up getting much less CPU time than even the limit would
allow for. For audio/RT apps this is fine, because they must plan their
CPU overhead anyway so they are a much more controlled environment and
just do things properly to avoid the penalty.

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