There is a lot of CPU time spent in hrtimer_try_to_cancel() when exiting
idle according to perf. This is due to the idle prediction feature
constantly arming and canceling a timer that it uses to track prediction
accuracy. Idle prediction itself is used to try and select shallower
idle states when an incoming wake-up is predicted in order to improve
performance, but performance is actually better without idle prediction,
presumably thanks to eliminating the hrtimer_try_to_cancel() overhead.
The code for idle prediction is removed wholesale because the toggle
doesn't cover everything, and it's easier to just nuke the whole feature
than it is to try and cover everything with a toggle.
[dereference23: Forward port to 4.14]
Change-Id: I0a1d53cddd15dd6f0cb81dff75918ba94e3537c2
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>