All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched: Remove sched_switch completely from runqueue structure.
@ 2012-01-24 16:33 Rakib Mullick
  2012-01-25 12:33 ` Peter Zijlstra
  2012-01-28 12:08 ` [tip:sched/core] sched: Remove sched_switch tip-bot for Rakib Mullick
  0 siblings, 2 replies; 3+ messages in thread
From: Rakib Mullick @ 2012-01-24 16:33 UTC (permalink / raw
  To: mingo, a.p.zijlstra; +Cc: linux-kernel

Currently we don't utilize sched_switch field properly for counting context switch numbers. We can remove it.
But, simply removing sched_switch field from sched_stat output will break ABI integrity. So, we make sure 
/proc/sched_stat output remains as it is by hardcoding zero in place of sched_switch field's output and remove
sched_switch from sched_debug output too. And update scheduler-stat documentation accordingly.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
---

diff --git a/Documentation/scheduler/sched-stats.txt b/Documentation/scheduler/sched-stats.txt
index 1cd5d51..8259b34 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 count field used in the O(1)
+	scheduler. We kept it for ABI compatibility, but it is always set to zero.
      3) # of times schedule() was called
      4) # of times schedule() left the processor idle
 
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 2a075e1..09acaa1 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -288,7 +288,6 @@ static void print_cpu(struct seq_file *m, int cpu)
 
 	P(yld_count);
 
-	P(sched_switch);
 	P(sched_count);
 	P(sched_goidle);
 #ifdef CONFIG_SMP
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 98c0c26..8a2c768 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -462,7 +462,6 @@ struct rq {
 	unsigned int yld_count;
 
 	/* schedule() stats */
-	unsigned int sched_switch;
 	unsigned int sched_count;
 	unsigned int sched_goidle;
 
diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c
index 2a581ba..903ffa9e 100644
--- a/kernel/sched/stats.c
+++ b/kernel/sched/stats.c
@@ -32,9 +32,9 @@ static int show_schedstat(struct seq_file *seq, void *v)
 
 		/* runqueue-specific stats */
 		seq_printf(seq,
-		    "cpu%d %u %u %u %u %u %u %llu %llu %lu",
+		    "cpu%d %u 0 %u %u %u %u %llu %llu %lu",
 		    cpu, rq->yld_count,
-		    rq->sched_switch, rq->sched_count, rq->sched_goidle,
+		    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);





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sched: Remove sched_switch completely from runqueue structure.
  2012-01-24 16:33 [PATCH] sched: Remove sched_switch completely from runqueue structure Rakib Mullick
@ 2012-01-25 12:33 ` Peter Zijlstra
  2012-01-28 12:08 ` [tip:sched/core] sched: Remove sched_switch tip-bot for Rakib Mullick
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2012-01-25 12:33 UTC (permalink / raw
  To: Rakib Mullick; +Cc: mingo, linux-kernel

On Tue, 2012-01-24 at 22:33 +0600, Rakib Mullick wrote:
> Currently we don't utilize sched_switch field properly for counting
> context switch numbers. We can remove it.
> But, simply removing sched_switch field from sched_stat output will
> break ABI integrity. So, we make sure 
> /proc/sched_stat output remains as it is by hardcoding zero in place
> of sched_switch field's output and remove
> sched_switch from sched_debug output too. And update scheduler-stat
> documentation accordingly.
> 
> Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> 

Thanks


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:sched/core] sched: Remove sched_switch
  2012-01-24 16:33 [PATCH] sched: Remove sched_switch completely from runqueue structure Rakib Mullick
  2012-01-25 12:33 ` Peter Zijlstra
@ 2012-01-28 12:08 ` tip-bot for Rakib Mullick
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Rakib Mullick @ 2012-01-28 12:08 UTC (permalink / raw
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, rakib.mullick, a.p.zijlstra, tglx,
	mingo

Commit-ID:  30fd049afcfed50e022704036e8629d6bdfe84e6
Gitweb:     http://git.kernel.org/tip/30fd049afcfed50e022704036e8629d6bdfe84e6
Author:     Rakib Mullick <rakib.mullick@gmail.com>
AuthorDate: Tue, 24 Jan 2012 22:33:56 +0600
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 27 Jan 2012 13:28:53 +0100

sched: Remove sched_switch

Currently we don't utilize the sched_switch field anymore.

But, simply removing sched_switch field from the middle of the
sched_stat output will break tools.

So, to stay compatible we hardcode it to zero and remove the
field from the scheduler data structures.

Update the schedstat documentation accordingly.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1327422836.27181.5.camel@localhost.localdomain
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 Documentation/scheduler/sched-stats.txt |    3 ++-
 kernel/sched/debug.c                    |    1 -
 kernel/sched/sched.h                    |    1 -
 kernel/sched/stats.c                    |    4 ++--
 4 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/Documentation/scheduler/sched-stats.txt b/Documentation/scheduler/sched-stats.txt
index 1cd5d51..8259b34 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 count field used in the O(1)
+	scheduler. We kept it for ABI compatibility, but it is always set to zero.
      3) # of times schedule() was called
      4) # of times schedule() left the processor idle
 
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 2a075e1..09acaa1 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -288,7 +288,6 @@ static void print_cpu(struct seq_file *m, int cpu)
 
 	P(yld_count);
 
-	P(sched_switch);
 	P(sched_count);
 	P(sched_goidle);
 #ifdef CONFIG_SMP
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 98c0c26..8a2c768 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -462,7 +462,6 @@ struct rq {
 	unsigned int yld_count;
 
 	/* schedule() stats */
-	unsigned int sched_switch;
 	unsigned int sched_count;
 	unsigned int sched_goidle;
 
diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c
index 2a581ba..903ffa9e 100644
--- a/kernel/sched/stats.c
+++ b/kernel/sched/stats.c
@@ -32,9 +32,9 @@ static int show_schedstat(struct seq_file *seq, void *v)
 
 		/* runqueue-specific stats */
 		seq_printf(seq,
-		    "cpu%d %u %u %u %u %u %u %llu %llu %lu",
+		    "cpu%d %u 0 %u %u %u %u %llu %llu %lu",
 		    cpu, rq->yld_count,
-		    rq->sched_switch, rq->sched_count, rq->sched_goidle,
+		    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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-28 12:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-24 16:33 [PATCH] sched: Remove sched_switch completely from runqueue structure Rakib Mullick
2012-01-25 12:33 ` Peter Zijlstra
2012-01-28 12:08 ` [tip:sched/core] sched: Remove sched_switch tip-bot for Rakib Mullick

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.