On Thu, Jan 24, 2019 at 12:10 AM Nadav Har'El <[email protected]> wrote:

> On Wed, Dec 19, 2018 at 2:26 PM Waldemar Kozaczuk <[email protected]>
> wrote:
>
>> This patch adds "emms" instruction in critical places
>>
>
> Thank you so much for working on this, and sorry for having delayed my
> review for SO long.
> I'm basically happy with this patch except one thing that nags me - I
> don't understand why the
> *second* EMMS call, the one in switch_to(), is necessary. And I'd really
> like to understand.
> I have a *guess* below why it might be necessary, and I would be really
> grateful if you could
> check my guess. I also have a couple of other small comments below.
>
>
By the way, I checked whether these new EMMS calls have any performance
penalty for context switches
(especially voluntary ones, which are supposed to be faster) by using
tests/misc-ctxsw.so,
and I was pleasantly surprised that there wasn't any measureable difference!

On my machine, the single-CPU ("colocated") voluntary context switch time
measured in this
test was around 400 nanoseconds, with about 8 nanoseconds variations, but
various estimates
I read on the web suggest EMMS latency is between 1-2 nanoseconds, so it is
very much below
my noise level, and therefore negligible. Which is great news.

Nadav.

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" 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