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=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 44366CA9EB7 for ; Tue, 22 Oct 2019 14:05:11 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 072E221783 for ; Tue, 22 Oct 2019 14:05:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 072E221783 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B53024A97C; Tue, 22 Oct 2019 10:05:10 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lbeGGCqcPOrO; Tue, 22 Oct 2019 10:05:05 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id AFDAA4A989; Tue, 22 Oct 2019 10:05:05 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id EC0604A981 for ; Tue, 22 Oct 2019 10:05:03 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JuG1shvqGHDP for ; Tue, 22 Oct 2019 10:04:59 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 0FE8E4A97C for ; Tue, 22 Oct 2019 10:04:59 -0400 (EDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6EBC985546 for ; Tue, 22 Oct 2019 14:04:58 +0000 (UTC) Received: by mail-wm1-f71.google.com with SMTP id g67so5959311wmg.4 for ; Tue, 22 Oct 2019 07:04:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GRXx0prZyWf8Ie3WBmFM/bIRv9+8DKKzcw/xRf9RZ/k=; b=iLWuloZvEECNFILrwUbCwofcy14J5Mn2BYWjSsY451qwu1Hp1opuWh8v+qsVDgd11/ G4iGQw6+dpjvI3hbRQe2ujlK+KxrcNtRLnfIcMrjynCwjKI7LF0sAM6KiC5wCOywpZc7 fdSW23dPIuDKtbD4zn1BZfoJETcv6UOH4K5CbhrbSyFWEppWygo/nM4Eh6KHIKj5yW5M 9sWF5sh3O1gvQahO4+gcMpsiHT6vzD0ehFTtcrARlqQ9RB/WgG6JMk3YAUcLnKhpx21B ep7H2g9QHtS9PqhHulEIrBfc6ekupFiSze9bYgbg+RwOo11zFHr+Hrieed5YMfSCLRGp uOLA== X-Gm-Message-State: APjAAAWq7zYLNj9D4wvbXZwvJKaS5uSzESFJ6cZOt3YO589xINbmCzAt Ob0DRFGuYZF1n8OKTafmcKY4yfPsjNrl5k0wROX/hie/qm587Rf98Pdaiou8aETOU+EpvkSoeTR m6PSytGCFwCwcYIZPuJtblk4D X-Received: by 2002:a1c:7e57:: with SMTP id z84mr3319627wmc.84.1571753096493; Tue, 22 Oct 2019 07:04:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWqRcFVSe00YfZqVULXyrnOBOt0DAtwntm2KhRrr6N6A/cSYud38QIAc8/I73DEBmlFbuFZw== X-Received: by 2002:a1c:7e57:: with SMTP id z84mr3319555wmc.84.1571753095982; Tue, 22 Oct 2019 07:04:55 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c0e4:dcf4:b543:ce19? ([2001:b07:6468:f312:c0e4:dcf4:b543:ce19]) by smtp.gmail.com with ESMTPSA id b196sm11755492wmd.24.2019.10.22.07.04.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Oct 2019 07:04:55 -0700 (PDT) Subject: Re: [PATCH v2 00/15] KVM: Dynamically size memslot arrays To: Sean Christopherson , James Hogan , Paul Mackerras , Christian Borntraeger , Janosch Frank , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Marc Zyngier References: <20191022003537.13013-1-sean.j.christopherson@intel.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <129444cc-5211-5b60-15fc-0f0fe998f023@redhat.com> Date: Tue, 22 Oct 2019 16:04:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191022003537.13013-1-sean.j.christopherson@intel.com> Content-Language: en-US Cc: Wanpeng Li , kvm@vger.kernel.org, David Hildenbrand , Joerg Roedel , Cornelia Huck , linux-mips@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Vitaly Kuznetsov , kvmarm@lists.cs.columbia.edu, Jim Mattson X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On 22/10/19 02:35, 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... > > v2: > - Split "Drop kvm_arch_create_memslot()" into three patches to move > minor functional changes to standalone patches [Janosch]. > - Rebase to latest kvm/queue (f0574a1cea5b, "KVM: x86: fix ...") > - Collect an Acked-by and a Reviewed-by I only have some cosmetic changes on patches 14-15. Let's wait for testing results. Paolo _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm