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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D45F5C433EF for ; Tue, 16 Nov 2021 14:22:51 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 65E7F61502 for ; Tue, 16 Nov 2021 14:22:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 65E7F61502 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HtpDp0Fs8z304V for ; Wed, 17 Nov 2021 01:22:50 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=L0io7zGs; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=L0io7zGs; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=pbonzini@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=L0io7zGs; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=L0io7zGs; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HtpD26tNBz2xtK for ; Wed, 17 Nov 2021 01:22:10 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637072527; 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=7lWWPWi0Wsw1vOClqmw0uD7Kp+n7bnIBYYv23z0XPl4=; b=L0io7zGs9BF6ABFiSyPGmOqoizpKVU9JanN+82x7ASHVdcqGdFFsW2G4oj3TeWgjnKkzUs OzXaesPvB77Ft2OZdIbarkY09wIF9zgdua1MWWwom8H8UD0RjRj2lUMsH/WiAiZgWoHMkJ PfbGeb0h7Pmx6VvmWouSr6l74G+kYa0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637072527; 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=7lWWPWi0Wsw1vOClqmw0uD7Kp+n7bnIBYYv23z0XPl4=; b=L0io7zGs9BF6ABFiSyPGmOqoizpKVU9JanN+82x7ASHVdcqGdFFsW2G4oj3TeWgjnKkzUs OzXaesPvB77Ft2OZdIbarkY09wIF9zgdua1MWWwom8H8UD0RjRj2lUMsH/WiAiZgWoHMkJ PfbGeb0h7Pmx6VvmWouSr6l74G+kYa0= 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-346-rGoQUqOlPDaEPcwErS8TUQ-1; Tue, 16 Nov 2021 09:22:01 -0500 X-MC-Unique: rGoQUqOlPDaEPcwErS8TUQ-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 18284BBEEF; Tue, 16 Nov 2021 14:21:59 +0000 (UTC) Received: from [10.39.192.245] (unknown [10.39.192.245]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4179B1F429; Tue, 16 Nov 2021 14:21:40 +0000 (UTC) Message-ID: Date: Tue, 16 Nov 2021 15:21:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH 0/5] KVM: Turn the vcpu array into an xarray Content-Language: en-US To: Juergen Gross , Marc Zyngier , kvm@vger.kernel.org, linux-mips@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linuxppc-dev@lists.ozlabs.org References: <20211105192101.3862492-1-maz@kernel.org> <6232cbcb-b2e2-e79f-a520-43d552f35243@suse.com> From: Paolo Bonzini In-Reply-To: <6232cbcb-b2e2-e79f-a520-43d552f35243@suse.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , Janosch Frank , Christian Borntraeger , Sean Christopherson , Anup Patel , David Hildenbrand , Nicholas Piggin , Atish Patra , Aleksandar Markovic , Paul Mackerras , James Morse , kernel-team@android.com, Claudio Imbrenda , Alexandru Elisei , Suzuki K Poulose Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 11/16/21 15:13, Juergen Gross wrote: > On 05.11.21 20:20, Marc Zyngier wrote: >> The kvm structure is pretty large. A large portion of it is the vcpu >> array, which is 4kB on x86_64 and arm64 as they deal with 512 vcpu >> VMs. Of course, hardly anyone runs VMs this big, so this is often a >> net waste of memory and cache locality. >> >> A possible approach is to turn the fixed-size array into an xarray, >> which results in a net code deletion after a bit of cleanup. >> >> This series is on top of the current linux/master as it touches the >> RISC-V implementation. Only tested on arm64. >> >> Marc Zyngier (5): >>    KVM: Move wiping of the kvm->vcpus array to common code >>    KVM: mips: Use kvm_get_vcpu() instead of open-coded access >>    KVM: s390: Use kvm_get_vcpu() instead of open-coded access >>    KVM: x86: Use kvm_get_vcpu() instead of open-coded access >>    KVM: Convert the kvm->vcpus array to a xarray >> >>   arch/arm64/kvm/arm.c           | 10 +--------- >>   arch/mips/kvm/loongson_ipi.c   |  4 ++-- >>   arch/mips/kvm/mips.c           | 23 ++--------------------- >>   arch/powerpc/kvm/powerpc.c     | 10 +--------- >>   arch/riscv/kvm/vm.c            | 10 +--------- >>   arch/s390/kvm/kvm-s390.c       | 26 ++++++-------------------- >>   arch/x86/kvm/vmx/posted_intr.c |  2 +- >>   arch/x86/kvm/x86.c             |  9 +-------- >>   include/linux/kvm_host.h       |  7 ++++--- >>   virt/kvm/kvm_main.c            | 33 ++++++++++++++++++++++++++------- >>   10 files changed, 45 insertions(+), 89 deletions(-) >> > > For x86 you can add my: > > Tested-by: Juergen Gross Heh, unfortunately x86 is the only one that needs a change in patch 4. I'll Cc you on my version. Paolo