[Skiboot] [PATCH] Ensure we run pollers in cpu_wait_job()
Patrick Williams
patrick at stwcx.xyz
Thu Oct 8 06:37:06 AEDT 2015
On Wed, Oct 07, 2015 at 06:22:44AM -0500, Patrick Williams wrote:
> 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.
I wrote this wrong. What I meant was that there is no certainty that:
period % ticks == 0
Issue and suggestion below still holds.
> My suggestion:
>
> if (time_waited >= period) {
> time_waited -= period;
> opal_run_pollers();
> }
>
> --
> Patrick Williams
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot
--
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/c40ed8a3/attachment.sig>
More information about the Skiboot
mailing list