Hi Oleg,

I made sure to use thread pinning so the thread was pinned to an isolated 
CPU core. Furthermore, because the thread is spinning, I wouldn't think it 
is being interrupted or released from the CPU core.

Ivan from SO came up with a theory that you must also warmup dynamically 
the pauses, check it out: http://stackoverflow.com/a/43699146/7833248

Also not sure what you are trying to accomplish / prove with that extra 
line after busyPause. Can you elaborate?

Thanks!

-JC

On Saturday, May 13, 2017 at 2:04:55 AM UTC-5, Oleg Mazurov wrote:
>
> Here is my theory. After warmup, every call to busyPause() takes 5 
> seconds. 
> During that time the thread will be interrupted many times. Even if it is 
> run 
> on the same CPU after every interrupt, the cache state will be gone. 
> Basically, what you measure after busyPause() is repopulating your caches.
> To test this theory, add one line after busyPause() which does that 
> proactively 
> before measurement: 
>
>     double x = busyPause(interval);
> +   calculation += x / (rand.nextInt(5) + 1);
>
>
>     -- Oleg
>

-- 
You received this message because you are subscribed to the Google Groups 
"mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to