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 A29FDC54EE9 for ; Tue, 20 Sep 2022 18:30:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 15F444B634; Tue, 20 Sep 2022 14:30:28 -0400 (EDT) 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 HbJ78SQIoyzS; Tue, 20 Sep 2022 14:30:26 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id BBA694B2A1; Tue, 20 Sep 2022 14:30:26 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B90734B27F for ; Tue, 20 Sep 2022 14:30:24 -0400 (EDT) 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 gkXOZdTkDNJs for ; Tue, 20 Sep 2022 14:30:23 -0400 (EDT) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 945504B278 for ; Tue, 20 Sep 2022 14:30:23 -0400 (EDT) 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 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 Cc: Catalin Marinas , Zhang Lei , Andre Przywara , Will Deacon , 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 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. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm