Messages in this thread | | | Date | Thu, 2 Nov 2023 21:31:15 +0800 | Subject | Re: [PATCH] sched/fair: Track current se's EEVDF parameters | From | Yiwei Lin <> |
| |
On 11/2/23 14:27, Abel Wu wrote: > On 11/2/23 1:44 AM, s921975628@gmail.com Wrote: >> From: Yiwei Lin <s921975628@gmail.com> >> >> After dequeuing the current-picked scheduling entity with >> `__dequeue_entity`, its contribution to the EEVDF parameters >> cfs_rq->avg_vruntime and cfs_rq->avg_load are also removed. >> Because these should in fact be considered for the EEVDF algorithm, >> we took curr as the special case and inserted back the contributions >> when requests for cfs_rq->avg_vruntime and cfs_rq->avg_load. > > Being 'curr' means its vruntime is increasing, so does its > contribution to avg_vruntime. And you failed to explain the > most important part that how to commit its contribution to > avg_vruntime (specifically in update_curr()). > > Regards, > Abel
Thanks for pointing out the missing part. I should remember to commit back the latest contribution at `update_curr()`. In other words, adding delta * scale_load_down(curr->load.weight) to avg_vruntime.
Thanks, Yiwei Lin
| |