From ca3ef97bb412162fd7bd94cf0b496b7c6e78d8f5 Mon Sep 17 00:00:00 2001 From: Dmitry Adamushko Date: Mon, 15 Oct 2007 17:00:13 +0200 Subject: [PATCH] --- yaml --- r: 69097 b: refs/heads/master c: a2a2d680735ad7c3b5250704b3863abf54ff4020 h: refs/heads/master i: 69095: 862ce67f2f41d984cac244bf5f5f1951f391aa0a v: v3 --- [refs] | 2 +- trunk/kernel/sched_fair.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index d9a638fede13..7023f7afd464 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a03c9061d93822f66eb6287f8e9cf5833a12b49c +refs/heads/master: a2a2d680735ad7c3b5250704b3863abf54ff4020 diff --git a/trunk/kernel/sched_fair.c b/trunk/kernel/sched_fair.c index d8502ec569e4..7826e18151a8 100644 --- a/trunk/kernel/sched_fair.c +++ b/trunk/kernel/sched_fair.c @@ -366,7 +366,6 @@ update_stats_wait_end(struct cfs_rq *cfs_rq, struct sched_entity *se) static inline void update_stats_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se) { - update_curr(cfs_rq); /* * Mark the end of the wait period if dequeueing a * waiting task: @@ -505,7 +504,7 @@ static void enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int wakeup) { /* - * Update the fair clock. + * Update run-time statistics of the 'current'. */ update_curr(cfs_rq); @@ -524,6 +523,11 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int wakeup) static void dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int sleep) { + /* + * Update run-time statistics of the 'current'. + */ + update_curr(cfs_rq); + update_stats_dequeue(cfs_rq, se); if (sleep) { #ifdef CONFIG_SCHEDSTATS @@ -787,8 +791,7 @@ static void yield_task_fair(struct rq *rq) if (likely(!sysctl_sched_compat_yield)) { __update_rq_clock(rq); /* - * Dequeue and enqueue the task to update its - * position within the tree: + * Update run-time statistics of the 'current'. */ update_curr(cfs_rq);