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 771ECE81BCB for ; Mon, 9 Feb 2026 14:35:52 +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=G5DjyijfGtbyUVpdzUWCc0XniZUn2XCWYd26RF9xrGg=; b=dDi11wTbpYSW83DwNTdxEgT/2Q QL8DuPCs7Y8Gz7lk9KNBBNYZYQBWK5+AJEk3VIoSSFngBpGd3BODiuCI/EH9ZveW8U1x0/D+S81GE bqEU1hbjIkORC/Re5n3QhUnhTWxTGNVKqnTO39jva9qtYVysA6uV+uzIF/0FqQCW0EuvThoZFgqXs WRIqkzsoEHLyjxNcr4grFChfHZqGf6pnTab0Hd85PlSsIz4NOgwnIpHY6RgoyzS3yArp6fCDktxjm kEh8OgBVoNNQex3qobNFvxcpxE7y2Jf3T1EW3zyuPQPrjaixikxhlF3QEhQpNRqrdNmGI+abtoh+T nEXDgu5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vpSMc-0000000FW59-2PyJ; Mon, 09 Feb 2026 14:35:46 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vpSMc-0000000FW4v-06yc for linux-arm-kernel@lists.infradead.org; Mon, 09 Feb 2026 14:35:46 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id EF54E60140; Mon, 9 Feb 2026 14:35:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5C3DC116C6; Mon, 9 Feb 2026 14:35:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770647744; bh=b2yP8tzmgc4hWHflZtaIqwBaGN7tQP02e9esN0bF2gQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gi3ThxqODsLNa4pIvkZRStm9yMuULTTmPti+8nIJOWpNtdopKXf0cAam9XbG+4807 P0RsnHdW41BjfDb9f3cL7MnQENLHglRTQwdnZLldhjgsQqGnr+ZzTv16sJ/reB/0RH +lxTrA2G1VUL6rKhhaIhZKTrX3AWrcQANe+pTgBq329xoRqdBURxdj6U0y1ykeNCMT AkoWSJ/MaC8PKR7yaxuo/yTCTSpkAvQ6WIaMvzNLdGtZJ2+4sP4zbetC8yHcyzeVag IMutp0VnVjWQ1F6U49F9R+ioFvKdb4+f5SR6QF48J4SKbgt95Zv5NShWm4uCgb+OOv 2Zvj7xf7jUb/w== 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 1vpSMY-00000009mWm-11Vz; Mon, 09 Feb 2026 14:35:42 +0000 Date: Mon, 09 Feb 2026 14:35:41 +0000 Message-ID: <86wm0massi.wl-maz@kernel.org> From: Marc Zyngier To: "yezhenyu (A)" Cc: "rananta@google.com" , "will@kernel.org" , "oliver.upton@linux.dev" , "catalin.marinas@arm.com" , "dmatlack@google.com" , "linux-kernel@vger.kernel.org" , "kvmarm@lists.linux.dev" , "linux-arm-kernel@lists.infradead.org" , zhengchuan , Xiexiangyou , "guoqixin (A)" , "Mawen (Wayne)" Subject: Re: [RFC][PATCH] arm64: tlb: call kvm_call_hyp once during kvm_tlb_flush_vmid_range In-Reply-To: <42bcdd9100bf4c63b79d2b72bd6db951@huawei.com> References: <42bcdd9100bf4c63b79d2b72bd6db951@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: yezhenyu2@huawei.com, rananta@google.com, will@kernel.org, oliver.upton@linux.dev, catalin.marinas@arm.com, dmatlack@google.com, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, zhengchuan@huawei.com, xiexiangyou@huawei.com, guoqixin2@huawei.com, wayne.ma@huawei.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 Mon, 09 Feb 2026 13:14:07 +0000, "yezhenyu (A)" wrote: > > From 9982be89f55bd99b3683337223284f0011ed248e Mon Sep 17 00:00:00 2001 > From: eillon > Date: Mon, 9 Feb 2026 19:48:46 +0800 > Subject: [RFC][PATCH v1] arm64: tlb: call kvm_call_hyp once during > kvm_tlb_flush_vmid_range > > The kvm_tlb_flush_vmid_range() function is performance-critical > during live migration, but there is a while loop when the system > support flush tlb by range when the size is larger than MAX_TLBI_RANGE_PAGES. > > This results in frequent entry to kvm_call_hyp() and then a large What is the cost of kvm_call_hyp()? > amount of time is spent in kvm_clear_dirty_log_protect() during > migration(more than 50%). 50% of what time? The guest's run-time? The time spent doing TLBIs compared to the time spent in kvm_clear_dirty_log_protect()? > So, when the address range is large than > MAX_TLBI_RANGE_PAGES, directly call __kvm_tlb_flush_vmid to > optimize performance. Multiple things here: - there is no SoB, which means that patch cannot be considered for merging - there is no data showing how this change improves the situation for a large enough set of workloads - there is no description of a test that could be run on multiple implementations to check whether this change has a positive or negative impact If you want to progress this sort of things, you will need to address these points. Thanks, M. -- Without deviation from the norm, progress is not possible.