Re: [PATCH] sched: update_rq_clock() must skip ONE update
From: Mike Galbraith
Date: Mon Mar 31 2014 - 23:11:06 EST
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@xxxxxxxxxxxxxxx>
> > Signed-off-by: Mike Galbraith <umgwanakikbuti@xxxxxxxxx>
> > ---
> > 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/