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 4F119CD1297 for ; Thu, 4 Apr 2024 04:40:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hWnIyqy0uvQsrfZzfSWCv7tSjaQO7Ck/rP+dw1Y5b5k=; b=px1rxjHezEGFvE OgyH3Nh+EA5WVYcw4TlB9B3Zzm/u6sHECjoo8oyU8d+mm2tcrY1KgO3/oGFYAlsYDyFoe+fXliEb7 LJpo3McEnN/dzUJBe3JdBghgKKDPwlxvYQTWyqgFRS6C1/rg9RYmva0WoHddC7JrIKS7G6abvSLQY Z/OnhafG3k0AN5l/GLwTcV0IZQmVBNP5Th1n/WlziCPgLZgmiHUh2su3Ld3QjRN28dUXG2UsDENRn 041uQ8MWJU4eguUupP1HHExj2v85Mu5rmaz8X3+znd7FZoHb246IxW84FfC7exEwhLX+Hl58gN83f 8kq1r6Jz6NmqtIXrdvdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsEtw-00000001C2l-3WxV; Thu, 04 Apr 2024 04:40:36 +0000 Received: from iguana.tulip.relay.mailchannels.net ([23.83.218.253]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsEtu-00000001C23-1V3i for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2024 04:40:35 +0000 X-Sender-Id: dreamhost|x-authsender|kjlx@templeofstupid.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 76FEC6C29BE for ; Thu, 4 Apr 2024 04:40:32 +0000 (UTC) Received: from pdx1-sub0-mail-a235.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 204A76C1EF6 for ; Thu, 4 Apr 2024 04:40:32 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1712205632; a=rsa-sha256; cv=none; b=dorPU/wSejc1rTp7F0tQhjaQk54CY5ZmcP+2FSKno9w9bP2Er+L1xg4liTatY2kG5C0HJ9 4sYy2OTBFxEV78g75FvJCxY0G+Ei8T9hLC9cuUZkbGAGFA+IffdTxuMxe25MkvrQqlFC3o p31McAUY86cCwqvQCWURz0RQ3A+ZWFY2snbSQSf0b/XTIivMu2iEAMQ0P7XQKGXt5NxuzC BUCJQyqsZsiG3CwuZC1G0H5T2g1MO3VBcYMevhYNX/ZfVZhN6fJKcIcmU8Qb6M6Rjh0T9g 7FzqunDKvZiow1zYmCjXc00/KD42qv4w5PN7xNIggIuhJaR0bb8QRPwUz41w4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1712205632; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=kE06ODyDv7LpjuZm1itjYyzIs393wMc50zgjG2XOxGY=; b=fZR1pS2gn3ql3UCMtUH4Sgmv+nWgI/KydctI1iGNJJn6QF8nZ0lRe94T8ggfBOtY8n9/YK ssyWt1GAvxoKRsWNz6CeDpfI89qZrBGqKvEPU976iEwlkjWduisH71WKts/ulEe6fNNCd/ TQcYjyDA49z5Oo5Kh8Ahq/KQ2pXCVuBZnrb7SS6DqSbPKrqriNuT+dZkrDfv3iuz4OmMVA FAMTAs3duUi9qZzBRJHTEoCbVBZ0s+HF/pnf2+9w9BPSqGiK0YBqmVm3m8lsbZBX0O1knM TP+9xUNpYKQ4KAkH1EYYDWI48qoT/Y7YMvhKYfVAuPmEC0TXw8YJDnPADmlCQw== ARC-Authentication-Results: i=1; rspamd-86f86f958-tl549; auth=pass smtp.auth=dreamhost smtp.mailfrom=kjlx@templeofstupid.com X-Sender-Id: dreamhost|x-authsender|kjlx@templeofstupid.com X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|kjlx@templeofstupid.com X-MailChannels-Auth-Id: dreamhost X-Broad-Hysterical: 19a58a3c69d78f47_1712205632363_1568398405 X-MC-Loop-Signature: 1712205632363:2845387026 X-MC-Ingress-Time: 1712205632363 Received: from pdx1-sub0-mail-a235.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.98.182.134 (trex/6.9.2); Thu, 04 Apr 2024 04:40:32 +0000 Received: from kmjvbox.templeofstupid.com (c-73-222-159-162.hsd1.ca.comcast.net [73.222.159.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kjlx@templeofstupid.com) by pdx1-sub0-mail-a235.dreamhost.com (Postfix) with ESMTPSA id 4V987M6Jplzmd for ; Wed, 3 Apr 2024 21:40:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=templeofstupid.com; s=dreamhost; t=1712205631; bh=kE06ODyDv7LpjuZm1itjYyzIs393wMc50zgjG2XOxGY=; h=Date:From:To:Cc:Subject:Content-Type; b=caiU1hhFuLHmOXH/bmpsvb5OEP9TMe/Cja818DY3HvLMi24UQtjm5lWlCxXLggL/Z m5cHe8tN5CYbxqziAgCiz92aGITCgkrx/8zdo7Sk2Wrh02vqFFPE6zIFaaE8ya1iwy KwrN2HJkzD+Bp2jjzP2j6S9MC0HbpYAJ9o1GpfYxPpq/FZyh4+eKGF5YcqeyvlD70n gNV5If3HTDFErkP5RRa/eijw8U9MUGH3WTiSYAa7k2RVk4RG/2a7pjE9/PokOKtzmZ DTwdu9S+scgUD1CWqQjEPH0u2k5kUBeCIv+Tserv5D37Elksiuty+5YwCILcBcQXjO SBbLHw6nZxKKQ== Received: from johansen (uid 1000) (envelope-from kjlx@templeofstupid.com) id e0189 by kmjvbox.templeofstupid.com (DragonFly Mail Agent v0.12); Wed, 03 Apr 2024 21:40:28 -0700 Date: Wed, 3 Apr 2024 21:40:28 -0700 From: Krister Johansen To: Marc Zyngier Cc: Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Ali Saidi , David Reaver , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: arm64: Limit stage2_apply_range() batch size to smallest block Message-ID: <20240404044028.GA1976@templeofstupid.com> References: <20240329191537.GA2051@templeofstupid.com> <87r0fsrpko.wl-maz@kernel.org> <20240402170052.GA1988@templeofstupid.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240402170052.GA1988@templeofstupid.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240403_214034_554364_AF10E6CD X-CRM114-Status: GOOD ( 31.00 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Apr 02, 2024 at 10:00:53AM -0700, Krister Johansen wrote: > On Sat, Mar 30, 2024 at 10:17:43AM +0000, Marc Zyngier wrote: > > On Fri, 29 Mar 2024 19:15:37 +0000, > > Krister Johansen wrote: > > > On Fri, Mar 29, 2024 at 06:48:38AM -0700, Oliver Upton wrote: > > > > On Thu, Mar 28, 2024 at 12:05:08PM -0700, Krister Johansen wrote: > > > > > Further reducing the stage2_apply_range() batch size has substantial > > > > > performance improvements for IO that share a CPU performing an unmap > > > > > operation. By switching to a 2mb chunk, IO performance regressions were > > > > > no longer observed in this author's tests. E.g. it was possible to > > > > > obtain the advertised device throughput despite an unmap operation > > > > > occurring on the CPU where the interrupt was running. There is a > > > > > tradeoff, however. No changes were observed in per-operation timings > > > > > when running the kvm_pagetable_test without an interrupt load. However, > > > > > with a 64gb VM, 1 vcpu, and 4k pages and a IO load, map times increased > > > > > by about 15% and unmap times increased by about 58%. In essence, this > > > > > trades slower map/unmap times for improved IO throughput. > > > > > > > > There are other users of the range-based operations, like > > > > write-protection. Live migration is especially sensitive to the latency > > > > of page table updates as it can affect the VMM's ability to converge > > > > with the guest. > > > > > > To be clear, the reduction in performance was observed when I > > > concurrently executed both the kvm_pagetable_test and a networking > > > benchmark where the NIC's interrupts were assigned to the same CPU where > > > the pagetable test was executing. I didn't see a slowdown just running > > > the pagetable test. > > > > Any chance you could share more details about your HW configuration > > (what CPU is that?) and the type of traffic? This is the sort of > > things I'd like to be able to reproduce in order to experiment various > > strategies. > > Sure, I only have access to documentation that is publicly available. > > The hardware where we ran into this inititally was Graviton 3, which is > a Neoverse-V1 based core. It does not support FEAT_TLBIRANGE. I've > also tested on Graviton 4, which is Neoverse-V2 based. It _does_ > support FEAT_TLBIRANGE. The deferred range based invalidation > support, was enough to allow us to teardown a large VM based on 4k pages > and not incur a visible performance penalty. I haven't had a chance to > test to see if and how Will's patches change this, though. Just a quick followup that I did test Will's patches and didn't find that it changed the performance of the workload that I'd been testing. IOW, I wasn't able to discern a network performance difference between the baseline and those changes. Thanks, -K _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel