Re: [PATCH][KVM][retry 1] Add support for Pause Filtering to AMD SVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ingo Molnar wrote:
* Avi Kivity <avi@xxxxxxxxxx> wrote:

I.e. the 3000 cycles value itself could be eliminated as well. (with just a common-sense max of say 100,000 cycles enforced)
Yeah, though that has a much smaller effect as it's only responsible for a few microseconds of spinning.

3000 cycles would be 1-2 usecs. Isnt the VM exit+entry cost still in that range?

It's 3000 executions of rep nop, so you need to account for the entire spinlock loop body.

The Linux spinlock is

            "1:\t"
            "cmpl %0, %2\n\t"
            "je 2f\n\t"
            "rep ; nop\n\t"
            "movzwl %1, %2\n\t"
            /* don't need lfence here, because loads are in-order */
            "jmp 1b\n"

5 instructions, maybe 2-3 cycles, not counting any special rep nop overhead. Mark, any idea what the spin time is?

VM entry/exit is around 1us on the newer processors.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux