[PATCH 2/4] SCHED: Remove BKL accounting from schedstats

From: Andi Kleen
Date: Fri May 06 2011 - 17:06:26 EST


From: Andi Kleen <ak@xxxxxxxxxxxxxxx>

Remove the BKL accounting from schedstats.

I removed the field from the debug file too, in theory
it could be kept as 0 for compatibility.

Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
---
include/linux/sched.h | 4 ----
kernel/sched.c | 6 ------
kernel/sched_debug.c | 3 ---
3 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 18d63ce..53373bc 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -731,10 +731,6 @@ struct sched_info {
/* timestamps */
unsigned long long last_arrival,/* when we last ran on a cpu */
last_queued; /* when we were last queued to run */
-#ifdef CONFIG_SCHEDSTATS
- /* BKL stats */
- unsigned int bkl_count;
-#endif
};
#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */

diff --git a/kernel/sched.c b/kernel/sched.c
index 312f8b9..7fa5334 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4025,12 +4025,6 @@ static inline void schedule_debug(struct task_struct *prev)
profile_hit(SCHED_PROFILING, __builtin_return_address(0));

schedstat_inc(this_rq(), sched_count);
-#ifdef CONFIG_SCHEDSTATS
- if (unlikely(prev->lock_depth >= 0)) {
- schedstat_inc(this_rq(), rq_sched_info.bkl_count);
- schedstat_inc(prev, sched_info.bkl_count);
- }
-#endif
}

static void put_prev_task(struct rq *rq, struct task_struct *prev)
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 7bacd83..a14e399 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -296,9 +296,6 @@ static void print_cpu(struct seq_file *m, int cpu)
P(ttwu_count);
P(ttwu_local);

- SEQ_printf(m, " .%-30s: %d\n", "bkl_count",
- rq->rq_sched_info.bkl_count);
-
#undef P
#undef P64
#endif
--
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/