Re: [patchlet] sched: fix rt throttle runtime borrowing

From: Yong Zhang
Date: Tue Mar 08 2011 - 03:23:33 EST


On Mon, Mar 7, 2011 at 10:27 PM, Mike Galbraith <efault@xxxxxx> 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>
>
> ---
> Index: linux-2.6/include/linux/sched.h
> ===================================================================
> --- linux-2.6.orig/include/linux/sched.h
> +++ linux-2.6/include/linux/sched.h
> @@ -1941,6 +1941,7 @@ static inline unsigned int get_sysctl_ti
> Â#endif
> Âextern unsigned int sysctl_sched_rt_period;
> Âextern int sysctl_sched_rt_runtime;
> +extern int sysctl_sched_rt_borrow_runtime;

It should be under CONFIG_SMP.

Thanks,
Yong


--
Only stand for myself
--
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/