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 A45E9C54EE9 for ; Tue, 20 Sep 2022 18:31:42 +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=DLg6EIiCDu6D/InhBrlt448PrWf6hF7iS2bG5OKjUI0=; b=BHPFZBvYFCitoR nuIFQ5EY1jhDiBtl8V8MMM07/uidVvIql1zneS8tY7RFjwG8hbW+oDsVfTDMLpdPvyalCqTGBeZW8 o/CDjos27DJQya7MpWUS2n5Tq+CKzpAxA0/8xgscXuJK1PZIttEuvlM3L86D5G8jhIL/qP5c5WpZU eD4IM/qt+t718IfGsTEiaykplFXwrQ7cbaLHz345VEQGjXlcMDRbpc7s+JivvLDi/rN5cHk97kFjI oHM/8uukFe472yn1UEJbArurdkdkgN+a+Yq11sb6TXHx65OeAcS9g0Tq0QGhyYoMPd+zKmKgYC6ZG 9XQCfHAVNLD6hdAiQ/rQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oai0v-005jSS-J8; Tue, 20 Sep 2022 18:30:33 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oai0l-005jOC-Jf for linux-arm-kernel@lists.infradead.org; Tue, 20 Sep 2022 18:30:31 +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 CA3AA62194; Tue, 20 Sep 2022 18:30:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3819EC433D6; Tue, 20 Sep 2022 18:30:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663698622; bh=RWfmDLxX3yHluGPAAMQzAILUNznkHHtQmtrOZvUCfXg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OGaCqvuFJjxysmN2WRgWaUwizk1RGBOoZMpweVUELTwXBbnPT37Vtga9rhOnNPEpO C0M+Y3hdI4EVSd0Kd0pG4ul7Mt1CBoXffZdtra69lPFb5m5/rh7Eg0Vf5CNSOIuECh avNDgeHakTN1J8ovHz+ccltS7m/zIPgpZG9/cVuaS1gpia4B27fuc9+RHtUZ1Uc7IQ qfHDhIboywkWQmOPcplaFtB/CH2P6Wy5C4TJvj2Z/BFpt5riUT6S9scMxCjR7PY9GI wMGKeStkliZGjXqkm6dlyFrounMBxPalnULvo4IlEp8t2WAl+NEtnT0QHqWS19xwKA XyLEPioWWQXjA== Received: from 185-176-101-241.host.sccbroadband.ie ([185.176.101.241] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oai0h-00BTKa-VH; Tue, 20 Sep 2022 19:30:20 +0100 Date: Tue, 20 Sep 2022 19:30:18 +0100 Message-ID: <87sfklkif9.wl-maz@kernel.org> From: Marc Zyngier To: Mark Brown Cc: Catalin Marinas , Will Deacon , Zhang Lei , James Morse , Alexandru Elisei , Andre Przywara , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 2/7] arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE In-Reply-To: References: <20220815225529.930315-1-broonie@kernel.org> <20220815225529.930315-3-broonie@kernel.org> <87y1uej7dm.wl-maz@kernel.org> 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.176.101.241 X-SA-Exim-Rcpt-To: broonie@kernel.org, catalin.marinas@arm.com, will@kernel.org, zhang.lei@jp.fujitsu.com, james.morse@arm.com, alexandru.elisei@arm.com, andre.przywara@arm.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org 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-20220920_113023_747102_45547B69 X-CRM114-Status: GOOD ( 33.40 ) 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, 20 Sep 2022 19:09:15 +0100, Mark Brown wrote: > > [1 ] > On Tue, Sep 20, 2022 at 06:14:13PM +0100, Marc Zyngier wrote: > > Mark Brown wrote: > > > > When we save the state for the floating point registers this can be done > > > in the form visible through either the FPSIMD V registers or the SVE Z and > > > P registers. At present we track which format is currently used based on > > > TIF_SVE and the SME streaming mode state but particularly in the SVE case > > > this limits our options for optimising things, especially around syscalls. > > > Introduce a new enum in thread_struct which explicitly states which format > > > is active and keep it up to date when we change it. > > > > At present we do not use this state except to verify that it has the > > > expected value when loading the state, future patches will introduce > > > functional changes. > > > > + enum fp_state fp_type; > > > Is it a state or a type? Some consistency would help. Also, what does > > We can bikeshed this either way - the state currently stored is > of a particular type. I'll probably go for type. Then please do it consistently. At the moment, this is a bizarre mix of the two, and this is already hard enough to reason about this that we don't need extra complexity! > > > this represent? Your commit message keeps talking about the FP/SVE > > state for the host, but this is obviously a guest-related structure. > > How do the two relate? > > The commit message talks about saving the floating point state in > general which is something we do for both the host and the guest. > The optimisation cases I am focusing on right now are more on > host usage but the complexity with tracking that currently blocks > them crosses both host and guest, indeed the biggest improvement > overall is probably that tracking the guest state stops requiring > us to fiddle with the host task's state which to me at least > makes things clearer. At least for the KVM part, I want a clear comment explaining what this tracks and how this is used, because at the moment, I'm only guessing. And I've had enough guessing with this code... Thanks, 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