From: Luis Henriques <henrix@sapo.pt>
To: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>,
Gregory Haskins <ghaskins@novell.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 -tip] sched: Clean unused fields from struct rq
Date: Wed, 18 Mar 2009 22:54:28 +0000 [thread overview]
Message-ID: <20090318225428.GA3769@hades.domain.com> (raw)
In-Reply-To: <20090318225137.GA3766@hades.domain.com>
On Wed, Mar 18, 2009 at 10:51:37PM +0000, Luis Henriques wrote:
> Since they are used on in statistics and are always set to zero, the following
> fields from struct rq have been removed: yld_exp_empty, yld_act_empty and
> yld_both_empty.
>
> Both Sched Debug and SCHEDSTAT_VERSION versions has also been incremented since
> ABIs have been changed.
>
> Signed-off-by: Luis Henriques <henrix@sapo.pt>
> ---
> kernel/sched.c | 3 ---
> kernel/sched_debug.c | 5 +----
> kernel/sched_stats.h | 7 +++----
> 3 files changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/kernel/sched.c b/kernel/sched.c
> index 8a579e2..4469034 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -646,9 +646,6 @@ struct rq {
> /* could above be rq->cfs_rq.exec_clock + rq->rt_rq.rt_runtime ? */
>
> /* sys_sched_yield() stats */
> - unsigned int yld_exp_empty;
> - unsigned int yld_act_empty;
> - unsigned int yld_both_empty;
> unsigned int yld_count;
>
> /* schedule() stats */
> diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
> index 4daebff..467ca72 100644
> --- a/kernel/sched_debug.c
> +++ b/kernel/sched_debug.c
> @@ -286,9 +286,6 @@ static void print_cpu(struct seq_file *m, int cpu)
> #ifdef CONFIG_SCHEDSTATS
> #define P(n) SEQ_printf(m, " .%-30s: %d\n", #n, rq->n);
>
> - P(yld_exp_empty);
> - P(yld_act_empty);
> - P(yld_both_empty);
> P(yld_count);
>
> P(sched_switch);
> @@ -313,7 +310,7 @@ static int sched_debug_show(struct seq_file *m, void *v)
> u64 now = ktime_to_ns(ktime_get());
> int cpu;
>
> - SEQ_printf(m, "Sched Debug Version: v0.08, %s %.*s\n",
> + SEQ_printf(m, "Sched Debug Version: v0.09, %s %.*s\n",
> init_utsname()->release,
> (int)strcspn(init_utsname()->version, " "),
> init_utsname()->version);
> diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h
> index a8f93dd..32d2bd4 100644
> --- a/kernel/sched_stats.h
> +++ b/kernel/sched_stats.h
> @@ -4,7 +4,7 @@
> * bump this up when changing the output format or the meaning of an existing
> * format, so that tools can adapt (or abort)
> */
> -#define SCHEDSTAT_VERSION 14
> +#define SCHEDSTAT_VERSION 15
>
> static int show_schedstat(struct seq_file *seq, void *v)
> {
> @@ -26,9 +26,8 @@ static int show_schedstat(struct seq_file *seq, void *v)
>
> /* runqueue-specific stats */
> seq_printf(seq,
> - "cpu%d %u %u %u %u %u %u %u %u %u %llu %llu %lu",
> - cpu, rq->yld_both_empty,
> - rq->yld_act_empty, rq->yld_exp_empty, rq->yld_count,
> + "cpu%d %u %u %u %u %u %u %llu %llu %lu",
> + cpu, rq->yld_count,
> rq->sched_switch, rq->sched_count, rq->sched_goidle,
> rq->ttwu_count, rq->ttwu_local,
> rq->rq_cpu_time,
> --
> 1.6.2
Btw: I tried Greg schedtop with this patch and the app behaviour is as expected:
$ ./schedtop
Exception: unsupported version
Regards,
--
Luis Henriques
next prev parent reply other threads:[~2009-03-18 22:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-18 22:51 [PATCH v3 -tip] sched: Clean unused fields from struct rq Luis Henriques
2009-03-18 22:54 ` Luis Henriques [this message]
2009-03-19 7:49 ` Ingo Molnar
2009-03-19 11:56 ` Gregory Haskins
2009-03-19 18:23 ` Luis Henriques
2009-03-19 18:51 ` Gregory Haskins
2009-03-19 18:43 ` Gregory Haskins
2009-03-23 17:52 ` Luis Henriques
2009-03-24 14:04 ` Ingo Molnar
2009-03-24 15:22 ` Gregory Haskins
2009-03-24 15:41 ` Ingo Molnar
2009-03-24 15:59 ` Gregory Haskins
2009-03-24 18:22 ` Luis Henriques
2009-03-24 21:04 ` Ingo Molnar
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=20090318225428.GA3769@hades.domain.com \
--to=henrix@sapo.pt \
--cc=ghaskins@novell.com \
--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