diff options
author | Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp> | 2009-06-17 22:20:55 +0900 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-17 18:29:42 +0200 |
commit | 348ec61e6268c3cd7ee75cfa50e408184a941506 (patch) | |
tree | 10829dde8d184ed59bf3d76578bb444d097a8598 /kernel/sched_debug.c | |
parent | fd5e1b5dbaa8b4aacc0e251d74182eda37062194 (diff) | |
download | kernel-common-348ec61e6268c3cd7ee75cfa50e408184a941506.tar.gz kernel-common-348ec61e6268c3cd7ee75cfa50e408184a941506.tar.bz2 kernel-common-348ec61e6268c3cd7ee75cfa50e408184a941506.zip |
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>
Diffstat (limited to 'kernel/sched_debug.c')
-rw-r--r-- | 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 467ca72f1657..70c7e0b79946 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 { |