Messages in this thread | | | Subject | Re: [PATCH] sched: update_rq_clock() must skip ONE update | From | Mike Galbraith <> | Date | Tue, 01 Apr 2014 05:10:14 +0200 |
| |
On Mon, 2014-03-31 at 12:00 -0400, Steven Rostedt wrote: > On Mon, Mar 31, 2014 at 06:20:36AM +0200, Mike Galbraith wrote: > > > > Cc: <stable@vger.kernel.org> > > Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com> > > --- > > kernel/sched/core.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c > > @@ -118,7 +118,7 @@ void update_rq_clock(struct rq *rq) > > { > > s64 delta; > > > > Mike, > > If I understand this code correctly, skip_clock_update gets set to one, > where it should skip the next call to update_rq_clock(), but only the > next skip_clock_update(), and after that, it should resume calling it again. > Is that correct?
Yeah, it's supposed to prevent us from doing back to back fastpath update + math for no good reason. Actually, decrement isn't perfect, simple set/clear is.. iff we are really headed to schedule() RSN. Tick time clear would bound error too.
Maybe it should just die as more potential trouble than it's worth. It has saved a pile of fastpath cycles, losing those again would be a shame. Accounting doesn't need to be perfect (is the enemy of good), but it does need to be a guaranteed good.
-Mike
| |