On Tue, Jan 30, 2018 at 01:25:27PM +0000, Mel Gorman wrote: > > Because, esp. in this scenario; a task migrating; the hardware really > > can't do anything sensible, whereas the OS _knows_. > > Potentially yes. One option without HWP would be to track utilisation > for a task or artifically boost it for a short period after migration so > a higher p-state is potentially selected. With HWP, a hint would have to > be given to the hardware to try select a higher frequency but I've no idea > how expensive that is or how it would behave on different implementations > of HWP. It may also be a game of whack-a-mole trying to get every cpufreq > configuration correct.
We have much of this infrastructure and have been working on improving it [1]. We already track per task utilization and feed it into a cpufreq governor (schedutil). > One advantage of using fewer cores is that it should > work regardless of cpufreq driver. Sure, and I started out by saying this patch isn't necessarily bad; but I think our 'use' [2] of HWP _is_. [1] https://lkml.kernel.org/r/20180123180847.4477-1-patrick.bell...@arm.com [2] IIRC we basically don't do _anything_ when HWP.