mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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/core] sched: Hide runqueues from direct reference at source code level for __raw_get_cpu_var()
Date: Mon, 29 Jun 2009 07:24:48 GMT	[thread overview]
Message-ID: <tip-54d35f29f49224d86b994acb6e5969b9ba09022d@git.kernel.org> (raw)
In-Reply-To: <20090629.144457.886429910353660979.mitake@dcl.info.waseda.ac.jp>

Commit-ID:  54d35f29f49224d86b994acb6e5969b9ba09022d
Gitweb:     http://git.kernel.org/tip/54d35f29f49224d86b994acb6e5969b9ba09022d
Author:     Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
AuthorDate: Mon, 29 Jun 2009 14:44:57 +0900
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 29 Jun 2009 09:19:27 +0200

sched: Hide runqueues from direct reference at source code level for __raw_get_cpu_var()

Hide __raw_get_cpu_var() as well - thus all the direct
references to runqueues will abstracted out.

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
LKML-Reference: <20090629.144457.886429910353660979.mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 kernel/sched.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 168b268..ebc5151 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -692,6 +692,7 @@ static inline int cpu_of(struct rq *rq)
 #define this_rq()		(&__get_cpu_var(runqueues))
 #define task_rq(p)		cpu_rq(task_cpu(p))
 #define cpu_curr(cpu)		(cpu_rq(cpu)->curr)
+#define raw_rq()		(&__raw_get_cpu_var(runqueues))
 
 inline void update_rq_clock(struct rq *rq)
 {
@@ -6669,7 +6670,7 @@ EXPORT_SYMBOL(yield);
  */
 void __sched io_schedule(void)
 {
-	struct rq *rq = &__raw_get_cpu_var(runqueues);
+	struct rq *rq = raw_rq();
 
 	delayacct_blkio_start();
 	atomic_inc(&rq->nr_iowait);
@@ -6681,7 +6682,7 @@ EXPORT_SYMBOL(io_schedule);
 
 long __sched io_schedule_timeout(long timeout)
 {
-	struct rq *rq = &__raw_get_cpu_var(runqueues);
+	struct rq *rq = raw_rq();
 	long ret;
 
 	delayacct_blkio_start();

  reply	other threads:[~2009-06-29  7:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-17 13:20 [PATCH] Hiding runqueues from direct refer at source code level 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-bot for Hitoshi Mitake [this message]
2009-06-17 16:33 ` [tip:sched/urgent] sched: Hide runqueues from direct refer at source code level tip-bot for Hitoshi Mitake

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-54d35f29f49224d86b994acb6e5969b9ba09022d@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