From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Juri Lelli <juri.lelli@gmail.com>, Ingo Molnar <mingo@kernel.org>,
Clark Williams <williams@redhat.com>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
John Kacur <jkacur@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC][PATCH] sched: Kick bandwidth timer immediately on start up
Date: Tue, 23 Feb 2016 15:29:02 +0100 [thread overview]
Message-ID: <20160223142902.GR6357@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20160216183746.349ec98b@gandalf.local.home>
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);
next prev parent reply other threads:[~2016-02-23 14:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 23:37 Steven Rostedt
2016-02-18 14:15 ` Steven Rostedt
2016-02-19 8:24 ` Juri Lelli
2016-02-23 14:29 ` Peter Zijlstra [this message]
2016-02-29 11:17 ` [tip:sched/core] sched/rt: Kick RT " tip-bot for Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160223142902.GR6357@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bristot@redhat.com \
--cc=jkacur@redhat.com \
--cc=juri.lelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome