Re: [RFC PATCH 5/5] kvm_main: replace debugfs with statsfs

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

 





On 4/28/20 7:56 PM, Randy Dunlap wrote:
On 4/27/20 7:18 AM, Emanuele Giuseppe Esposito wrote:
Use statsfs API instead of debugfs to create sources and add values.

This also requires to change all architecture files to replace the old
debugfs_entries with statsfs_vcpu_entries and statsfs_vm_entries.

The files/folders name and organization is kept unchanged, and a symlink
in sys/kernel/debugfs/kvm is left for backward compatibility.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@xxxxxxxxxx>
---
  arch/arm64/kvm/guest.c          |   2 +-
  arch/mips/kvm/mips.c            |   2 +-
  arch/powerpc/kvm/book3s.c       |   6 +-
  arch/powerpc/kvm/booke.c        |   8 +-
  arch/s390/kvm/kvm-s390.c        |  16 +-
  arch/x86/include/asm/kvm_host.h |   2 +-
  arch/x86/kvm/Makefile           |   2 +-
  arch/x86/kvm/debugfs.c          |  64 -------
  arch/x86/kvm/statsfs.c          |  49 +++++
  arch/x86/kvm/x86.c              |   6 +-
  include/linux/kvm_host.h        |  39 +---
  virt/kvm/arm/arm.c              |   2 +-
  virt/kvm/kvm_main.c             | 314 ++++----------------------------
  13 files changed, 130 insertions(+), 382 deletions(-)
  delete mode 100644 arch/x86/kvm/debugfs.c
  create mode 100644 arch/x86/kvm/statsfs.c


You might want to select STATS_FS here (or depend on it if it is required),
or you could provide stubs in <linux/statsfs.h> for the cases of STATS_FS
is not set/enabled.

Currently debugfs is not present in the kvm Kconfig, but implements empty stubs as you suggested. I guess it would be a good idea to do the same for statsfs.

Paolo, what do you think?

Regarding the other suggestions, you are right, I will apply them in v2.

Thank you,
Emanuele




[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