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 43620C47DDF for ; Wed, 24 Jan 2024 13:32:59 +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=GgoHDzIRiIwB/TjS7a6l5lr4E2owHGBZs9zzoBs4pXY=; b=Ytllg1X/JM+PdY z4GG0CvYLfeIMghQTpB+8d7287H7ywOJiea65XOGjFy4ULkLZmh9rA+vmDtex4djsVi35O478HRr9 TjMfWxAirD85Y0lwWAh8LOFogVRpNVQiywcjooFOn08gHAA207nwnnMs7jpjde5rj00szRnEUA1Xw 2YzGDaLiqoWAE2p7seEDi6iWv3W9ZK3Evv5e7i0ubmJhNl9fF68qj+swn7lI0GnsjSMSjcwgwlBly tLjAVv4X1lyVUkeHfo/+lG9u5lvXfwUTeeLADZmOjEh4P7urMd7cah+0uod9lzi0ujAHfWJZn67Zg eQdFDLBNW8ooWfqOl9ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSdMk-003Tnb-2O; Wed, 24 Jan 2024 13:32:30 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSdMg-003TmE-2I for linux-arm-kernel@lists.infradead.org; Wed, 24 Jan 2024 13:32:29 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A16F961D27; Wed, 24 Jan 2024 13:32:25 +0000 (UTC) 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) 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: 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240124_053226_830333_FF514C85 X-CRM114-Status: GOOD ( 35.72 ) 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 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel