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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE3D9C00140 for ; Wed, 24 Aug 2022 14:26:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cDmfMhGg5vobmFpC2MqZyyl3IiC+GtKjB8OWwj/fC9U=; b=0U+BIWDD5QAOhv oOCC7VgkvyhZXHn3siyJ/3S98UahVNlYn8C6g5eUaMTh9QMkGJIJQLjTR6wEtRxpv52iRIOYu719L kQxFPkIB4OTx962K1itS8WmDmSBaWcGBX1wbgkTbAhF/hftfCSJsPvz+rti1Bz/yid+Fa9bk7i2sP H1dV7ZA/ZmRWBJlIqax8R1cJHBXD5hg8Zl4PaeBC0p79xaHGe9kOPPoJe6ItynZNltip+c8HxfFGl OednrmhTIO3MLbkb0Fl5IQLogX8C0guSSS6vssYxWHxo/uGvOnXzTHDSLrE7UezDlGAXKsnkJE+k2 p1iW6GSWl9FUpRQBKfHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQrJi-00Dco2-NZ; Wed, 24 Aug 2022 14:25:14 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQrJf-00DcmK-HN for linux-arm-kernel@lists.infradead.org; Wed, 24 Aug 2022 14:25:13 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 216FFB8254D; Wed, 24 Aug 2022 14:25:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B45EEC433C1; Wed, 24 Aug 2022 14:25:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661351108; bh=GlyJJ9dV5dcNN4e8F/+zW4aKoVpKrRpQG5FduS6xj60=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RlOFCFyOYvgDsmtvh7bI4fnzpALdN2M/t7Sdx3OBkKjuNIOEGaxCSeasH5M/MQcVu 39MlyXzAx5P4sTw6vHcANvoZt5XNpo4DlF7c3sYHlUc18EhnOJ+Nx/MvsFzgmvBHY4 mnjdD22AawdV/zG7YInQPGZCdQ59QpasRPsWlEDIns2MvGoYCbBB1Zlc8Zx17VlJKx WlpiSr2SvuWNUu+CiU1aCrccEOnvIj7LHy6SiOm7h2HB/+9dhcnJIKX7ihFSu2bagl 8lmZ+3PVbzSvTHGsjmudsOHkifF0MknUFCc1OryZ69NDWLBrFdNJWFGyy08RVV1UqF GXox+Ellgocog== Received: from [12.191.126.171] (helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oQrJa-005SYH-2A; Wed, 24 Aug 2022 15:25:06 +0100 Date: Wed, 24 Aug 2022 15:24:57 +0100 Message-ID: <87zgftra6e.wl-maz@kernel.org> From: Marc Zyngier To: Ryan Roberts Cc: Yosry Ahmed , Tejun Heo , Johannes Weiner , Zefan Li , James Morse , Alexandru Elisei , Suzuki K Poulose , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Andrew Morton , Michal Hocko , Roman Gushchin , Shakeel Butt , Oliver Upton , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Huang@google.com, Shaoqin , linux-mm@kvack.org, cgroups@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, nd@arm.com Subject: Re: [PATCH v7 4/4] KVM: arm64/mmu: count KVM s2 mmu usage in secondary pagetable stats In-Reply-To: <319904e0-3722-8ab1-cf74-491b9c32e23b@arm.com> References: <20220823004639.2387269-1-yosryahmed@google.com> <20220823004639.2387269-5-yosryahmed@google.com> <319904e0-3722-8ab1-cf74-491b9c32e23b@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 12.191.126.171 X-SA-Exim-Rcpt-To: ryan.roberts@arm.com, yosryahmed@google.com, tj@kernel.org, hannes@cmpxchg.org, lizefan.x@bytedance.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, pbonzini@redhat.com, seanjc@google.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, akpm@linux-foundation.org, mhocko@kernel.org, roman.gushchin@linux.dev, shakeelb@google.com, oupton@google.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Huang@google.com, shaoqin.huang@intel.com, linux-mm@kvack.org, cgroups@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, nd@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220824_072511_879978_F2048797 X-CRM114-Status: GOOD ( 20.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 24 Aug 2022 14:43:43 +0100, Ryan Roberts wrote: > > > Count the pages used by KVM in arm64 for stage2 mmu in memory stats > > under secondary pagetable stats (e.g. "SecPageTables" in /proc/meminfo) > > to give better visibility into the memory consumption of KVM mmu in a > > similar way to how normal user page tables are accounted. > > > > Signed-off-by: Yosry Ahmed > > Reviewed-by: Oliver Upton > > Reviewed-by: Marc Zyngier > > --- > > I see that you are not including the memory reserved for the host > stage2 table when using protected KVM. Is this something worth adding? > (See arch/arm64/kvm/pkvm.c:kvm_hyp_reserve()). > > This reservation is done pretty early on in bootmem_init() so not sure > if this could cause some init ordering issues that might be tricky to > solve though. I also don't see what this buys us. This memory can't be reclaimed, and is not part of KVM's job for the purpose of running guests, which is what this series is about. If anything, it should be accounted separately. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel