Loading kernel/sched/qhmp_fair.c +14 −6 Original line number Diff line number Diff line Loading @@ -4988,17 +4988,25 @@ static void check_enqueue_throttle(struct cfs_rq *cfs_rq); static void enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) { bool renorm = !(flags & ENQUEUE_WAKEUP) || (flags & ENQUEUE_WAKING); bool curr = cfs_rq->curr == se; /* * Update the normalized vruntime before updating min_vruntime * through calling update_curr(). * If we're the current task, we must renormalise before calling * update_curr(). */ if (!(flags & ENQUEUE_WAKEUP) || (flags & ENQUEUE_WAKING)) if (renorm && curr) se->vruntime += cfs_rq->min_vruntime; update_curr(cfs_rq); /* * Update run-time statistics of the 'current'. * Otherwise, renormalise after, such that we're placed at the current * moment in time, instead of some random moment in the past. */ update_curr(cfs_rq); if (renorm && !curr) se->vruntime += cfs_rq->min_vruntime; enqueue_entity_load_avg(cfs_rq, se, flags & ENQUEUE_WAKEUP); account_entity_enqueue(cfs_rq, se); update_cfs_shares(cfs_rq); Loading @@ -5010,7 +5018,7 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) update_stats_enqueue(cfs_rq, se, !!(flags & ENQUEUE_MIGRATING)); check_spread(cfs_rq, se); if (se != cfs_rq->curr) if (!curr) __enqueue_entity(cfs_rq, se); se->on_rq = 1; Loading Loading
kernel/sched/qhmp_fair.c +14 −6 Original line number Diff line number Diff line Loading @@ -4988,17 +4988,25 @@ static void check_enqueue_throttle(struct cfs_rq *cfs_rq); static void enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) { bool renorm = !(flags & ENQUEUE_WAKEUP) || (flags & ENQUEUE_WAKING); bool curr = cfs_rq->curr == se; /* * Update the normalized vruntime before updating min_vruntime * through calling update_curr(). * If we're the current task, we must renormalise before calling * update_curr(). */ if (!(flags & ENQUEUE_WAKEUP) || (flags & ENQUEUE_WAKING)) if (renorm && curr) se->vruntime += cfs_rq->min_vruntime; update_curr(cfs_rq); /* * Update run-time statistics of the 'current'. * Otherwise, renormalise after, such that we're placed at the current * moment in time, instead of some random moment in the past. */ update_curr(cfs_rq); if (renorm && !curr) se->vruntime += cfs_rq->min_vruntime; enqueue_entity_load_avg(cfs_rq, se, flags & ENQUEUE_WAKEUP); account_entity_enqueue(cfs_rq, se); update_cfs_shares(cfs_rq); Loading @@ -5010,7 +5018,7 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags) update_stats_enqueue(cfs_rq, se, !!(flags & ENQUEUE_MIGRATING)); check_spread(cfs_rq, se); if (se != cfs_rq->curr) if (!curr) __enqueue_entity(cfs_rq, se); se->on_rq = 1; Loading