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 DA27BC433F5 for ; Sat, 19 Feb 2022 09:43:41 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:Cc:To:From :Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zEZouBrNhVr8gM+QHgBb5twgYxeyOgFTxrf3yV68XJo=; b=RaSTlgT5JoQsKB3h0rYDD2fEOF qBzZ4X5U2jAvxnPBXZYn5VUp503RCHlqXdMLfPv54NQrfaMktsStEy9sukcEwVAV9Rve8TxfAz0KR seeBOmBrA7aJJViPEV1reYc/S7nQDqNqTWcKmwLwKJvWvGJJpKL6bLCGqjp/o92za3ycFZ3YppgW7 vt4ZGdnP/h4JYoGxnwp8c35Nyz+4yOtdAojIY/vPdXRELPUCs4GY2t7RhMnP2P4hrSRSP+ezCprR4 2EC+5DWdnOoLLarWAM/cgm08RFSrShD9sUy8cZgk7cOSVXs2bi9uS+voE1QyLnCRS8uTgNnEriKIC 9tf0QVNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nLMG2-00GacF-Ni; Sat, 19 Feb 2022 09:42:26 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nLMFz-00Gabl-1x for linux-arm-kernel@lists.infradead.org; Sat, 19 Feb 2022 09:42:24 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8F5D860FBE; Sat, 19 Feb 2022 09:42:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E747CC004E1; Sat, 19 Feb 2022 09:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645263742; bh=JHGMB5wyXhuUeu/pJD4Q++IqqHBbSh5JNv1xBjTAPEA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CSFEtGbLDSfNNskaealbTBWwp5XwQV4VUJ6arAPCR4vH1cHFzWXl3FW/exhom/Tc3 AAsAhGeSLlPWBb0j4cX8KN2yKftFgH8nLbv5fprXL0I7sQAPJtdo6XOcuhDEV6lIwE IhICjv5j+WER0/YYudn+WmplDvUF2u414sqrX8dy538qwrrV1Gjw40PzusVIld4dhl dSC03amXgOTf6aBwicxF+zyhxTEQPo+UoXU7A7ALYXHPqF1jd3dlTGThhCAlhFxS/y ptnRQgnG8PpTTI7YX2a+7q7tIYziIMAI5FAuJk6Rf08W1fTQImOrAhAJZ1Siwox6c+ s/YKMlwyu9JNA== Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nLMFv-008xGO-Ul; Sat, 19 Feb 2022 09:42:20 +0000 MIME-Version: 1.0 Date: Sat, 19 Feb 2022 09:42:19 +0000 From: Marc Zyngier To: Reiji Watanabe Cc: Oliver Upton , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Linux ARM , James Morse , Alexandru Elisei , Suzuki K Poulose , Andrew Jones , Paolo Bonzini , Will Deacon , Peter Shier , Ricardo Koller , Jing Zhang , Raghavendra Rao Anata Subject: Re: [PATCH 2/2] KVM: arm64: selftests: Introduce get_set_regs_perf test In-Reply-To: References: <20220217034947.180935-1-reijiw@google.com> <20220217034947.180935-2-reijiw@google.com> <874k4x502u.wl-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <3878ff49741733d6dd76aae57b594cb2@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: reijiw@google.com, oupton@google.com, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, drjones@redhat.com, pbonzini@redhat.com, will@kernel.org, pshier@google.com, ricarkol@google.com, jingzhangos@google.com, rananta@google.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220219_014223_214125_44173F9A X-CRM114-Status: GOOD ( 18.46 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Reiji, On 2022-02-19 04:50, Reiji Watanabe wrote: > Hi Marc, > > On Thu, Feb 17, 2022 at 1:12 AM Marc Zyngier wrote: >> >> On Thu, 17 Feb 2022 04:52:10 +0000, >> Oliver Upton wrote: >> >> > Would it make sense to test some opt-in capabilities that expose >> > additional registers (PMU, SVE, etc.)? >> >> I think this is important. System registers are usually saved/restored > > Yes, I will fix the test to include registers for opt-in features > when supported. > >> in groups, and due to the way we walk the sysreg array, timings are >> unlikely to be uniform. Getting a grip on that could help restructure >> the walking if required (either per-group arrays, or maybe a tree >> structure). > > The biggest system register table that I know is sys_reg_descs[], > and KVM_SET_ONE_REG/KVM_GET_ONE_REG/emulation code already uses > binary search to find the target entry. So, the search itself > isn't that bad. The difference between the min and the max > latency of KVM_GET_ONE_REG for the registers is always around > 200nsec on Ampere Altra machine as far as I checked. Even if it is OK so far, it is bound to get worse over time, as the architecture keeps adding all sort of things that we'll eventually have to save/restore. I see this test as a way to monitor this trend and work out when we need to invest in something better. Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel