mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yong Zhang <yong.zhang0@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Mike Galbraith <efault@gmx.de>
Subject: [PATCH 4/5] sched: refactor task_group()
Date: Sun, 20 Feb 2011 15:08:15 +0800	[thread overview]
Message-ID: <1298185696-4403-5-git-send-email-yong.zhang0@gmail.com> (raw)
In-Reply-To: <1298185696-4403-1-git-send-email-yong.zhang0@gmail.com>

move cgroup-related task group finding to cgroup_task_group().
No function change.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
---
 kernel/sched.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 18d38e4..5c74f79 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -601,7 +601,7 @@ static inline int cpu_of(struct rq *rq)
  * holds that lock for each task it moves into the cgroup. Therefore
  * by holding that lock, we pin the task to the current cgroup.
  */
-static inline struct task_group *task_group(struct task_struct *p)
+static inline struct task_group *cgroup_task_group(struct task_struct *p)
 {
 	struct task_group *tg;
 	struct cgroup_subsys_state *css;
@@ -613,6 +613,14 @@ static inline struct task_group *task_group(struct task_struct *p)
 			lockdep_is_held(&task_rq(p)->lock));
 	tg = container_of(css, struct task_group, css);
 
+	return tg;
+}
+
+static inline struct task_group *task_group(struct task_struct *p)
+{
+	struct task_group *tg;
+
+	tg = cgroup_task_group(p);
 	return autogroup_task_group(p, tg);
 }
 
-- 
1.7.1


  parent reply	other threads:[~2011-02-20  7:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-20  7:08 [PATCH 0/5] autogroup runtime enable/disable tuning fix Yong Zhang
2011-02-20  7:08 ` [PATCH 1/5] sched, autogroup, sysctl: use proc_dointvec_minmax instead Yong Zhang
2011-02-23 12:05   ` [tip:sched/core] sched, autogroup, sysctl: Use proc_dointvec_minmax() instead tip-bot for Yong Zhang
2011-02-20  7:08 ` [PATCH 2/5] sched: hide cfs_rq of autogroup if autogroup is disabled Yong Zhang
2011-02-20  7:08 ` [PATCH 3/5] sched, autogroup: stop going ahead " Yong Zhang
2011-02-23 12:05   ` [tip:sched/core] sched, autogroup: Stop " tip-bot for Yong Zhang
2011-02-20  7:08 ` Yong Zhang [this message]
2011-02-20  7:08 ` [PATCH 5/5] sched, autogroup: runtime enable/disable tuning fix Yong Zhang
2011-02-20 13:09   ` Mike Galbraith
2011-02-20 14:10     ` Yong Zhang
2011-02-20 17:22       ` Mike Galbraith
2011-02-21  3:13         ` Mike Galbraith
2011-02-21  9:05           ` Yong Zhang
2011-02-21 16:36         ` Peter Zijlstra
2011-02-21 21:12           ` Ingo Molnar
2011-02-22  3:13           ` Yong Zhang
2011-02-22  9:56             ` Peter Zijlstra
2011-02-22 12:10               ` [PATCH V2] sched, autogroup: always show autogroup name in sched_debug Yong Zhang
2011-02-22 14:02                 ` Mike Galbraith
2011-02-22 14:32                   ` Yong Zhang
2011-02-23 12:06                   ` [tip:sched/core] sched, autogroup: Stop claiming ownership of the root task group tip-bot for Mike Galbraith

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=1298185696-4403-5-git-send-email-yong.zhang0@gmail.com \
    --to=yong.zhang0@gmail.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /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®