aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index f33608e9e1a2..5004dff91850 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -356,6 +356,9 @@ struct rq {
356 /* try_to_wake_up() stats */ 356 /* try_to_wake_up() stats */
357 unsigned long ttwu_cnt; 357 unsigned long ttwu_cnt;
358 unsigned long ttwu_local; 358 unsigned long ttwu_local;
359
360 /* BKL stats */
361 unsigned long bkl_cnt;
359#endif 362#endif
360 struct lock_class_key rq_lock_key; 363 struct lock_class_key rq_lock_key;
361}; 364};
@@ -3414,6 +3417,12 @@ static inline void schedule_debug(struct task_struct *prev)
3414 profile_hit(SCHED_PROFILING, __builtin_return_address(0)); 3417 profile_hit(SCHED_PROFILING, __builtin_return_address(0));
3415 3418
3416 schedstat_inc(this_rq(), sched_cnt); 3419 schedstat_inc(this_rq(), sched_cnt);
3420#ifdef CONFIG_SCHEDSTATS
3421 if (unlikely(prev->lock_depth >= 0)) {
3422 schedstat_inc(this_rq(), bkl_cnt);
3423 schedstat_inc(prev, sched_info.bkl_cnt);
3424 }
3425#endif
3417} 3426}
3418 3427
3419/* 3428/*