lkml.org 
[lkml]   [2012]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Qemu-devel] [RFC] Next gen kvm api
On 02/07/2012 06:03 AM, Avi Kivity wrote:
> On 02/06/2012 09:11 PM, Anthony Liguori wrote:
>>
>> I'm not so sure. ioeventfds and a future mmio-over-socketpair have to put the
>> kthread to sleep while it waits for the other end to process it. This is
>> effectively equivalent to a heavy weight exit. The difference in cost is
>> dropping to userspace which is really neglible these days (< 100 cycles).
>
> On what machine did you measure these wonderful numbers?

A syscall is what I mean by "dropping to userspace", not the cost of a heavy
weight exit. I think a heavy weight exit is still around a few thousand cycles.

Any nehalem class or better processor should have a syscall cost of around that
unless I'm wildly mistaken.

>
> But I agree a heavyweight exit is probably faster than a double context switch
> on a remote core.

I meant, if you already need to take a heavyweight exit (and you do to schedule
something else on the core), than the only additional cost is taking a syscall
return to userspace *first* before scheduling another process. That overhead is
pretty low.

Regards,

Anthony Liguori

>
>



\
 
 \ /
  Last update: 2012-02-07 16:19    [W:0.107 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site