Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp294318pxb; Wed, 3 Feb 2021 05:56:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJySnSVmXlsoZ2FO4j3x9IilnV4EUmc72o+UfIOR/fyJjDkurl7S1aLQPkOq27jJ52rjnuJH X-Received: by 2002:aa7:d912:: with SMTP id a18mr3087809edr.73.1612360588555; Wed, 03 Feb 2021 05:56:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612360588; cv=none; d=google.com; s=arc-20160816; b=flrxg3trR6cfREQh0ai6RoF6zryDgZnoXnx5KXohfRoW36Eb81S7MYf6CKHOtPsF7i BUFACDN+u/H5bt8Io7Mi3u/WzHuAFEveGHVyLmczWrjTfhkwJmPE5rla+r0XWSgTin4e Hna6S42AyTsN8U8bk2wcIvXfv6T9QG1e0A2Fmz21qqKkha/jup0WiXR2msFFx79R3A7g q3MswZcF8lSscKWYx7z6ZYkFChS78GWVrbti3wxj2wMF54Xx/JfrF6qi+sylYgbSHCsE t7XLmOzlju/6CHDWBDI+Wb9q7i0ciTTwP+fhX6sTGjDy2LbrzoOmc4uFJGhhM7QuwzzL E0nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject :organization:from:references:cc:to:dkim-signature; bh=px52d5AvHJ49VuQLZY1SD+L1Jaeps3GqOjk9GodXnr4=; b=ZLBvq3BdcX08Ug5a1bB1tJ3dVh520rPZrpsG+ZZsK58cDrwGa+PrbiVANDWrVrcC2C b1S9HpxnKPVfvh2MZGD0l5iv1nnulmhNeyHFVYAgvZMpH1mXrV2IYmO3r9pThtYsyHF8 siZAP1B6Rik2HIhX9nwVB7335D/iK//pzvjrXqH1zWdMo+VYtfaSvykvN3CA8jDcZ1hh okaFmyb3NBNJ5/Qmbp+PSCy2jV+6iciChCBUSEc2rnmktD96Ggc2AYbonrMIcITFwfN9 RyCOzqhC3oGYjzwhBY42Mm1w7aSZdSbNIzaWDYCSGMwRjJmRrN8Y3VbC+veFGry+KOLS GAvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FgZGHP7X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qp24si1490598ejb.563.2021.02.03.05.56.01; Wed, 03 Feb 2021 05:56:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FgZGHP7X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232305AbhBCNzb (ORCPT + 99 others); Wed, 3 Feb 2021 08:55:31 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:55203 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232577AbhBCNy0 (ORCPT ); Wed, 3 Feb 2021 08:54:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612360381; 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=FgZGHP7XbgZZk9ZVqprZg9f5/2lr56gToFIJslQ2xj+8UcdCw2N+ojLJJ5YuhMfWmE98T/ fkqYt+mlG/AZIeK/6WD6zLPYsPAr94eQ7hllDOB7P+h8dSOjvP/KnyABDzY/O6B1z4iEcj yhVwbaHYSvnnVuB9CvRMpGHzLiXq7lg= 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: linux-kernel@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