Re: [patchlet] sched: fix rt throttle runtime borrowing
From: Mike Galbraith
Date: Tue Mar 08 2011 - 08:28:09 EST
On Tue, 2011-03-08 at 13:46 +0100, Peter Zijlstra wrote:
> On Mon, 2011-03-07 at 15:27 +0100, Mike Galbraith wrote:
> > sched: fix rt throttle runtime borrowing
> >
> > If allowed to borrow up to rt_period, the throttle has no effect on an out
> > of control RT task, allowing it to consume 100% CPU indefinitely, blocking
> > system critical SCHED_NORMAL threads indefinitely.
> >
> > To make the throttle a more effective safety mechanism, disable borrowing
> > by default. while providing an opt-in switch for those who know the risks.
> > Also fix the throttle such that it never silently bumps rt_runtime to the
> > point that it disables itself (rt_runtime >= rt_period).
> >
> > Convert balance_runtime() and do_balance_runtime() to void since their
> > return values are never used.
> >
> > Signed-off-by: Mike Galbraith <efault@xxxxxx>
>
> I'm very hesitant here, pretty much all of the sched_rt cgroup stuff
> needs to be thrown out and rewritten. Adding more knobs to it isn't
> going to make things much better.
Yeah, I already fed it to the bitwolf.
> (I'd myself much prefer to simply not support SCHED_FIFO/RR at all, but
> seeing as POSIX mandates that crap there's really no choice there).
>
> Also, how much of a problem is it really? When I start a FIFO spinner on
> my machine I can still ssh in and kill the thing.
It's a problem if you have one box. Also, try starting a hefty load
then having an rt task go nuts. Nothing good happens here.
> Not allowing 100% FIFO usage on SMP is going to make it very very hard
> to implement any kind of fifo-cgroup stuff.
The only thing I care much about is the default setup. The safety net
should work, otherwise it's a waste.
Maybe only doing the borrow thing when there are active RT groups is the
right thing to do. (minus knob)
-Mike
--
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/