svn commit: r297039 - head/sys/x86/x86

Konstantin Belousov kostikbel at gmail.com
Sat Mar 19 03:22:22 UTC 2016


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.


More information about the svn-src-all mailing list