[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADZ9YHh9rnTom8dRk5PBdY0Qu6WQVNpUr2jJDeyqg7fxTiu1gg@mail.gmail.com>
Date: Mon, 16 Jan 2012 22:51:57 +0600
From: Rakib Mullick <rakib.mullick@...il.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: peterz@...radead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched: Update scheduler stat documentation.
On Mon, Jan 16, 2012 at 2:36 PM, Ingo Molnar <mingo@...e.hu> wrote:
>
>
> Yes - but we should also change it to export a value of zero.
> The field is a legacy 'array expirations' field, and as such it
> should be zero.
>
Ok, thanks for suggestions. Please, look at the following patch, it's
been roughly created to address your suggestion. If it looks okay,
then I can send formal patch (perhaps two separate patches?). In this
way, I think we can also remove rq->sched_switch field (not done in
this patch)?
diff --git a/Documentation/scheduler/sched-stats.txt
b/Documentation/scheduler/sched-stats.txt
index 1cd5d51..cc2d107 100644
--- a/Documentation/scheduler/sched-stats.txt
+++ b/Documentation/scheduler/sched-stats.txt
@@ -38,7 +38,8 @@ First field is a sched_yield() statistic:
1) # of times sched_yield() was called
Next three are schedule() statistics:
- 2) # of times we switched to the expired queue and reused it
+ 2) This field is a legacy array expiration field used in O(1) scheduler.
+ But still kept for ABI integrity.
3) # of times schedule() was called
4) # of times schedule() left the processor idle
diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c
index 2a581ba..01a52d9 100644
--- a/kernel/sched/stats.c
+++ b/kernel/sched/stats.c
@@ -25,6 +25,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
seq_printf(seq, "timestamp %lu\n", jiffies);
for_each_online_cpu(cpu) {
struct rq *rq = cpu_rq(cpu);
+ int rq_sched_switch = 0;
#ifdef CONFIG_SMP
struct sched_domain *sd;
int dcount = 0;
@@ -34,7 +35,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
seq_printf(seq,
"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_sched_switch, rq->sched_count, rq->sched_goidle,
rq->ttwu_count, rq->ttwu_local,
rq->rq_cpu_time,
rq->rq_sched_info.run_delay, rq->rq_sched_info.pcount);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists