aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index d8502ec569e4..7826e18151a8 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -366,7 +366,6 @@ update_stats_wait_end(struct cfs_rq *cfs_rq, struct sched_entity *se)
366static inline void 366static inline void
367update_stats_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se) 367update_stats_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se)
368{ 368{
369 update_curr(cfs_rq);
370 /* 369 /*
371 * Mark the end of the wait period if dequeueing a 370 * Mark the end of the wait period if dequeueing a
372 * waiting task: 371 * waiting task:
@@ -505,7 +504,7 @@ static void
505enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int wakeup) 504enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int wakeup)
506{ 505{
507 /* 506 /*
508 * Update the fair clock. 507 * Update run-time statistics of the 'current'.
509 */ 508 */
510 update_curr(cfs_rq); 509 update_curr(cfs_rq);
511 510
@@ -524,6 +523,11 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int wakeup)
524static void 523static void
525dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int sleep) 524dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int sleep)
526{ 525{
526 /*
527 * Update run-time statistics of the 'current'.
528 */
529 update_curr(cfs_rq);
530
527 update_stats_dequeue(cfs_rq, se); 531 update_stats_dequeue(cfs_rq, se);
528 if (sleep) { 532 if (sleep) {
529#ifdef CONFIG_SCHEDSTATS 533#ifdef CONFIG_SCHEDSTATS
@@ -787,8 +791,7 @@ static void yield_task_fair(struct rq *rq)
787 if (likely(!sysctl_sched_compat_yield)) { 791 if (likely(!sysctl_sched_compat_yield)) {
788 __update_rq_clock(rq); 792 __update_rq_clock(rq);
789 /* 793 /*
790 * Dequeue and enqueue the task to update its 794 * Update run-time statistics of the 'current'.
791 * position within the tree:
792 */ 795 */
793 update_curr(cfs_rq); 796 update_curr(cfs_rq);
794 797