Hi Hans,
On Fri, Jun 5, 2015 at 11:53 AM, Hans Petter Selasky wrote:
> On 06/05/15 20:31, Neel Natu wrote:
- runs = 0;
>>- while (now >= state->nexthard) {
>>- state->nexthard += tick_sbt;
>>- runs++;
>>- }
>>-
On 06/05/15 20:31, Neel Natu wrote:
- runs = 0;
>>- while (now >= state->nexthard) {
>>- state->nexthard += tick_sbt;
>>- runs++;
>>- }
>>- if (runs) {
>>+ runs = (now - state->nexthard) / tick_sbt;
>>+ if (runs > 0) {
>>+
Hi Hans,
On Fri, Jun 5, 2015 at 12:09 AM, Hans Petter Selasky wrote:
> Hi,
>
> I was going through some timer code and found some unnecessary while loops
> in kern/kern_clocksource.c .
>
> I added some prints and found that during boot, "runs" can exceed 2000,
> while during regular usage runs is
On Fri, Jun 05, 2015 at 09:09:26AM +0200, Hans Petter Selasky wrote:
> Hi,
>
> I was going through some timer code and found some unnecessary while
> loops in kern/kern_clocksource.c .
>
> I added some prints and found that during boot, "runs" can exceed 2000,
> while during regular usage runs
Hi,
I was going through some timer code and found some unnecessary while
loops in kern/kern_clocksource.c .
I added some prints and found that during boot, "runs" can exceed 2000,
while during regular usage runs is typically 1. Do you think it is worth
to convert these loops into division an