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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 A71AAC2D0CD for ; Wed, 18 Dec 2019 18:11:13 +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 7B591218AC for ; Wed, 18 Dec 2019 18:11:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZFk3wroV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B591218AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:From:Date: MIME-Version:Subject:To:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZrJ5ODhjHeyDbFyWyZ3GPL+WDhMZaGbOiIetwdavNLc=; b=ZFk3wroVWbevpDa09QhIF5Rdf auJ+iZHl5GiW4ImyPPgiU3XEpMAIyBuSGWI9bHrUjG1eKAMiu75vn77/+3ib9I8eiVS6iP0vo45CC L7rbpsONUZJFnBNufgrw0PP5VJUAokcyW7cckNuavVjNlPLlPjTKEkWANsrlYTrq4AMsEYgy0kWLN QKZJQPR/NoJxkQWRl5ySDAJ4eRQoPdxi7JYgP8oegj3u0HvutCmxu9WbfIO77l+ZA6AiO7H0Y3StQ gXvs4FRA+yasvX9DYjWNMxDAu702p7IoN3LusGXN7sYRtUad6Ma96Zi0NnGPmnti3eWz6qF1TCpla P/kyl8jsA==; 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 1ihdmx-0001c9-Rk; Wed, 18 Dec 2019 18:11:11 +0000 Received: from inca-roads.misterjones.org ([213.251.177.50]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihdmu-0001bW-JE for linux-arm-kernel@lists.infradead.org; Wed, 18 Dec 2019 18:11:10 +0000 Received: from www-data by cheepnis.misterjones.org with local (Exim 4.80) (envelope-from ) id 1ihdmZ-0007pw-8W; Wed, 18 Dec 2019 19:10:47 +0100 To: Sean Christopherson Subject: Re: [PATCH v4 00/19] KVM: Dynamically size memslot arrays X-PHP-Originating-Script: 0:main.inc MIME-Version: 1.0 Date: Wed, 18 Dec 2019 18:10:47 +0000 From: Marc Zyngier In-Reply-To: <20191217204041.10815-1-sean.j.christopherson@intel.com> References: <20191217204041.10815-1-sean.j.christopherson@intel.com> Message-ID: <3a6b03cc1300bc3cffd3904e22c09478@www.loen.fr> X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/0.7.2 X-SA-Exim-Connect-IP: X-SA-Exim-Rcpt-To: sean.j.christopherson@intel.com, jhogan@kernel.org, paulus@ozlabs.org, borntraeger@de.ibm.com, frankja@linux.ibm.com, pbonzini@redhat.com, david@redhat.com, cohuck@redhat.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, linux-mips@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, christoffer.dall@arm.com, f4bug@amsat.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on cheepnis.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191218_101108_780341_0F644578 X-CRM114-Status: GOOD ( 13.93 ) 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: Wanpeng Li , kvm@vger.kernel.org, David Hildenbrand , James Hogan , linux-mips@vger.kernel.org, Paul Mackerras , kvmarm@lists.cs.columbia.edu, Janosch Frank , Joerg Roedel , Christian Borntraeger , Julien Thierry , Suzuki K Poulose , kvm-ppc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jim Mattson , Cornelia Huck , Christoffer Dall , linux-kernel@vger.kernel.org, James Morse , Paolo Bonzini , Vitaly Kuznetsov , =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2019-12-17 20:40, 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 17/19 and 18/19. > > Patches 2-16 clean up the memslot code, which has gotten quite > crusty, > 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. > > The only functional change in v4 is the addition of an x86-specific > bug > fix in x86's handling of KVM_MR_MOVE. The bug fix is not directly > related > to dynamically allocating memslots, but it has subtle and hidden > conflicts > with the cleanup patches, and the fix is higher priority than > anything > else in the series, i.e. should be merged first. > > On non-x86 architectures, v3 and v4 should be functionally > equivalent, > the only non-x86 change in v4 is the dropping of a "const" in > kvm_arch_commit_memory_region(). Gave it another go on top of 5.5-rc2 on an arm64 box, and nothing exploded. So thumbs up from me. Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel