linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
To: Randy Dunlap <rdunlap@infradead.org>, kvm@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, mst@redhat.com,
	borntraeger@de.ibm.com, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [RFC PATCH 5/5] kvm_main: replace debugfs with statsfs
Date: Wed, 29 Apr 2020 12:34:03 +0200	[thread overview]
Message-ID: <48259504-7644-43cf-45a2-219981e59a49@redhat.com> (raw)
In-Reply-To: <2bb5bb1d-deb8-d6cd-498b-8948bae6d848@infradead.org>



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@redhat.com>
>> ---
>>   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


  reply	other threads:[~2020-04-29 10:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27 14:18 [RFC PATCH 0/5] Statsfs: a new ram-based file sytem for Linux kernel statistics Emanuele Giuseppe Esposito
2020-04-27 14:18 ` [RFC PATCH 1/5] refcount, kref: add dec-and-test wrappers for rw_semaphores Emanuele Giuseppe Esposito
2020-04-27 14:18 ` [RFC PATCH 2/5] statsfs API: create, add and remove statsfs sources and values Emanuele Giuseppe Esposito
2020-04-27 15:47   ` Matthew Wilcox
2020-04-27 16:48     ` Emanuele Giuseppe Esposito
2020-04-29  9:49     ` [RFC PATCH 2/5] statsfs API: create, add and remove statsfs Emanuele Giuseppe Esposito
2020-04-27 21:53   ` [RFC PATCH 2/5] statsfs API: create, add and remove statsfs sources and values Andreas Dilger
2020-04-29 10:55     ` Emanuele Giuseppe Esposito
2020-04-28 17:47   ` Randy Dunlap
2020-04-29 10:34     ` Paolo Bonzini
2020-04-27 14:18 ` [RFC PATCH 3/5] kunit: tests for statsfs API Emanuele Giuseppe Esposito
2020-04-28 17:50   ` Randy Dunlap
2020-04-27 14:18 ` [RFC PATCH 4/5] statsfs fs: virtual fs to show stats to the end-user Emanuele Giuseppe Esposito
2020-04-27 14:18 ` [RFC PATCH 5/5] kvm_main: replace debugfs with statsfs Emanuele Giuseppe Esposito
2020-04-28 17:56   ` Randy Dunlap
2020-04-29 10:34     ` Emanuele Giuseppe Esposito [this message]
2020-04-29 10:35       ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48259504-7644-43cf-45a2-219981e59a49@redhat.com \
    --to=eesposit@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).