From: tip-bot for Shawn Bohrer <sbohrer@rgmadvisors.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
bitbucket@online.de, sbohrer@rgmadvisors.com,
rostedt@goodmis.org, stable@kernel.org, tglx@linutronix.de
Subject: [tip:sched/urgent] sched/rt: Use root_domain of rt_rq not current processor
Date: Thu, 24 Jan 2013 12:33:10 -0800 [thread overview]
Message-ID: <tip-df42ae62b3a0bd1a04b68f467a84150af6274a09@git.kernel.org> (raw)
In-Reply-To: <1358186131-29494-1-git-send-email-sbohrer@rgmadvisors.com>
Commit-ID: df42ae62b3a0bd1a04b68f467a84150af6274a09
Gitweb: http://git.kernel.org/tip/df42ae62b3a0bd1a04b68f467a84150af6274a09
Author: Shawn Bohrer <sbohrer@rgmadvisors.com>
AuthorDate: Mon, 14 Jan 2013 11:55:31 -0600
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 24 Jan 2013 16:37:57 +0100
sched/rt: Use root_domain of rt_rq not current processor
When the system has multiple domains do_sched_rt_period_timer()
can run on any CPU and may iterate over all rt_rq in
cpu_online_mask. This means when balance_runtime() is run for a
given rt_rq that rt_rq may be in a different rd than the current
processor. Thus if we use smp_processor_id() to get rd in
do_balance_runtime() we may borrow runtime from a rt_rq that is
not part of our rd.
This changes do_balance_runtime to get the rd from the passed in
rt_rq ensuring that we borrow runtime only from the correct rd
for the given rt_rq.
This fixes a BUG at kernel/sched/rt.c:687! in __disable_runtime
when we try reclaim runtime lent to other rt_rq but runtime has
been lent to a rt_rq in another rd.
Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Mike Galbraith <bitbucket@online.de>
Cc: peterz@infradead.org
Cc: <stable@kernel.org>
Link: http://lkml.kernel.org/r/1358186131-29494-1-git-send-email-sbohrer@rgmadvisors.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/rt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 418feb0..4f02b28 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -566,7 +566,7 @@ static inline struct rt_bandwidth *sched_rt_bandwidth(struct rt_rq *rt_rq)
static int do_balance_runtime(struct rt_rq *rt_rq)
{
struct rt_bandwidth *rt_b = sched_rt_bandwidth(rt_rq);
- struct root_domain *rd = cpu_rq(smp_processor_id())->rd;
+ struct root_domain *rd = rq_of_rt_rq(rt_rq)->rd;
int i, weight, more = 0;
u64 rt_period;
next prev parent reply other threads:[~2013-01-24 20:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-05 17:46 kernel BUG at kernel/sched_rt.c:493! Shawn Bohrer
2013-01-07 17:58 ` Shawn Bohrer
2013-01-07 23:02 ` Shawn Bohrer
2013-01-08 9:45 ` Mike Galbraith
2013-01-08 14:36 ` Steven Rostedt
2013-01-08 15:01 ` Shawn Bohrer
2013-01-10 4:13 ` Mike Galbraith
2013-01-10 19:58 ` Shawn Bohrer
2013-01-11 5:22 ` Mike Galbraith
2013-01-11 6:03 ` Mike Galbraith
2013-01-14 17:55 ` [PATCH] sched_rt: Use root_domain of rt_rq not current processor Shawn Bohrer
2013-01-15 3:55 ` Mike Galbraith
2013-01-24 20:33 ` tip-bot for Shawn Bohrer [this message]
2013-01-25 7:31 ` [tip:sched/urgent] sched/rt: " tip-bot for Shawn Bohrer
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=tip-df42ae62b3a0bd1a04b68f467a84150af6274a09@git.kernel.org \
--to=sbohrer@rgmadvisors.com \
--cc=bitbucket@online.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
/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