Re: [RFC] kvm: x86: export vCPU halted state to sysfs

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

 



On Fri, 2 Feb 2018 12:49:25 +0000
Daniel P. Berrangé <berrange@xxxxxxxxxx> wrote:

> On Thu, Feb 01, 2018 at 12:54:41PM -0500, Luiz Capitulino wrote:
> > 
> > Libvirt needs to know when a vCPU is halted. To get this information,
> > libvirt has started using the query-cpus command from QEMU. However,
> > if in kernel irqchip is in use, query-cpus will force all vCPUs
> > to user-space since they have to issue the KVM_GET_MP_STATE ioctl.
> > This has catastrophic implications to low-latency workloads like
> > KVM-RT and zero packet loss with DPDK. To make matters worse, there's
> > an OpenStack service called ceilometer that causes libvirt to
> > issue query-cpus every few minutes.
> > 
> > The solution proposed in this patch is to export the vCPU
> > halted state in the already existing vcpu directory in sysfs.
> > This way, libvirt can read the vCPU halted state from sysfs and avoid
> > using the query-cpus command. This solution seems to be sufficient
> > for libvirt needs, but it has the following cons:
> > 
> >  * vcpu information in sysfs lives in a debug directory, so
> >    libvirt would be basing its API on debug info  
> 
> Is this part of regular sysfs mount point, or does it require a
> debug fs to be mounted separately at /sys/fs/debug ?

Yeah, it depends on debugfs being separately mounted at /sys/fs/debug.

> >  * Currently, only x86 supports the vcpu dir in sysfs, so
> >    we'd have to expand this to other archs (should be doable)  
> 
> Yep, that would be fairly important

That's doable. The code that exports the vcpu information to sysfs
is pretty arch-independent. Only x86 does it today because it's the
only arch that actually exports anything per vcpu (which is the
tsc-offset).



[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