Re: [PATCH] kvm/debugfs: add file to get vcpu steal time statistics

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

 



On Tue, Sep 17, 2024, Denis Plotnikov wrote:
> It's helpful to know whether some other host activity affects a virtual
> machine to estimate virtual machine quality of sevice.
> The fact of virtual machine affection from the host side can be obtained
> by reading "preemption_reported" counter via kvm entries of sysfs, but
> the exact vcpu waiting time isn't reported to the host.
> This patch adds this reporting.
> 
> Signed-off-by: Denis Plotnikov <den-plotnikov@xxxxxxxxxxxxxx>
> ---
>  arch/x86/include/asm/kvm_host.h |  1 +
>  arch/x86/kvm/debugfs.c          | 17 +++++++++++++++++

Using debugfs is undesirable, as it's (a) not ABI and (b) not guaranteed to be
present as KVM (correctly) ignores debugfs setup errors.

Using debugfs is also unnecessary.  The total steal time is available in guest
memory, and by definition that memory is shared with the host.  To query total
steal time from userspace, use MSR filtering to trap writes (and reflect writes
back into KVM) so that the GPA of the steal time structure is known, and then
simply read the actual steal time from guest memory as needed.




[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