[Skiboot] [PATCH] Ensure we run pollers in cpu_wait_job()

Patrick Williams patrick at stwcx.xyz
Wed Oct 7 22:22:44 AEDT 2015


On Wed, Oct 07, 2015 at 10:48:42AM +1100, Stewart Smith wrote:
>  	unsigned long ticks = usecs_to_tb(5);
> +	unsigned long period = msecs_to_tb(5);
>  
> +		time_waited+=ticks;
> +		if (time_waited % period == 0)
> +			opal_run_pollers();

This feels incorrect to me.  If there is a rounding error in your
msecs_to_tb vs usecs_to_tb there is no certainty that LCM(period,ticks)
is period.  In that case your still not going to run opal_run_pollers as
often as you would like.

My suggestion:

    if (time_waited >= period) {
        time_waited -= period;
        opal_run_pollers();
    }

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/skiboot/attachments/20151007/da8e7cf8/attachment.sig>


More information about the Skiboot mailing list