From: Yong Zhang <yong.zhang0@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: [PATCH V2] sched, autogroup: always show autogroup name in sched_debug
Date: Tue, 22 Feb 2011 20:10:02 +0800 [thread overview]
Message-ID: <20110222121002.GA2100@zhy> (raw)
In-Reply-To: <1298368566.2217.18.camel@twins>
On Tue, Feb 22, 2011 at 10:56:06AM +0100, Peter Zijlstra wrote:
> On Tue, 2011-02-22 at 11:13 +0800, Yong Zhang wrote:
> > So show autogroup name always. But for the root group,
> > its name will dance between "cfs_rq[cpu]:" and
> > "cfs_rq[cpu]:/autogroup-0" according to
> > sysctl_sched_autogroup_enabled.
>
> Would it make sense to force the root group to always be a !autogroup?
Hmmm, I think it's ok.
---
From: Yong Zhang <yong.zhang0@gmail.com>
Subject: [PATCH] sched, autogroup: always show autogroup name in sched_debug
When autogroup is disabled, there will be lots of group
named "cfs_rq[cpu]:", thus will lead to confusion for
who read it.
And for now, autogroup runtime disable/enable will
not take effect immediately on current live processes,
so there maybe still have some processes attaching to
its autogroup.
So show autogroup name always. But for the root group,
its name will always be "cfs_rq[cpu]:/".
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_autogroup.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/kernel/sched_autogroup.c b/kernel/sched_autogroup.c
index 9fb6562..5b9a317 100644
--- a/kernel/sched_autogroup.c
+++ b/kernel/sched_autogroup.c
@@ -258,9 +258,7 @@ void proc_sched_autogroup_show_task(struct task_struct *p, struct seq_file *m)
#ifdef CONFIG_SCHED_DEBUG
static inline int autogroup_path(struct task_group *tg, char *buf, int buflen)
{
- int enabled = ACCESS_ONCE(sysctl_sched_autogroup_enabled);
-
- if (!enabled || !tg->autogroup)
+ if (!tg->autogroup || !tg->autogroup->id)
return 0;
return snprintf(buf, buflen, "%s-%ld", "/autogroup", tg->autogroup->id);
--
1.7.1
next prev parent reply other threads:[~2011-02-22 12:10 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 ` [PATCH 4/5] sched: refactor task_group() Yong Zhang
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 ` Yong Zhang [this message]
2011-02-22 14:02 ` [PATCH V2] sched, autogroup: always show autogroup name in sched_debug 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=20110222121002.GA2100@zhy \
--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