sched: WALT: account cumulative window demand

Adequate task packing brings a significant amount of power saving
at cost of minimum wake up latency.  But we need to be extra careful as
excessive task packing can introduce negative impact not only to wake
up latency but also to power aspect as excessive task packing can lead
higher CPU frequency.

The most challenging part is frequency estimation at the time of
task placement to avoid placing on a busy CPU increases CPU's frequency
whereas placing the task on a idle CPU could sustain lower frequency.

Today, EAS utilizes CPU's demand which is accumulated instantaneous
tasks' demands.  However it's not appropriate and can easily lead to
over packing from CPU frequency guidance aspect due to the discrepancy
between instantaneous load and total execution time at the window
boundary.

As a result, introduce a new accounting unit 'cumulative window demand'.
The cumulative window demand tracks all the tasks' demands have seen in
current window which is neither instantaneous nor actual execution time.
It aims to estimate CPU's frequency at the end of current WALT window.

Change-Id: I9908c77ead9973a26dea2b36c001c2baf944d4f5
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
4 files changed