Commit 67aa0f767af488a7f1e41cccb4f7a4893f24a1ab

Authored by Luis Henriques
Committed by Ingo Molnar
1 parent efd247fa34

sched: remove unused fields from struct rq

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>

Showing 3 changed files with 4 additions and 11 deletions Side-by-side Diff

... ... @@ -638,9 +638,6 @@
638 638 /* could above be rq->cfs_rq.exec_clock + rq->rt_rq.rt_runtime ? */
639 639  
640 640 /* sys_sched_yield() stats */
641   - unsigned int yld_exp_empty;
642   - unsigned int yld_act_empty;
643   - unsigned int yld_both_empty;
644 641 unsigned int yld_count;
645 642  
646 643 /* schedule() stats */
kernel/sched_debug.c
... ... @@ -286,9 +286,6 @@
286 286 #ifdef CONFIG_SCHEDSTATS
287 287 #define P(n) SEQ_printf(m, " .%-30s: %d\n", #n, rq->n);
288 288  
289   - P(yld_exp_empty);
290   - P(yld_act_empty);
291   - P(yld_both_empty);
292 289 P(yld_count);
293 290  
294 291 P(sched_switch);
... ... @@ -313,7 +310,7 @@
313 310 u64 now = ktime_to_ns(ktime_get());
314 311 int cpu;
315 312  
316   - SEQ_printf(m, "Sched Debug Version: v0.08, %s %.*s\n",
  313 + SEQ_printf(m, "Sched Debug Version: v0.09, %s %.*s\n",
317 314 init_utsname()->release,
318 315 (int)strcspn(init_utsname()->version, " "),
319 316 init_utsname()->version);
kernel/sched_stats.h
... ... @@ -4,7 +4,7 @@
4 4 * bump this up when changing the output format or the meaning of an existing
5 5 * format, so that tools can adapt (or abort)
6 6 */
7   -#define SCHEDSTAT_VERSION 14
  7 +#define SCHEDSTAT_VERSION 15
8 8  
9 9 static int show_schedstat(struct seq_file *seq, void *v)
10 10 {
... ... @@ -26,9 +26,8 @@
26 26  
27 27 /* runqueue-specific stats */
28 28 seq_printf(seq,
29   - "cpu%d %u %u %u %u %u %u %u %u %u %llu %llu %lu",
30   - cpu, rq->yld_both_empty,
31   - rq->yld_act_empty, rq->yld_exp_empty, rq->yld_count,
  29 + "cpu%d %u %u %u %u %u %u %llu %llu %lu",
  30 + cpu, rq->yld_count,
32 31 rq->sched_switch, rq->sched_count, rq->sched_goidle,
33 32 rq->ttwu_count, rq->ttwu_local,
34 33 rq->rq_cpu_time,