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 mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC8F4C433F5 for ; Thu, 17 Feb 2022 09:12:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 3C3E840CF5; Thu, 17 Feb 2022 04:12:04 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VWJFYHB+d4Er; Thu, 17 Feb 2022 04:12:02 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 05E0149E17; Thu, 17 Feb 2022 04:12:02 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id E897F49E17 for ; Thu, 17 Feb 2022 04:11:59 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QoMXdQInLzXh for ; Thu, 17 Feb 2022 04:11:59 -0500 (EST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id CD38F49E0E for ; Thu, 17 Feb 2022 04:11:58 -0500 (EST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 31AC0B82165; Thu, 17 Feb 2022 09:11:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB6D2C340E8; Thu, 17 Feb 2022 09:11:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645089115; bh=W116x973bwtLdnAHZvJERNqs+XQltGCdpLQTmAJHJTY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mvoMMo8PBRH9C4KJx32BGJFVcIWFZ24EHXg156fNhUTQBemtQ6QD6KekukM0oYqh0 jg4Y2Yad6zNl5dGXdpC/qc30quthzBb27IqCWBJ73ju5QqkvOQ8X5w//SIasAgRE2O w9fYKm0r9nd0K1gL1+POhKFioHVmWGWFBr61lSiJz1j4pK5TkE1kfoFN8tnfw3e6H5 ZlYD2nuU2LomdaOawbTBzsx842tKPPSY5+HOdwNyXjlOhkhP3F52PnxBUyvS+1FrjH UliYNwXhfnSnGHwiKh9GkmoNL5CYaQ6yO+sAQra+nZ6WS2aVw+mUHxozdQyIrt8pOr kARY7qwGYug2g== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) 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 1nKcpN-008WCN-RK; Thu, 17 Feb 2022 09:11:53 +0000 Date: Thu, 17 Feb 2022 09:11:53 +0000 Message-ID: <874k4x502u.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton 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> 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/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oupton@google.com, reijiw@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 Cc: kvm@vger.kernel.org, Will Deacon , Peter Shier , Paolo Bonzini , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Thu, 17 Feb 2022 04:52:10 +0000, Oliver Upton wrote: > > Hi Reiji, > > First off, thanks for looking into this! Seems like a very useful thing > to test :-) > > On Wed, Feb 16, 2022 at 07:49:47PM -0800, Reiji Watanabe wrote: > > Introduce a simple performance test of KVM_GET_ONE_REG/KVM_SET_ONE_REG > > for registers that are returned by KVM_GET_REG_LIST. This is a pseudo > > process of saving/restoring registers during live migration, and this > > test quantifies the performance of the process. > > > > Signed-off-by: Reiji Watanabe > > --- > > tools/testing/selftests/kvm/.gitignore | 1 + > > tools/testing/selftests/kvm/Makefile | 1 + > > .../selftests/kvm/aarch64/get_set_regs_perf.c | 456 ++++++++++++++++++ > [...] > 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 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). Note that all of this could equally apply to the guest trapping (the walk is the same). And yes, there are a lot of commonalities with get-reg-list, so reusing some of the existing infrastructure would be a good thing. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 62C31C433EF for ; Thu, 17 Feb 2022 09:13:31 +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: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0gvDrlH3kBbpVf/4pb5rMgxP5kG9PUT/tegPWHTNaos=; b=2TJqJTckOyzhyz iCNLKrIjDF7A4Ht6fDzS+qLRGBao+80xnQ0Zh6XbEt3Pm/mm3RG5zobOdhHdE9SXIJftLFSk0Y/r8 5KnRqg0J/d+85VjRlUwzlwn/rgt9fo5I9SGrvKE45BQnvc8TE3EMVzbCze3bX9OLg7EVQ15MSUKEi 2tRaLkgKopjxTPajw53uQu4vp2kheLmFXWA7vFPe4mUTvWRLqcG9uzXy05c6ergdY0+/T4E1B/Nm4 i2BpQ+NJnx2swdK36+SUZir4RPk0hIctx5CgFzKixpoqa+0Qfm+ZF4P+7LmGoOD+OfMEQr4wP0Mcz 4cPxo7hSHC5NBQHPKcHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKcpY-009g5E-8V; Thu, 17 Feb 2022 09:12:04 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKcpT-009g4A-9w for linux-arm-kernel@lists.infradead.org; Thu, 17 Feb 2022 09:12:02 +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 ams.source.kernel.org (Postfix) with ESMTPS id 31AC0B82165; Thu, 17 Feb 2022 09:11:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB6D2C340E8; Thu, 17 Feb 2022 09:11:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645089115; bh=W116x973bwtLdnAHZvJERNqs+XQltGCdpLQTmAJHJTY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mvoMMo8PBRH9C4KJx32BGJFVcIWFZ24EHXg156fNhUTQBemtQ6QD6KekukM0oYqh0 jg4Y2Yad6zNl5dGXdpC/qc30quthzBb27IqCWBJ73ju5QqkvOQ8X5w//SIasAgRE2O w9fYKm0r9nd0K1gL1+POhKFioHVmWGWFBr61lSiJz1j4pK5TkE1kfoFN8tnfw3e6H5 ZlYD2nuU2LomdaOawbTBzsx842tKPPSY5+HOdwNyXjlOhkhP3F52PnxBUyvS+1FrjH UliYNwXhfnSnGHwiKh9GkmoNL5CYaQ6yO+sAQra+nZ6WS2aVw+mUHxozdQyIrt8pOr kARY7qwGYug2g== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) 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 1nKcpN-008WCN-RK; Thu, 17 Feb 2022 09:11:53 +0000 Date: Thu, 17 Feb 2022 09:11:53 +0000 Message-ID: <874k4x502u.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Reiji Watanabe , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, 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> 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/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oupton@google.com, reijiw@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-20220217_011159_728783_1418BE41 X-CRM114-Status: GOOD ( 20.93 ) 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 Thu, 17 Feb 2022 04:52:10 +0000, Oliver Upton wrote: > > Hi Reiji, > > First off, thanks for looking into this! Seems like a very useful thing > to test :-) > > On Wed, Feb 16, 2022 at 07:49:47PM -0800, Reiji Watanabe wrote: > > Introduce a simple performance test of KVM_GET_ONE_REG/KVM_SET_ONE_REG > > for registers that are returned by KVM_GET_REG_LIST. This is a pseudo > > process of saving/restoring registers during live migration, and this > > test quantifies the performance of the process. > > > > Signed-off-by: Reiji Watanabe > > --- > > tools/testing/selftests/kvm/.gitignore | 1 + > > tools/testing/selftests/kvm/Makefile | 1 + > > .../selftests/kvm/aarch64/get_set_regs_perf.c | 456 ++++++++++++++++++ > [...] > 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 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). Note that all of this could equally apply to the guest trapping (the walk is the same). And yes, there are a lot of commonalities with get-reg-list, so reusing some of the existing infrastructure would be a good thing. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 971D5C433F5 for ; Thu, 17 Feb 2022 09:12:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236696AbiBQJMN (ORCPT ); Thu, 17 Feb 2022 04:12:13 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:55362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229699AbiBQJML (ORCPT ); Thu, 17 Feb 2022 04:12:11 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D421B1FA6B for ; Thu, 17 Feb 2022 01:11:56 -0800 (PST) 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 701D66154A for ; Thu, 17 Feb 2022 09:11:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB6D2C340E8; Thu, 17 Feb 2022 09:11:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645089115; bh=W116x973bwtLdnAHZvJERNqs+XQltGCdpLQTmAJHJTY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mvoMMo8PBRH9C4KJx32BGJFVcIWFZ24EHXg156fNhUTQBemtQ6QD6KekukM0oYqh0 jg4Y2Yad6zNl5dGXdpC/qc30quthzBb27IqCWBJ73ju5QqkvOQ8X5w//SIasAgRE2O w9fYKm0r9nd0K1gL1+POhKFioHVmWGWFBr61lSiJz1j4pK5TkE1kfoFN8tnfw3e6H5 ZlYD2nuU2LomdaOawbTBzsx842tKPPSY5+HOdwNyXjlOhkhP3F52PnxBUyvS+1FrjH UliYNwXhfnSnGHwiKh9GkmoNL5CYaQ6yO+sAQra+nZ6WS2aVw+mUHxozdQyIrt8pOr kARY7qwGYug2g== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) 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 1nKcpN-008WCN-RK; Thu, 17 Feb 2022 09:11:53 +0000 Date: Thu, 17 Feb 2022 09:11:53 +0000 Message-ID: <874k4x502u.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Reiji Watanabe , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, 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> 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/27.1 (x86_64-pc-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: oupton@google.com, reijiw@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 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Thu, 17 Feb 2022 04:52:10 +0000, Oliver Upton wrote: > > Hi Reiji, > > First off, thanks for looking into this! Seems like a very useful thing > to test :-) > > On Wed, Feb 16, 2022 at 07:49:47PM -0800, Reiji Watanabe wrote: > > Introduce a simple performance test of KVM_GET_ONE_REG/KVM_SET_ONE_REG > > for registers that are returned by KVM_GET_REG_LIST. This is a pseudo > > process of saving/restoring registers during live migration, and this > > test quantifies the performance of the process. > > > > Signed-off-by: Reiji Watanabe > > --- > > tools/testing/selftests/kvm/.gitignore | 1 + > > tools/testing/selftests/kvm/Makefile | 1 + > > .../selftests/kvm/aarch64/get_set_regs_perf.c | 456 ++++++++++++++++++ > [...] > 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 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). Note that all of this could equally apply to the guest trapping (the walk is the same). And yes, there are a lot of commonalities with get-reg-list, so reusing some of the existing infrastructure would be a good thing. M. -- Without deviation from the norm, progress is not possible.