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=-20.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham 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 A47C5C4338F for ; Thu, 5 Aug 2021 18:19:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 809446044F for ; Thu, 5 Aug 2021 18:19:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241131AbhHESUB (ORCPT ); Thu, 5 Aug 2021 14:20:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230209AbhHESUA (ORCPT ); Thu, 5 Aug 2021 14:20:00 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7555C0613D5 for ; Thu, 5 Aug 2021 11:19:45 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id e2-20020a17090a4a02b029016f3020d867so11570498pjh.3 for ; Thu, 05 Aug 2021 11:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=InNueHw56vHBV+1tT6xD7MnAUIreY9NYLVLxpAGdi8E=; b=CuuxnsN0QgIUDgNI0+zzS+ltEtAuQsligmM89FxcRGwaSyAFpJWi1g1UU6g8+QVwjJ 7TheF0ELN5GPWRXdSWQWVDyRIVyh3AYbhQbqK2+ja4LzBUsSA2dLfrOeWMMytxW2w7/N +1D5KcQyCXFdRm/8IT96c44RWWQr5BRFk9JxbNRArHHkCZ5AK9u1FVrHE8WGCihgTyZQ CfmU1Y4VYsUMIoMJrhcvIjayL6yqACQhIcoYjli0ULYRjH7NTLlvj6dOGwZsNtAEQYrd rEc26P3Mrpv0sUL6P9aJ4A9UF45Hh7z9EtmjRVxyaWGXtb7vjnwkqmRxXiGoIypZNRVL +bvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=InNueHw56vHBV+1tT6xD7MnAUIreY9NYLVLxpAGdi8E=; b=F2JbHl9hj1s7rKS/YH8ksyxgl/B4fntvxwCsXfBOMW7GtabYqTSWHjWYnyl4xVsTZF CDy+V6G9nKFwxlbvtXJAY4YlPww2U3BBMNGsX8N/g0y4j2zJlMwuO8q8L10itDPPAwVm 0sfrUzZNcqX+1JmcTgE5T3SdGhtJyRxf1pCp/TLjFSVWib3vadC/OibS1nq0JGW36h28 2loJk/lSwOcamyAZR493Ug5Htva4XuSuJQ6KlGN91wi/W+qg07vnbiDtPGpuBsqMZYyv bIX+LnwTGl5GGNIcslu9V9ZReF6Gr7Gk5fxvpqYIju6DCc0glepCmTBlHAeWhKnX+BWE P1GQ== X-Gm-Message-State: AOAM530xp39L0XX6JiraVOCuFkXqqD9bz4LDBrE12pY4EHmKOlKGLWL5 s9jpjH/ltYw2bzw71nkeeSXFKg== X-Google-Smtp-Source: ABdhPJyD44lfRbmtbRyYlKYo78opElfarkxLTHe3/Hy0Me7lLaLMaId5sNULWNI48OEexuH9ivy+0Q== X-Received: by 2002:a17:90a:3801:: with SMTP id w1mr16476553pjb.57.1628187584967; Thu, 05 Aug 2021 11:19:44 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id 16sm7571735pfu.109.2021.08.05.11.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 11:19:44 -0700 (PDT) Date: Thu, 5 Aug 2021 18:19:41 +0000 From: Sean Christopherson To: Paolo Bonzini Cc: Peter Xu , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Vitaly Kuznetsov , Maxim Levitsky Subject: Re: [PATCH v3 4/7] KVM: X86: Introduce mmu_rmaps_stat per-vm debugfs file Message-ID: References: <20210730220455.26054-1-peterx@redhat.com> <20210730220455.26054-5-peterx@redhat.com> <8964c91d-761f-8fd4-e8c6-f85d6e318a45@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8964c91d-761f-8fd4-e8c6-f85d6e318a45@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 02, 2021, Paolo Bonzini wrote: > On 31/07/21 00:04, Peter Xu wrote: > > Use this file to dump rmap statistic information. The statistic is done by > > calculating the rmap count and the result is log-2-based. > > > > An example output of this looks like (idle 6GB guest, right after boot linux): > > > > Rmap_Count: 0 1 2-3 4-7 8-15 16-31 32-63 64-127 128-255 256-511 512-1023 > > Level=4K: 3086676 53045 12330 1272 502 121 76 2 0 0 0 > > Level=2M: 5947 231 0 0 0 0 0 0 0 0 0 > > Level=1G: 32 0 0 0 0 0 0 0 0 0 0 > > > > Signed-off-by: Peter Xu > > --- > > arch/x86/kvm/x86.c | 113 +++++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 113 insertions(+) > > This should be in debugfs.c, meaning that the kvm_mmu_slot_lpages() must be > in a header. I think mmu.h should do, let me take a look and I can post > myself a v4 of these debugfs parts. When you do post v4, don't forget to include both mmu.h and mmu/mmu_internal.h. :-) kvm/queue is still broken... arch/x86/kvm/debugfs.c: In function ‘kvm_mmu_rmaps_stat_show’: arch/x86/kvm/debugfs.c:115:18: error: implicit declaration of function ‘kvm_mmu_slot_lpages’; 115 | lpage_size = kvm_mmu_slot_lpages(slot, k + 1); | ^~~~~~~~~~~~~~~~~~~ | kvm_mmu_gfn_allow_lpage