Skip to content

Commit

Permalink
sched: remove unused fields from struct rq
Browse files Browse the repository at this point in the history
Impact: cleanup, new schedstat ABI

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.

The schedtop tool has been updated to properly handle new version of
schedstat:

   http://rt.wiki.kernel.org/index.php/Schedtop_utility

Signed-off-by: Luis Henriques <henrix@sapo.pt>
Acked-by: Gregory Haskins <ghaskins@novell.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20090324221002.GA10061@hades.domain.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Luis Henriques authored and Ingo Molnar committed Mar 24, 2009
1 parent efd247f commit 67aa0f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
3 changes: 0 additions & 3 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,9 +638,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 */
Expand Down
5 changes: 1 addition & 4 deletions kernel/sched_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
7 changes: 3 additions & 4 deletions kernel/sched_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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,
Expand Down

0 comments on commit 67aa0f7

Please sign in to comment.