On 11/22/2013 07:45 PM, Paul Turner wrote:
On Fri, Nov 22, 2013 at 1:57 AM, Morten Rasmussen morten.rasmussen@arm.com wrote:
On Thu, Nov 21, 2013 at 12:22:06PM +0000, Alex Shi wrote:
Add Daniel and remove Diane. sorry.
On 11/21/2013 04:34 PM, Alex Shi wrote:
> When I read the runnable load avg code, I found the task's > avg.load_avg_contrib mainly updated in enqueue/dequeue, and the 'curr' > task in sched_tick. > So, if a sleep long time task is waked/added and kept on a cpu, but the > task is never be the 'curr' in sched_tick. Then the task's load contrib > will never be updated and keep small. > > what I missed? or Is it really?
No -- This isn't quite how it works.
It is correct that the task load_avg_contrib is updated at enqueue/dequeue and when it happens to be 'curr' at the sched_tick. Additionally it is updated every time the task is descheduled as part of put_prev_entity() which is called from __schedule() (through other functions).
Thanks a lot for the kindly explanations!