mirror of
https://github.com/torvalds/linux.git
synced 2026-10-23 07:11:03 +02:00
sched/eevdf: Align update_protect_slice to set_protect_slice
Apply the same logic as for set_protect_slice when updating it. Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260921152238.3804392-3-vincent.guittot@linaro.org
This commit is contained in:
parent
aae2a33ea6
commit
4bf32ec332
|
|
@ -821,12 +821,6 @@ static u64 ineligible_vruntime(struct cfs_rq *cfs_rq)
|
|||
if (curr && !curr->on_rq)
|
||||
curr = NULL;
|
||||
|
||||
/*
|
||||
* This is called from set_next_task_fair(.first=true) /
|
||||
* set_protect_slice() so curr had better be set and on_rq.
|
||||
*/
|
||||
WARN_ON_ONCE(!curr);
|
||||
|
||||
if (weight) {
|
||||
s64 runtime = cfs_rq->sum_w_vruntime;
|
||||
|
||||
|
|
@ -1138,10 +1132,19 @@ static inline void set_protect_slice(struct cfs_rq *cfs_rq, struct sched_entity
|
|||
|
||||
static inline void update_protect_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)
|
||||
{
|
||||
u64 slice = cfs_rq_min_slice(cfs_rq);
|
||||
u64 vruntime = min_vruntime(se->vruntime, avg_vruntime(cfs_rq));
|
||||
u64 slice = normalized_sysctl_sched_base_slice;
|
||||
u64 vprot;
|
||||
|
||||
se->vprot = min_vruntime(se->vprot, vruntime + calc_delta_fair(slice, se));
|
||||
if (sched_feat(RUN_TO_PARITY))
|
||||
slice = cfs_rq_min_slice(cfs_rq);
|
||||
|
||||
vprot = min_vruntime(se->vprot, vruntime + calc_delta_fair(slice, se));
|
||||
|
||||
if (sched_feat(PREEMPT_SHORT) && slice != se->slice)
|
||||
vprot = min_vruntime(vprot, ineligible_vruntime(cfs_rq));
|
||||
|
||||
se->vprot = vprot;
|
||||
}
|
||||
|
||||
static inline bool protect_slice(struct sched_entity *se)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user