| Date | Sun, 22 Nov 2020 22:44:42 +1100 | From | Balbir Singh <> | Subject | Re: [PATCH -tip 09/32] sched/fair: Snapshot the min_vruntime of CPUs on force idle |
| |
On Tue, Nov 17, 2020 at 06:19:39PM -0500, Joel Fernandes (Google) wrote: > During force-idle, we end up doing cross-cpu comparison of vruntimes > during pick_next_task. If we simply compare (vruntime-min_vruntime) > across CPUs, and if the CPUs only have 1 task each, we will always > end up comparing 0 with 0 and pick just one of the tasks all the time. > This starves the task that was not picked. To fix this, take a snapshot > of the min_vruntime when entering force idle and use it for comparison. > This min_vruntime snapshot will only be used for cross-CPU vruntime > comparison, and nothing else. > > This resolves several performance issues that were seen in ChromeOS > audio usecase. > > NOTE: Note, this patch will be improved in a later patch. It is just > kept here as the basis for the later patch and to make rebasing > easier. Further, it may make reverting the improvement easier in > case the improvement causes any regression. >
This seems cumbersome, is there no way to track the min_vruntime via rq->core->min_vruntime?
Balbir Singh.
|