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=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 A0C85CA9EB6 for ; Wed, 23 Oct 2019 09:40:12 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5ADB321D7B for ; Wed, 23 Oct 2019 09:40:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RHz8J2uE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5ADB321D7B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Uricg6E4spgyQA7fQv2H2KGK+V1cvOTLeGHODTmNB+c=; b=RHz8J2uEPLd6H4 egBi/nUGMZSsD/qqshJTqJ2lXSd02iAWs93Qdzp7E/p8NJaWB1OhxAsV1U6OJWbs/jihhWSDpdAbI Wj/XoRZm9WS+Dgpr+Ty1vuU6q5Y+RZABxHAwvqi/kJrCQxvTR/YpaqcTKWKQfAG2GtAKcr8qCggNn Tl/AGtRIImqbtC6zgNK/mobafbhzFBVXO0rJHrzuUqvC6XV3+gFL2LTTjWOWwbmht/j3sowrEcA+R EgnWbft+IJc0pvAiQNO2hHSOLb109cTcwJY4tLKJi22WOH0Yjvl5Hh13gHd6P5Y83ecNWdSZXniKF bUUt31gDp+Xew+hpkXfQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iND7j-00015g-3R; Wed, 23 Oct 2019 09:40:11 +0000 Received: from [217.140.110.172] (helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iND7f-0008WE-3J for linux-arm-kernel@lists.infradead.org; Wed, 23 Oct 2019 09:40:08 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7E4F91688; Wed, 23 Oct 2019 02:39:56 -0700 (PDT) Received: from localhost (e113682-lin.copenhagen.arm.com [10.32.145.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 07AC83F718; Wed, 23 Oct 2019 02:39:55 -0700 (PDT) Date: Wed, 23 Oct 2019 11:39:54 +0200 From: Christoffer Dall To: Sean Christopherson Subject: Re: [PATCH v2 00/15] KVM: Dynamically size memslot arrays Message-ID: <20191023093954.GH2652@e113682-lin.lund.arm.com> References: <20191022003537.13013-1-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191022003537.13013-1-sean.j.christopherson@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191023_024007_206887_342B8CFE X-CRM114-Status: GOOD ( 13.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , Wanpeng Li , Janosch Frank , kvm@vger.kernel.org, Radim =?utf-8?B?S3LEjW3DocWZ?= , James Hogan , Joerg Roedel , David Hildenbrand , linux-mips@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Mackerras , Christian Borntraeger , Marc Zyngier , Paolo Bonzini , Vitaly Kuznetsov , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Jim Mattson Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 21, 2019 at 05:35:22PM -0700, Sean Christopherson wrote: > The end goal of this series is to dynamically size the memslot array so > that KVM allocates memory based on the number of memslots in use, as > opposed to unconditionally allocating memory for the maximum number of > memslots. On x86, each memslot consumes 88 bytes, and so with 2 address > spaces of 512 memslots, each VM consumes ~90k bytes for the memslots. > E.g. given a VM that uses a total of 30 memslots, dynamic sizing reduces > the memory footprint from 90k to ~2.6k bytes. > > The changes required to support dynamic sizing are relatively small, > e.g. are essentially contained in patches 12/13 and 13/13. Patches 1-11 > clean up the memslot code, which has gotten quite crusy, especially > __kvm_set_memory_region(). The clean up is likely not strictly necessary > to switch to dynamic sizing, but I didn't have a remotely reasonable > level of confidence in the correctness of the dynamic sizing without first > doing the clean up. > > Testing, especially non-x86 platforms, would be greatly appreciated. The > non-x86 changes are for all intents and purposes untested, e.g. I compile > tested pieces of the code by copying them into x86, but that's it. In > theory, the vast majority of the functional changes are arch agnostic, in > theory... I've built this for arm/arm64, and I've ran my usual set of tests which pass fine. I've also run the selftest framework's tests for the dirty logging and the migration loop test for arm64, and they pass fine. You can add my (for arm64): Tested-by: Christoffer Dall _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel