From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A86EC83001 for ; Tue, 28 Apr 2020 17:56:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D53F6208FE for ; Tue, 28 Apr 2020 17:56:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="EGX1twqz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728469AbgD1R4R (ORCPT ); Tue, 28 Apr 2020 13:56:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727827AbgD1R4R (ORCPT ); Tue, 28 Apr 2020 13:56:17 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7447FC03C1AB; Tue, 28 Apr 2020 10:56:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=txJAmcMNWInk7Je0EhEiqvBKeJ6FacLYDzFb9yyt3XA=; b=EGX1twqz+y+1j3yIJjgGqck0XL Nqk9T09pADsy41RA5qkhbTQ4YrnXBS+9LZ2hLIbcfl/wc5fa0wssJnQ59GKGA0kwqVrddwBypPjYs /L9JL5SciVf/m7KNLDRZVi9F3W5COqKIydomDmwZ6O7JP9i48HVUGhZ4Z3X8SEB7rcxVUz59Qw8NZ ZFPvFqH2fZWSaWnF6siTql2yHRkR1I4VFN+Y0PVMaqwEgzDLi7P6nPvd9lixBqCM6D8ACvkl7zm2t OQU+SD0uPBa5+mprcuO+ZW57mKbZvPY9ZTpNvEviTHUzwvKlcYyqqvq+Z9UktSrjqgc78nkz3BVQN WEpZ1mHA==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jTUSu-0003cu-LS; Tue, 28 Apr 2020 17:56:16 +0000 Subject: Re: [RFC PATCH 5/5] kvm_main: replace debugfs with statsfs To: Emanuele Giuseppe Esposito , kvm@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, mst@redhat.com, borntraeger@de.ibm.com, Paolo Bonzini References: <20200427141816.16703-1-eesposit@redhat.com> <20200427141816.16703-6-eesposit@redhat.com> From: Randy Dunlap Message-ID: <2bb5bb1d-deb8-d6cd-498b-8948bae6d848@infradead.org> Date: Tue, 28 Apr 2020 10:56:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200427141816.16703-6-eesposit@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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 > --- > 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 for the cases of STATS_FS is not set/enabled. -- ~Randy