public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* vmcall time
@ 2007-03-10 22:05 Omar Khan
       [not found] ` <loom.20070310T230225-387-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Omar Khan @ 2007-03-10 22:05 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f


hi,

   What is an easy way to approximately measure the time it takes to make a
vmcall? If I make let us say 100,000 vmcalls from the guest os and print jiffies
in kvm for the first and last call would that do the job?

Thanks

Omar


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: vmcall time
       [not found] ` <loom.20070310T230225-387-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
@ 2007-03-10 23:22   ` Anthony Liguori
  2007-03-11 11:58     ` Omar Khan
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2007-03-10 23:22 UTC (permalink / raw)
  To: Omar Khan; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Omar Khan wrote:
> hi,
>
>    What is an easy way to approximately measure the time it takes to make a
> vmcall? If I make let us say 100,000 vmcalls from the guest os and print jiffies
> in kvm for the first and last call would that do the job?
>   

There is currently a test in virtbench that will measure PIO time.  That 
is going to be a fair bit higher than vmcall but definitely within the 
right ballpark.

I've got a patch that should appear in virtbench soon that actually 
measures vmcall latency.

http://ozlabs.org/~rusty/virtbench

Regards,

Anthony Liguori

> Thanks
>
> Omar
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> kvm-devel mailing list
> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
>   


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: vmcall time
  2007-03-10 23:22   ` Anthony Liguori
@ 2007-03-11 11:58     ` Omar Khan
       [not found]       ` <loom.20070311T125427-987-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Omar Khan @ 2007-03-11 11:58 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Anthony Liguori <anthony@...> writes:

> 
> I've got a patch that should appear in virtbench soon that actually 
> measures vmcall latency.
> 
> http://ozlabs.org/~rusty/virtbench
> 

Thanks Anthony. I have a newbie question though. In the vmcall function in the
patch:

+static int vmcall(unsigned int cmd)
+{
+	signal(SIGILL, illegal_instruction);
+	asm volatile(".byte 0x0F,0x01,0xC1,0xC3\n" ::"a"(cmd));
+	signal(SIGILL, SIG_DFL);
+
+	return 0;
+}

Why do you have the ret opcode '0xC3' with the vmcall? 

Thanks

Omar 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: vmcall time
       [not found]       ` <loom.20070311T125427-987-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
@ 2007-03-11 17:02         ` Anthony Liguori
       [not found]           ` <45F43631.3060703-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2007-03-11 17:02 UTC (permalink / raw)
  To: Omar Khan; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Omar Khan wrote:
> Anthony Liguori <anthony@...> writes:
>
>   
>> I've got a patch that should appear in virtbench soon that actually 
>> measures vmcall latency.
>>
>> http://ozlabs.org/~rusty/virtbench
>>
>>     
>
> Thanks Anthony. I have a newbie question though. In the vmcall function in the
> patch:
>
> +static int vmcall(unsigned int cmd)
> +{
> +	signal(SIGILL, illegal_instruction);
> +	asm volatile(".byte 0x0F,0x01,0xC1,0xC3\n" ::"a"(cmd));
> +	signal(SIGILL, SIG_DFL);
> +
> +	return 0;
> +}
>
> Why do you have the ret opcode '0xC3' with the vmcall? 
>   

Because I lazily copied from KVM instead of looking them up.  I figured 
0xC3 was a NOP.  Will fix.

> Thanks
>
> Omar 
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> kvm-devel mailing list
> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
>   


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: vmcall time
       [not found]           ` <45F43631.3060703-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
@ 2007-03-11 17:25             ` Dor Laor
  0 siblings, 0 replies; 5+ messages in thread
From: Dor Laor @ 2007-03-11 17:25 UTC (permalink / raw)
  To: Anthony Liguori, Omar Khan; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

>
>Omar Khan wrote:
>> Anthony Liguori <anthony@...> writes:
>>
>>
>>> I've got a patch that should appear in virtbench soon that actually
>>> measures vmcall latency.
>>>
>>> http://ozlabs.org/~rusty/virtbench
>>>
>>>
>>
>> Thanks Anthony. I have a newbie question though. In the vmcall
function
>in the
>> patch:
>>
>> +static int vmcall(unsigned int cmd)
>> +{
>> +	signal(SIGILL, illegal_instruction);
>> +	asm volatile(".byte 0x0F,0x01,0xC1,0xC3\n" ::"a"(cmd));
>> +	signal(SIGILL, SIG_DFL);
>> +
>> +	return 0;
>> +}
>>
>> Why do you have the ret opcode '0xC3' with the vmcall?
>>
>
>Because I lazily copied from KVM instead of looking them up.  I figured
>0xC3 was a NOP.  Will fix.

0xC3 is return from the hypercall.
Btw 0x90 is nop.

>From looking in the code I saw that you fork a process and wait for him
to finish. Isn't that increases the time counted for the vmmcall?
Maybe somewhere the process overhead is measured and afterwards this
time is decreased?

>
>> Thanks
>>
>> Omar
>>
>>
>>
------------------------------------------------------------------------
-
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to
share
>your
>> opinions on IT & business topics through brief surveys-and earn cash
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V
>> _______________________________________________
>> kvm-devel mailing list
>> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>>
>>
>
>
>-----------------------------------------------------------------------
--
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share
>your
>opinions on IT & business topics through brief surveys-and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVD
EV
>_______________________________________________
>kvm-devel mailing list
>kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>https://lists.sourceforge.net/lists/listinfo/kvm-devel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-03-11 17:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-10 22:05 vmcall time Omar Khan
     [not found] ` <loom.20070310T230225-387-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2007-03-10 23:22   ` Anthony Liguori
2007-03-11 11:58     ` Omar Khan
     [not found]       ` <loom.20070311T125427-987-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2007-03-11 17:02         ` Anthony Liguori
     [not found]           ` <45F43631.3060703-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-03-11 17:25             ` Dor Laor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox