On Fri, Mar 18, 2016 at 07:48:49PM +0000, John Baldwin wrote:
>  
> -     for (x = 0; x < delay; x += 5) {
> +     for (x = 0; x < delay; x++) {
>               if ((lapic_read_icr_lo() & APIC_DELSTAT_MASK) ==
>                   APIC_DELSTAT_IDLE)
>                       return (1);
> -             DELAY(5);
> +             DELAY(1);
>       }
>       return (0);
>  }

Ideally we would structure the loop differently. I think it is more
efficient WRT latency to only block execution by ia32_pause(), and
compare the the getbinuptime() results to calculate spent time, on each
loop step.
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to