[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160223142902.GR6357@twins.programming.kicks-ass.net>
Date: Tue, 23 Feb 2016 15:29:02 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Juri Lelli <juri.lelli@...il.com>,
Ingo Molnar <mingo@...nel.org>,
Clark Williams <williams@...hat.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
John Kacur <jkacur@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC][PATCH] sched: Kick bandwidth timer immediately on start up
On Tue, Feb 16, 2016 at 06:37:46PM -0500, Steven Rostedt wrote:
> Index: linux-trace.git/kernel/sched/rt.c
> ===================================================================
> --- linux-trace.git.orig/kernel/sched/rt.c 2016-02-16 16:31:12.041035819 -0500
> +++ linux-trace.git/kernel/sched/rt.c 2016-02-16 16:31:19.997905282 -0500
> @@ -58,7 +58,15 @@ static void start_rt_bandwidth(struct rt
> raw_spin_lock(&rt_b->rt_runtime_lock);
> if (!rt_b->rt_period_active) {
> rt_b->rt_period_active = 1;
> - hrtimer_forward_now(&rt_b->rt_period_timer, rt_b->rt_period);
> + /*
> + * SCHED_DEADLINE updates the bandwidth, as a run away
> + * RT task with a DL task could hog a CPU. But DL does
> + * not reset the period. If a deadline task was running
> + * without an RT task running, it can cause RT tasks to
> + * throttle when they start up. Kick the timer right away
> + * to update the period.
> + */
> + hrtimer_forward_now(&rt_b->rt_period_timer, ns_to_ktime(0));
That's a bit icky, but yeah, probably the best we can do without making
a giant mess of things..
> hrtimer_start_expires(&rt_b->rt_period_timer, HRTIMER_MODE_ABS_PINNED);
> }
> raw_spin_unlock(&rt_b->rt_runtime_lock);
Powered by blists - more mailing lists