Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1515737ybt; Thu, 18 Jun 2020 10:26:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9Ia03PUTMw0kdqI++e7iKcGEgOhzDJFhlBbLzMqEcZ6prpukGH7NXmO3J1dZqNNPYoqW6 X-Received: by 2002:a17:906:480f:: with SMTP id w15mr4915646ejq.430.1592501160579; Thu, 18 Jun 2020 10:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592501160; cv=none; d=google.com; s=arc-20160816; b=YzBRHu25gevcef2+hzWqLtE62If++JLVD6u62x7HXZGbTBXkDXSHvzswI7AE7i9Fet diUAK23iIwbJKOiK9bxpYNtGKUogf2g4rqCP/ihkMsGjuR5LW/2ndWytF1KlRYq0jyjI 7c74radu9c42hpUXxy5CtcjnaNpKhNyFImLDREfwGrK7BhVigcqzCacBq/YXg34p7/38 2v7Tu3ldQ/NP9nQymBbEmbVEUPEPtPB7oJzOJYudAqAt379vnihVPSjJ1cvJN6TVIqcF EnYUX1OEqT4ZJ9mOQS3DeHpsdRpFjyEYRhX2m6I/1OxlCma0S7K0PmllDtofamQbileW QzwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=C9fZMsXo2SZ80We4hmJmwmW4hWECtoNb2OioHXlz4pQ=; b=YN+/benDbbiAfgNj2Rkyou/SX9hWYLxFQpc8FtpbT1F0T9+p4wkWvPXPgTo355unD0 0d9XTrSbVI7R6hXpt/NM2aZHUN2y9YL1Yusps640W5RdDbD5wS9TyvwaBgr3ctNopAjT eXa2SdC+URP9NtT9tDY3638+1VzMWOPHTxMi+vJ6Jcb1TPDCjfdOq92bbbRP5WUAks8/ Dtu72jC54VK5vSVZjTY5XsNztmAomDfv52PkrsxHG8zLp0502CM3+L2+oiUIqoL1ak7m Ew5b2A43UXJeXsN+KQlUhCJXVPVlscn9xi0ag0Vwld24XpHskjepdpsSodo4muCyjyEh KKzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=pQnJk2Bk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mh25si2344627ejb.453.2020.06.18.10.25.37; Thu, 18 Jun 2020 10:26:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=pQnJk2Bk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732116AbgFRRXn (ORCPT + 99 others); Thu, 18 Jun 2020 13:23:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732095AbgFRRXl (ORCPT ); Thu, 18 Jun 2020 13:23:41 -0400 Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com [IPv6:2607:f8b0:4864:20::f41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8471AC0613ED for ; Thu, 18 Jun 2020 10:23:41 -0700 (PDT) Received: by mail-qv1-xf41.google.com with SMTP id di13so3113514qvb.12 for ; Thu, 18 Jun 2020 10:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=C9fZMsXo2SZ80We4hmJmwmW4hWECtoNb2OioHXlz4pQ=; b=pQnJk2BkLr+MSY/ZKoRYO3N7SBKy2now/VahbHpiE0ODVcJ+6O7j84vau1mwIApvP7 GOdC6OeYk1H3WeQLOrd9w3MqHQZy0OvARyydS7GgAQeW47MnQWfeepZVJrUJjSv717D6 71Y1Jcf/9bD++nyhtsm877xpne1ScehVboFxAFrIK686JYR5j1zM1IYedzgkhSMFLH+q BA1fweTgPgjhYb+wikYXhEAlUND0ztF/D51np5BJ3v4C46sZQvCASI5ckldnPRlU+3hi s8pkLypTSa4SZ0xCcdQBCFHr3EIFZ3G/Xkv9NnnR/g9tJLHfZHgrYGhT36a3jHhTjSZ1 XJ3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=C9fZMsXo2SZ80We4hmJmwmW4hWECtoNb2OioHXlz4pQ=; b=BydVFdOL5jBbCoAGC7zJQxbBV3lTllet8OZk8qiyf/fS9XMuPQqhp6K4Nur6lqVFoH SC/a0WwZQOGq3xRmjr+pLw+Sb2BK6OsZsP51qAq3ntoFWo2bjJTZitY4Z5uEL0Dc/kQK pueydAHXy3wswhTNzgr78VG3EgCgIRR5dZ6FvLplUEACo5gObDO40iqDe4hsUDogTAds /7HQfRsI3QkHPvLEi4b5RNMzRo1QxB0tKJcmvW1k5Kl/5/g9uYD/zALYhshxzT4VwMoB By2OVggaVoJkSUmu0gWj+iKN1+PnfeZ+D9scKNxKkZypQJfzbEAh6ZW3Fnt4hpPQdQVx xh8Q== X-Gm-Message-State: AOAM533tyLI3dtMpBa72oXw6LHv8puqeq8S3fhHZJMRRmQ6llnwB+nN6 WZucKBqESF/3+e+VziYqwvLqac28G4SlpA== X-Received: by 2002:a05:6214:1705:: with SMTP id db5mr4740498qvb.14.1592501020440; Thu, 18 Jun 2020 10:23:40 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id r7sm2644175qtm.66.2020.06.18.10.23.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 10:23:39 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.93) (envelope-from ) id 1jlyGI-00AEEp-Qj; Thu, 18 Jun 2020 14:23:38 -0300 Date: Thu, 18 Jun 2020 14:23:38 -0300 From: Jason Gunthorpe To: Thomas =?utf-8?B?SGVsbHN0csO2bSAoSW50ZWwp?= , DRI Development , linux-rdma , Intel Graphics Development , Maarten Lankhorst , LKML , amd-gfx list , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Thomas Hellstrom , Daniel Vetter , "open list:DMA BUFFER SHARING FRAMEWORK" , Christian =?utf-8?B?S8O2bmln?= , Mika Kuoppala Subject: Re: [Linaro-mm-sig] [PATCH 04/18] dma-fence: prime lockdep annotations Message-ID: <20200618172338.GM6578@ziepe.ca> References: <20200604081224.863494-1-daniel.vetter@ffwll.ch> <20200604081224.863494-5-daniel.vetter@ffwll.ch> <20200611083430.GD20149@phenom.ffwll.local> <20200611141515.GW6578@ziepe.ca> <20200616120719.GL20149@phenom.ffwll.local> <20200617152835.GF6578@ziepe.ca> <20200618150051.GS20149@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200618150051.GS20149@phenom.ffwll.local> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 18, 2020 at 05:00:51PM +0200, Daniel Vetter wrote: > On Wed, Jun 17, 2020 at 12:28:35PM -0300, Jason Gunthorpe wrote: > > On Wed, Jun 17, 2020 at 08:48:50AM +0200, Daniel Vetter wrote: > > > > > Now my understanding for rdma is that if you don't have hw page fault > > > support, > > > > The RDMA ODP feature is restartable HW page faulting just like nouveau > > has. The classical MR feature doesn't have this. Only mlx5 HW supports > > ODP today. > > > > > It's only gpus (I think) which are in this awkward in-between spot > > > where dynamic memory management really is much wanted, but the hw > > > kinda sucks. Aside, about 10+ years ago we had a similar problem with > > > gpu hw, but for security: Many gpu didn't have any kinds of page > > > tables to isolate different clients from each another. drivers/gpu > > > fixed this by parsing&validating what userspace submitted to make sure > > > it's only every accessing its own buffers. Most gpus have become > > > reasonable nowadays and do have proper per-process pagetables (gpu > > > process, not the pasid stuff), but even today there's still some of > > > the old model left in some of the smallest SoC. > > > > But I still don't understand why a dma fence is needed inside the GPU > > driver itself in the notifier. > > > > Surely the GPU driver can block and release the notifier directly from > > its own command processing channel? > > > > Why does this fence and all it entails need to leak out across > > drivers? > > So 10 years ago we had this world of every gpu driver is its own bucket, > nothing leaks out to the world. But the world had a different idea how > gpus where supposed to work, with stuff like: Sure, I understand DMA fence, but why does a *notifier* need it? The job of the notifier is to guarentee that the device it is connected to is not doing DMA before it returns. That just means you need to prove that device is done with the buffer. As I've understood GPU that means you need to show that the commands associated with the buffer have completed. This is all local stuff within the driver, right? Why use fence (other than it already exists) Jason