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=-8.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,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 57965C433DB for ; Wed, 3 Feb 2021 13:56:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 077C564E4B for ; Wed, 3 Feb 2021 13:56:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232065AbhBCN4B (ORCPT ); Wed, 3 Feb 2021 08:56:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:55418 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231721AbhBCNzl (ORCPT ); Wed, 3 Feb 2021 08:55:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612360454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=px52d5AvHJ49VuQLZY1SD+L1Jaeps3GqOjk9GodXnr4=; b=U8ubk0qUHE97GAupBMa+QIV48QUoU+wxxmwFNfKHYqtVdzop7Ato4AGZCS3+WC/kuNJvYL D3U9qMf8J14gFEMGABy2iLpx5wWayZvyCp97D4vfS3j6d2cApwXQYZod1tzHYj0jrAZH6L LpbNBuNdAk7lyMY1pcLmL8lPozsqd3A= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-231-s_XPbuV3NQCubAgtjZxbDg-1; Wed, 03 Feb 2021 08:52:50 -0500 X-MC-Unique: s_XPbuV3NQCubAgtjZxbDg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9DF0180196F; Wed, 3 Feb 2021 13:52:47 +0000 (UTC) Received: from [10.36.112.222] (ovpn-112-222.ams2.redhat.com [10.36.112.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 922C519C59; Wed, 3 Feb 2021 13:52:43 +0000 (UTC) To: Paolo Bonzini , "Maciej S. Szmigiero" , Sean Christopherson Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Igor Mammedov , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Christian Borntraeger , Janosch Frank , Cornelia Huck , Claudio Imbrenda , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <4d748e0fd50bac68ece6952129aed319502b6853.1612140117.git.maciej.szmigiero@oracle.com> <9e6ca093-35c3-7cca-443b-9f635df4891d@maciej.szmigiero.name> <4bdcb44c-c35d-45b2-c0c1-e857e0fd383e@redhat.com> <5efd931f-9d69-2936-89e8-278fe106616d@redhat.com> <307603f3-52a8-7464-ba98-06cbe4ddd408@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Subject: Re: [PATCH 2/2] KVM: Scalable memslots implementation Message-ID: Date: Wed, 3 Feb 2021 14:52:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <307603f3-52a8-7464-ba98-06cbe4ddd408@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 03.02.21 14:46, Paolo Bonzini wrote: > On 03/02/21 14:44, David Hildenbrand wrote: >> BTW: what are your thoughts regarding converting the rmap array on >> x86-64 into some dynamic datastructre (xarray etc)? Has that already >> been discussed? > > Hasn't been discussed---as always, showing the code would be the best > way to start a discussion. :) If only a workday would have more hours :) > > However, note that the TDP MMU does not need an rmap at all. Since that > one is getting ready to become the default, the benefits of working on > the rmap would be quite small and only affect nested virtualization. Right, but we currently always have to allocate it. 8 bytes per 4k page, 8 bytes per 2M page, 8 bytes per 1G page. The 4k part alone is 0.2% of the memblock size. For a 1 TB memslot we might "waste" > 2 GB on rmap arrays. (that's why I am asking :) ) -- Thanks, David / dhildenb