Branch: Tag:

2010-10-24

2010-10-24 14:52:43 by Martin Stjernholm <mast@lysator.liu.se>

Only adjust tsc interval when we have proper baselines for time and tsc.

1333: Inside #if defined(RDTSC) && defined(USE_CLOCK_FOR_SLICES)
      elapsed = clock() - thread_start_clock;    +  if (thread_start_clock && prev_tsc) {    if (elapsed < (clock_t) (CLOCKS_PER_SEC/30)) {    tsc_mincycles |= 0xffff;    if ((tsc_elapsed - target_int)<=(tsc_mincycles<<4))
1345: Inside #if defined(RDTSC) && defined(USE_CLOCK_FOR_SLICES)
   if (elapsed > (clock_t) (CLOCKS_PER_SEC/10))    tsc_mincycles >>= 2;    } +  } +     target_int = tsc_mincycles;    prev_tsc = now; -  +     goto do_yield;    }   #endif /* RDTSC && USE_CLOCK_FOR_SLICES */