[lkml]   [2012]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH 14/14] sched: implement usage tracking
On Wed, 2012-02-01 at 17:38 -0800, Paul Turner wrote:
> struct sched_avg {
> u64 runnable_avg_sum, runnable_avg_period;
> u64 last_runnable_update, decay_count;
> + u32 usage_avg_sum;

4 byte hole

> unsigned long load_avg_contrib;
> int contributes_blocked_load;

A) Running/Runnable
- uses last_runnable_update to track
runnable_avg_sum, usage_avg_sum and runnable_avg_period

B) Blocked
- uses decay_count to keep track of sleeptime

C) 'Migrate'
- uses contributes_blocked_load to check if we actually did migrate?

So there's a number of things I don't get, why have
remove_task_load_avg_async() in set_task_rq()? enqueue_entity_load_avg()
can do the __synchronize_entity_decay() thing (and actually does) just
fine, right?

Similarly, why not use last_runnable_update (as last_update) to track
both A and B since a task cannot be in both states at the same time
anyway. If you always update the timestamp you can use it to either
track runnable/usage or decay for sleep.

That would get rid of decay_count and contributes_blocked_load, no?

 \ /
  Last update: 2012-02-16 18:01    [W:0.280 / U:0.432 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site