Re: [PATCH] sched, x86: fix overflow in cyc2ns_offset

From: john stultz
Date: Fri Mar 09 2012 - 19:35:34 EST


On Fri, 2012-03-09 at 16:28 -0800, Salman Qazi wrote:
> On Fri, Mar 9, 2012 at 4:25 PM, john stultz <johnstul@xxxxxxxxxx> wrote:
> > So... Sorry, why did you change it from the shifted logic?
> >
>
> It's more generally applicable. The compiler is smart enough to do
> the right thing in the power-of-two
> constant case.
>
> >
> > Is the compiler really smart enough to avoid the divides?
>
> Yes, it is. I verified that.

Ok, great! Thanks again! (Although I probably need to put rewriting the
the big x86/include/asm/timer.h comment on my TODO, since its not as
relevant anymore)

Acked-by: John Stultz <john.stultz@xxxxxxxxxx>

Ingo/Thomas, this should probably go tip/timers/urgent & be marked for
stable. I can queue it and send you a pull request, but it might be just
easier to just pick up the patch.

thanks
-john

--
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/