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 897A0CD1292 for ; Thu, 4 Apr 2024 21:28:06 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Y8zudLDi+O2HxzSbhaGb5MmySmyE6IucFqK54Zu4Nmw=; b=cH1HRAEe410gxO v8LtD1ngaap1Wr/Is2Mk2I7ChAr2LrtGXXgNpkK7ZzdLR3pPoualqY/WB6oG6tgb+isK99/Q1ble5 ZrLqfeY94GbyPUsmFrhIoiLHdBZwiSQsjNQqLPqSXlMHxlEXO0ECmhwPwxnXmEAIvzAYhsR6Cv7M+ 0fiuRGPVfHD3kACO0cairykhZe/hbJcNEKiMTozQglMbi8+SGZaiGeKNLkQq3+AUpUU924lDsFpvE wdYdfDPuc7NmlSIwU8buXstMkS0J9K5WhzPumnDlXVh5kq9PU9ARPDS9R3KyXjSbZ8dA5d+M+TohI zIzTdKMMrdbbVEPO/yJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsUcn-00000004KQX-2uAY; Thu, 04 Apr 2024 21:27:57 +0000 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rsUck-00000004KNP-0ca1 for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2024 21:27:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1712266074; x=1743802074; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vXMyRUMmIDSRpvnnN6Ds8+s/LCFeDKLvTc9elA3zE8M=; b=qFmtx2VsE7/Kxe83jEwr4Q2KlbcM6fv17quknEI93WTmH5aj+nY57gAd 7FbupT8jMd1vvQWYBIDagxwMH0DOluxFNcg4uTf+z3JAnikRgA1UAaNn6 GMuQHgtOKAPBAbhYX+rhf4eYV0xwquftvaKiG6ZZ8aZM6XD0rJRutN+V1 Q=; X-IronPort-AV: E=Sophos;i="6.07,180,1708387200"; d="scan'208";a="392718183" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev) ([10.43.8.6]) by smtp-border-fw-2101.iad2.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Apr 2024 21:27:49 +0000 Received: from EX19MTAUWC002.ant.amazon.com [10.0.7.35:38359] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.49.69:2525] with esmtp (Farcaster) id 9ce1e057-8baf-481b-b517-faf690d2bbe9; Thu, 4 Apr 2024 21:27:48 +0000 (UTC) X-Farcaster-Flow-ID: 9ce1e057-8baf-481b-b517-faf690d2bbe9 Received: from EX19D002UWA003.ant.amazon.com (10.13.138.235) by EX19MTAUWC002.ant.amazon.com (10.250.64.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Thu, 4 Apr 2024 21:27:48 +0000 Received: from EX19MTAUEA001.ant.amazon.com (10.252.134.203) by EX19D002UWA003.ant.amazon.com (10.13.138.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Thu, 4 Apr 2024 21:27:47 +0000 Received: from dev-dsk-alisaidi-1d-b9a0e636.us-east-1.amazon.com (172.19.181.128) by mail-relay.amazon.com (10.252.134.102) with Microsoft SMTP Server id 15.2.1258.28 via Frontend Transport; Thu, 4 Apr 2024 21:27:47 +0000 Received: by dev-dsk-alisaidi-1d-b9a0e636.us-east-1.amazon.com (Postfix, from userid 5131138) id 8F20F235D; Thu, 4 Apr 2024 21:27:47 +0000 (UTC) From: Ali Saidi To: CC: , , , , , , , , , , , Subject: Re: [PATCH] KVM: arm64: Limit stage2_apply_range() batch size to smallest block Date: Thu, 4 Apr 2024 21:27:42 +0000 Message-ID: <20240404212742.11248-1-alisaidi@amazon.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240404044028.GA1976@templeofstupid.com> References: <20240404044028.GA1976@templeofstupid.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240404_142754_395094_0056DE0A X-CRM114-Status: GOOD ( 13.38 ) 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 I measured the time it takes to unmap a VM by changing the kvm_page_table_test to report it. It's and on Graviton3 it's about 300ms per 1GB of flushing with 4KB pages. Unmapping 128GB takes around 39.5s and with a single call to __kvm_tlb_flush_vmid() instead of the 32M calls to __kvm_tlb_flush_vmid_ipa() reduces this to around 5.9s (~7x). This means each iteration of the stage2_apply_range() is reduced to 46ms. So we're certainly calling cond_resched() a whole lot more. > 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. That is a bit unexpected that the performance wasn't worse with the patch Will sent because it should have disabled the range invalidates since they these invalidates will be getting rid of blocks? Which Graviton were you testing this on? Ali _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel