lkml.org 
[lkml]   [2011]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 05/15] sched: add a timer to handle CFS bandwidth refresh
From
Date
On Tue, 2011-05-03 at 02:28 -0700, Paul Turner wrote:
> @@ -1003,6 +1003,8 @@ enqueue_entity(struct cfs_rq *cfs_rq, st
>
> if (cfs_rq->nr_running == 1)
> list_add_leaf_cfs_rq(cfs_rq);
> +
> + start_cfs_bandwidth(cfs_rq);
> }
>
> static void __clear_buddies_last(struct sched_entity *se)
> @@ -1220,6 +1222,8 @@ static void put_prev_entity(struct cfs_r
> update_stats_wait_start(cfs_rq, prev);
> /* Put 'current' back into the tree. */
> __enqueue_entity(cfs_rq, prev);
> +
> + start_cfs_bandwidth(cfs_rq);
> }
> cfs_rq->curr = NULL;
> }

OK, so while the first made sense the second had me go wtf?!, now I
_think_ you do that because do_sched_cfs_period_timer() can return idle
and stop the timer when no bandwidth consumption is seen for a while,
and thus we need to re-start the timer when we put the entity to sleep,
since that could have been a throttle.

If that's so then neither really do make sense and a big fat comment is
missing.

So why not start on the same (but inverse) condition that makes it stop?


\
 
 \ /
  Last update: 2011-05-16 12:21    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean