From: tip-bot for Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
mitake@dcl.info.waseda.ac.jp, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:sched/urgent] sched: Hide runqueues from direct refer at source code level
Date: Wed, 17 Jun 2009 16:33:33 GMT [thread overview]
Message-ID: <tip-348ec61e6268c3cd7ee75cfa50e408184a941506@git.kernel.org> (raw)
In-Reply-To: <20090617.222055.374768827975756908.mitake@dcl.info.waseda.ac.jp>
Commit-ID: 348ec61e6268c3cd7ee75cfa50e408184a941506
Gitweb: http://git.kernel.org/tip/348ec61e6268c3cd7ee75cfa50e408184a941506
Author: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
AuthorDate: Wed, 17 Jun 2009 22:20:55 +0900
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 17 Jun 2009 18:29:42 +0200
sched: Hide runqueues from direct refer at source code level
There are some points which refer the per-cpu value "runqueues" directly.
sched.c provides nice abstraction, such as cpu_rq() and this_rq(),
so we should use these macros when looking runqueues.
Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
LKML-Reference: <20090617.222055.374768827975756908.mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/sched_debug.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 467ca72..70c7e0b 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -162,7 +162,7 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
{
s64 MIN_vruntime = -1, min_vruntime, max_vruntime = -1,
spread, rq0_min_vruntime, spread0;
- struct rq *rq = &per_cpu(runqueues, cpu);
+ struct rq *rq = cpu_rq(cpu);
struct sched_entity *last;
unsigned long flags;
@@ -191,7 +191,7 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq)
if (last)
max_vruntime = last->vruntime;
min_vruntime = cfs_rq->min_vruntime;
- rq0_min_vruntime = per_cpu(runqueues, 0).cfs.min_vruntime;
+ rq0_min_vruntime = cpu_rq(0)->cfs.min_vruntime;
spin_unlock_irqrestore(&rq->lock, flags);
SEQ_printf(m, " .%-30s: %Ld.%06ld\n", "MIN_vruntime",
SPLIT_NS(MIN_vruntime));
@@ -248,7 +248,7 @@ void print_rt_rq(struct seq_file *m, int cpu, struct rt_rq *rt_rq)
static void print_cpu(struct seq_file *m, int cpu)
{
- struct rq *rq = &per_cpu(runqueues, cpu);
+ struct rq *rq = cpu_rq(cpu);
#ifdef CONFIG_X86
{
prev parent reply other threads:[~2009-06-17 16:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 13:20 [PATCH] Hiding " Hitoshi Mitake
2009-06-17 15:03 ` [tip:sched/urgent] sched: Hide " tip-bot for Hitoshi Mitake
2009-06-17 16:31 ` Ingo Molnar
2009-06-18 10:14 ` Hitoshi Mitake
2009-06-22 15:35 ` Ingo Molnar
2009-06-23 4:29 ` Hitoshi Mitake
2009-06-29 3:59 ` Hitoshi Mitake
2009-06-29 4:11 ` Ingo Molnar
2009-06-29 5:44 ` [PATCH] sched: Hide runqueues from direct refer at source code level for __raw_get_cpu_var() Hitoshi Mitake
2009-06-29 7:24 ` [tip:sched/core] sched: Hide runqueues from direct reference " tip-bot for Hitoshi Mitake
2009-06-17 16:33 ` tip-bot for Hitoshi Mitake [this message]
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-348ec61e6268c3cd7ee75cfa50e408184a941506@git.kernel.org \
--to=mitake@dcl.info.waseda.ac.jp \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--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