From: Shan Hai <haishan.bai@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@elte.hu, tglx@linutronix.de,
Shan Hai <haishan.bai@gmail.com>
Subject: [PATCH 1/1] sched/rt: code cleanup, remove a redundant function call
Date: Tue, 29 Nov 2011 11:03:56 +0800 [thread overview]
Message-ID: <1322535836-13590-2-git-send-email-haishan.bai@gmail.com> (raw)
In-Reply-To: <1322535836-13590-1-git-send-email-haishan.bai@gmail.com>
The second time call to sched_rt_period is redundant, because the value of the
rt_runtime was already read and it was protected by the rurt_runtime_lock.
Signed-off-by: Shan Hai <haishan.bai@gmail.com>
---
kernel/sched_rt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index 056cbd2..2171ac8 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -645,7 +645,7 @@ static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)
if (rt_rq->rt_throttled)
return rt_rq_throttled(rt_rq);
- if (sched_rt_runtime(rt_rq) >= sched_rt_period(rt_rq))
+ if (runtime >= sched_rt_period(rt_rq))
return 0;
balance_runtime(rt_rq);
--
1.7.4.1
next prev parent reply other threads:[~2011-11-29 3:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 3:03 [PATCH 0/1] " Shan Hai
2011-11-29 3:03 ` Shan Hai [this message]
2011-11-29 6:53 ` [PATCH 1/1] " Kamalesh Babulal
2011-11-29 13:17 ` Peter Zijlstra
2011-11-30 2:35 ` Shan Hai
2011-12-06 9:52 ` [tip:sched/core] sched/rt: Code " tip-bot for Shan Hai
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=1322535836-13590-2-git-send-email-haishan.bai@gmail.com \
--to=haishan.bai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®