From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D745E7764D; Wed, 24 Jan 2024 13:32:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706103146; cv=none; b=b7XrddCuGNjcS+vxIipYwJ9SCA7b4JBqSSsVrH1+XRIHtf7npjboAi/2sSxGBnCTKiXcs2D4p9AMRqm+n+/GbwUmvAbdrXbna4aPrHCehE26qURIiOxiReoh3yRIIZvuwhHZG2/kyah7Po4daJw9STRcSiKbh81Ytmd6QMdvGn8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706103146; c=relaxed/simple; bh=r/MlFBpvh1urs5RoLLL/ijS6xLZtzSvDUzcUVrRz0qg=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=nX05J7skNod4BF4exVYuz68oBnQBKAJixhVrJSiCqlJ19c30JTxJFx3UziQYxv59WeC4ckw5saeGWmd6XNovI0JW0WCL3On024MNKCx0QfwOHv0JyOV/h9EZd4BfotAHGMiRQYzrCgGwSUwB4ZmpK29LjMli5EolEUd4LLSt5mM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SrLg8X3y; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SrLg8X3y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 451DDC433F1; Wed, 24 Jan 2024 13:32:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706103145; bh=r/MlFBpvh1urs5RoLLL/ijS6xLZtzSvDUzcUVrRz0qg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SrLg8X3yYniHxZwENFjZsAgizr3UjIfhtUS2EurygS8zMBytauAclht/3xb4y1N1l jssmr565BWsHby3emkyBm8UsL6VKrgOqTeIi+kdcOTGYrvcWb0siB25MhmnknNIVMJ MLsz+qcvDx7SD+/i49it9WWAveT0o6AtRQpBCruQZRxMDHgEIOJpRl/G0nk4bDEtlN LlHGeFBsKqNTZbZ22SFbMbMBF4inDHbGiTKpA6aITfCvUZBJ+aD3c2MsshrHVqsHv1 cf45NrrpNL1TvYpxJH6q1XxYGiKFZGPL2Wj4lCQI/pMnEXSazSO34/r6g/gQI5yq7k EJReS1PRUXOgA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.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 1rSdMc-00EL7Z-Ke; Wed, 24 Jan 2024 13:32:22 +0000 Date: Wed, 24 Jan 2024 13:32:22 +0000 Message-ID: <86bk9a97rt.wl-maz@kernel.org> From: Marc Zyngier To: Jason Gunthorpe Cc: Catalin Marinas , Mark Rutland , Niklas Schnelle , Leon Romanovsky , Arnd Bergmann , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rdma@vger.kernel.org, llvm@lists.linux.dev, Michael Guralnik , Nathan Chancellor , Nick Desaulniers , Will Deacon Subject: Re: [PATCH rdma-next 1/2] arm64/io: add memcpy_toio_64 In-Reply-To: <20240124130638.GE1455070@nvidia.com> References: <20231205195130.GM2692119@nvidia.com> <20231206125919.GP2692119@nvidia.com> <20240116185121.GB980613@nvidia.com> <20240117123618.GD734935@nvidia.com> <20240124012723.GD1455070@nvidia.com> <86ede787d7.wl-maz@kernel.org> <20240124130638.GE1455070@nvidia.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/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: jgg@nvidia.com, catalin.marinas@arm.com, mark.rutland@arm.com, schnelle@linux.ibm.com, leon@kernel.org, arnd@arndb.de, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rdma@vger.kernel.org, llvm@lists.linux.dev, michaelgur@mellanox.com, nathan@kernel.org, ndesaulniers@google.com, will@kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Wed, 24 Jan 2024 13:06:38 +0000, Jason Gunthorpe wrote: > > On Wed, Jan 24, 2024 at 08:26:28AM +0000, Marc Zyngier wrote: > > > > Even if you refuse to take STP to mainline it *will* be running in VMs > > > under ARM hypervisors. > > > > A hypervisor can't do anything with it. If you cared to read the > > architecture, you'd know by now. So your VM will be either dead, or > > dog slow, depending on your hypervisor. In any case, I'm sure it will > > reflect positively on your favourite software. > > "Dog slow" is fine. Forcing IO emulation on paths that shouldn't have > it is a VMM problem. KVM & qemu have some issues where this can happen > infrequently for VFIO MMIO maps. It is just important that it be > functionally correct if you get unlucky. The performance path is to > not take a fault in the first place. > > > > What exactly do you think should be done about that? > > > > Well, you could use KVM_CAP_ARM_NISV_TO_USER in userspace and see > > everything slow down. Your call. > > The issue Mark raised here was that things like STP/etc cannot work in > VMs, not that they are slow. > > The places we are talking about using the STP pattern are all high > performance HW drivers, that do not have any existing SW emulation to > worry about. ie the VMM will be using VFIO to back the MMIO the > acessors target. > > So, I'm fine if the answer is that VMM's using VFIO need to use > KVM_CAP_ARM_NISV_TO_USER and do instruction parsing for emulated IO in > userspace if they have a design where VFIO MMIO can infrequently > generate faults. That is all VMM design stuff and has nothing to do > with the kernel. Which will work a treat with things like CCA, I'm sure. > > My objection is this notion we should degrade a performance hot path > in drivers to accomodate an ARM VMM issue that should be solved in the > VMM. > > > Or you can stop whining and try to get better performance out of what > > we have today. > > "better performance"!?!? You are telling me I have to destroy one of > our important fast paths for HPC workloads to accommodate some > theoretical ARM KVM problem? What I'm saying is that there are way to make it better without breaking your particular toy workload which, as important as it may be to *you*, doesn't cover everybody's use case. Mark did post such an example that has the potential of having that improvement. I'd suggest that you give it a go. But your attitude of "who cares if it breaks as long as it works for me" is not something I can adhere to. M. -- Without deviation from the norm, progress is not possible.