hulk inclusion category: performance bugzilla: https://gitee.com/openeuler/kernel/issues/I9EHKI CVE: NA
--------------------------------
This reverts commit 0d46b757739655ce3f324fd25e67b667b928eb67.
Signed-off-by: Zhang Qiao zhangqiao22@huawei.com --- kernel/sched/fair.c | 24 ++++-------------------- kernel/sched/features.h | 1 - 2 files changed, 4 insertions(+), 21 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 8de28b182763..c19ba84af8e4 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1038,7 +1038,7 @@ struct sched_entity *__pick_first_entity(struct cfs_rq *cfs_rq) * * Which allows tree pruning through eligibility. */ -static struct sched_entity *pick_eevdf(struct cfs_rq *cfs_rq, bool wakeup_preempt) +static struct sched_entity *pick_eevdf(struct cfs_rq *cfs_rq) { struct rb_node *node = cfs_rq->tasks_timeline.rb_root.rb_node; struct sched_entity *se = __pick_first_entity(cfs_rq); @@ -1052,23 +1052,7 @@ static struct sched_entity *pick_eevdf(struct cfs_rq *cfs_rq, bool wakeup_preemp if (cfs_rq->nr_running == 1) return curr && curr->on_rq ? curr : se;
- if (curr && !curr->on_rq) - curr = NULL; - - /* - * When an entity with positive lag wakes up, it pushes the - * avg_vruntime of the runqueue backwards. This may causes the - * current entity to be ineligible soon into its run leading to - * wakeup preemption. - * - * To prevent such aggressive preemption of the current running - * entity during task wakeups, skip the eligibility check if the - * slice promised to the entity since its selection has not yet - * elapsed. - */ - if (curr && - !(sched_feat(RUN_TO_PARITY_WAKEUP) && wakeup_preempt && curr->vlag == curr->deadline) && - !entity_eligible(cfs_rq, curr)) + if (curr && (!curr->on_rq || !entity_eligible(cfs_rq, curr))) curr = NULL;
/* @@ -5598,7 +5582,7 @@ pick_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *curr) cfs_rq->next && entity_eligible(cfs_rq, cfs_rq->next)) return cfs_rq->next;
- return pick_eevdf(cfs_rq, false); + return pick_eevdf(cfs_rq); }
static bool check_cfs_rq_runtime(struct cfs_rq *cfs_rq); @@ -9267,7 +9251,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_ /* * XXX pick_eevdf(cfs_rq) != se ? */ - if (pick_eevdf(cfs_rq, true) == pse) + if (pick_eevdf(cfs_rq) == pse) goto preempt;
return; diff --git a/kernel/sched/features.h b/kernel/sched/features.h index 26b1a03bd3d2..e4789d09f58e 100644 --- a/kernel/sched/features.h +++ b/kernel/sched/features.h @@ -7,7 +7,6 @@ SCHED_FEAT(PLACE_LAG, true) SCHED_FEAT(PLACE_DEADLINE_INITIAL, true) SCHED_FEAT(RUN_TO_PARITY, true) -SCHED_FEAT(RUN_TO_PARITY_WAKEUP, true)
/* * Prefer to schedule the task we woke last (assuming it failed