Re: [PATCH] sched: Add SCHED_BGND (background) scheduling policy

Peter Williams
2006-07-06T23:50:15Z

Mike Galbraith wrote:
> On Wed, 2006-07-05 at 23:59 +1000, Peter Williams wrote:
>> Mike Galbraith wrote:
>>> The task in the expired array could also be a !safe_to_background() task
>>> who already had a chance to run, and who's slice expired.
>> If it's !safe_to_background() it's in our interest to let it run in
>> order to free up the resource that it's holding.
>
> Only if there are waiters (or you know there will be some before the
> holder gets a chance to run again). Even then, they might be background
> tasks, so it could still be ~wrong.
>
> (yeah, comprehensive PI would be mucho tidier than tick time)

Yes. Unfortunately, in Ingo's opinion, even if we have comprehensive PI
it's unlikely to be reliable enough to guarantee putting tasks into the
background is safe. Of course, this wouldn't detract from its general
usefulness -- just makes it no good for SCHED_BGND/SCHED_IDLEPRIO purposes.

Peter
--
Peter Williams pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce