Skip to content

Commit

Permalink
sched: clean up schedstat block in dequeue_entity()
Browse files Browse the repository at this point in the history
Better placement of #ifdef CONFIG_SCHEDSTAT block in dequeue_entity().

Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Dmitry Adamushko authored and Ingo Molnar committed Oct 15, 2007
1 parent bbdba7c commit db36cc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@ static void
dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int sleep)
{
update_stats_dequeue(cfs_rq, se);
if (sleep) {
#ifdef CONFIG_SCHEDSTATS
if (sleep) {
if (entity_is_task(se)) {
struct task_struct *tsk = task_of(se);

Expand All @@ -470,8 +470,8 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int sleep)
if (tsk->state & TASK_UNINTERRUPTIBLE)
se->block_start = rq_of(cfs_rq)->clock;
}
#endif
}
#endif
__dequeue_entity(cfs_rq, se);
}

Expand Down

0 comments on commit db36cc7

Please sign in to comment.