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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A332AC982DC for ; Fri, 18 Sep 2026 12:08:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=G4d5dLgZ43pLk8TSCsaTKNXKqimNxe33+rcdWHI4/Ps=; b=iU2Y4FLlimgF0PaQkgsX1KDY2E oa9DGi+kpqcCswUCZIVoarNiaXzmEwuXcvCWu0Fb7TC6UlhtHa6Uw/jl40w8gOUDfcDiFk5i1Ld9E V+uRS93+yuNA566u5jFxWerw2VBMyVxLhwD4vHaYTcpaXkCPuFCKiK4u5DADcQupNqWtheLArqpuL DKjcKEqB1abaMY/cqjuEZd/haxyikjnuvtGLWx7F++FhV9bv08tMQDMXiB7MCwIfTPz5Bd2aGM/Ut s281Kb2ChenCM305TdQ/CngX5xaxA/pkMM8+2U73hhXzrG/q5y0QWRzQx2FRZGOqFp/xG7vCgOulw Ec85mQyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x7XOd-0000000EKZQ-2IrW; Fri, 18 Sep 2026 12:08:51 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x7XOc-0000000EKYz-0Csp for linux-arm-kernel@lists.infradead.org; Fri, 18 Sep 2026 12:08:50 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id E2DFA60A82; Fri, 18 Sep 2026 12:08:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 996E91F000FF; Fri, 18 Sep 2026 12:08:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789733328; bh=G4d5dLgZ43pLk8TSCsaTKNXKqimNxe33+rcdWHI4/Ps=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=hZOcONQZM/7dyiIb7+ABgovOGFzxsjfE2GXrUOCGH3p9zOIG/4jfmxC5JYF5R9Sxp qTDnAMT/Ef0urHdJFDozTZ2B0qR2F3RRtYT0qWVv57+fZraHO+fzv210gGOILxIDie v7e+pclrwT/8hXbswE+Lt+7bM/Lq/6fXNzwO/myEvu2IqBgIqzZcR6PcMA9TIsReeZ FpSDpRBecChPm4MR7yYy226fD6lD//juIo8yyt8yIlbxWerkFMKtvBNX0Fiy+ZEi9q A4ivdS240J/HG8JJGwUt7DtTaVk6iSPpL3KlPk6W4YWmyVAH0IyHBQ2c1kYs694LUQ 0ar2KY27fkkmA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7XOY-0000000Aaln-1a8h; Fri, 18 Sep 2026 12:08:46 +0000 Date: Fri, 18 Sep 2026 13:08:45 +0100 Message-ID: <861paq69te.wl-maz@kernel.org> From: Marc Zyngier To: Yize Wang Cc: , , , , , , , , , , , , , , Subject: Re: [PATCH 0/2] Batch register access for live migration optimization In-Reply-To: <20260918081930.4014735-1-wangyize7@huawei.com> References: <20260918081930.4014735-1-wangyize7@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: wangyize7@huawei.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, oupton@kernel.org, catalin.marinas@arm.com, will@kernel.org, fuad.tabba@linux.dev, joey.gouly@arm.com, seiden@linux.ibm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, mark.rutland@arm.com, zhengchuan@huawei.com, jiangjiacheng@huawei.com, yize_w1110@163.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 18 Sep 2026 09:18:13 +0100, Yize Wang wrote: > > This series adds batch register access support to KVM/arm64 to reduce > syscall overhead during VM live migration. > > Currently, QEMU issues one ioctl per register when saving/restoring VGIC > state. On large VM configurations this means tens of thousands of syscalls, > where lock acquisition and context switch overhead dominates migration > downtime. Thus, we provide a batch register method to allow userspace > read/write multiple distributor and redistributor registers in a single call. > In this way, we can significantly reduce syscalls and migration downtime. > > Test the VM migration time under pressure conditions. > The VM specifications for migration are as follows: > - VM use 4-K page; > - the number of VCPU is 160; > - the total memory is 320Gigabit; > - use 'Redis SET-benchmark' to pressurize VM; > > Performance results (3-run average, ms): > | Metric | Without patch | With patch | Improvement | > |---------------------|---------------|------------|-------------| > | Migration downtime | 536 | 321 | 40% | > | Source (total) | 344 | 230 | 33% | > | - VGIC put | 158 | 40 | 75% | > | - VGIC get | 120 | 19 | 84% | > | Destination (total) | 192 | 91 | 53% | > | - VGIC put | 132 | 27 | 80% | > > Yize Wang (2): > KVM: arm64: Add batch group constant and data structure to UAPI header > KVM: arm64: Add VGIC v3 batch register access implementation Questions: - Why only the MMIO registers? - Why not the sysregs? - Why only the GIC? - Why not all of the state? - Where is the corresponding userspace code? More importantly, since this is about batching system calls: - Why can't this be done with io_uring instead? M. -- Without deviation from the norm, progress is not possible.