sched: walt: fix cumulative window demand update bugs
When a task is exiting, its demand is reset before subtracting
from the cumulative window demand. Fix this by swapping these
two operations.
If the window is rolled over during a task dequeue, the task's
demand is added separately to the cumulative window demand. If
the task is still on the runqueue, this is not necessary as
the task's demand is included in cumulative runnable average.
Type cast rq->cum_window_demand from u64 to s64 when checking
for a negative value. Currently we are printing a warning when
this metric becomes zero. As this is a harmless condition, handle
it by resetting it to 0.
Change-Id: I9317b1959ee3ba068a2b94a9fd5d713da598fabc
Signed-off-by:
Pavankumar Kondeti <pkondeti@codeaurora.org>
Loading
Please register or sign in to comment