Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1336154ybg; Thu, 11 Jun 2020 07:18:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxteoDT/vPdDPUBRyXCtAWpyK14prNLIk2oup0Pbycco4noUknvG2HWZzV3c10bfu10VR3h X-Received: by 2002:a17:906:c058:: with SMTP id bm24mr8331022ejb.73.1591885084130; Thu, 11 Jun 2020 07:18:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591885084; cv=none; d=google.com; s=arc-20160816; b=fb+xLm9tbA+cLuivTmCTGdbKVXZ45FdTqlsNkVr4Z7tvEUKFR5B1Z3ZVRH1LGqepJj Im6O4SgteZoDgJQwalRLe7Nkb+XOdHNCEhDLr8RcSBrMDeVH52T+m1NfPSYy+Rx/ueiL nn9wUhrxwQJPRzSYyDRiRwqJbc3+tGr27ffNlmFAPh435uSDvq/MPrqYoqsfVPFT7ZZl NycIOH9WfIGD8Mo0Nv5FYC19po10kOF+AvYrvLATI0MP/28RmFbmQfwx1lYNbQgcaUwx irB2wuwDggQtX8mHGXqJGTayVc9gXsR/Sj3LIpr6x/GQXoKGmrlY+PeuQfs2KsIcT8ru f8aw== 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=KdY4CqOeXBwEiWOcFlqbqG5is4zfH8IsaBHV/GBHIHQ=; b=f/32MflwUYuqc6qT+P4G4OYobKdXnPVOfIAZucEpT35YA+vGgGIKxgAOoRovMbGHVS hr/kwrFrf9ffJpRFcBfPY74Rq7K2xp6LxTOo/AGopbdlPgzrHuyspCXkKYGhqwKI88xj Z/50oHX6gG6s7KCgNVYIsj81uFujjoG80nKIX/yTIGHwH+0b0r4H2os6ZkrKMz3xy9Vs ZhjugFzNYX/tRqzjaAvPsKI7stIJMuHX5yIJgajZPQUIzdv7zdkRMjXyplzm6szQqFYe zH225mT5Qk53fA/J5gKR67RuhVf148R7ZX1pG2yuR/MLkZD4NAzmbiDRiDbjyqfjdMT4 uCtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=PR0gi9LB; 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 w18si1749648edq.44.2020.06.11.07.17.33; Thu, 11 Jun 2020 07:18:04 -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=PR0gi9LB; 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 S1727053AbgFKOPT (ORCPT + 99 others); Thu, 11 Jun 2020 10:15:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726956AbgFKOPS (ORCPT ); Thu, 11 Jun 2020 10:15:18 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9ECF8C08C5C1 for ; Thu, 11 Jun 2020 07:15:18 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id w1so5675871qkw.5 for ; Thu, 11 Jun 2020 07:15:18 -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=KdY4CqOeXBwEiWOcFlqbqG5is4zfH8IsaBHV/GBHIHQ=; b=PR0gi9LBQQMt96kk5vRqeFR+V5WYHc55goGq7/IDrxkd9Rh9/YG4b34BFLq0d+yZak BzFk4zfLtE+kjSjyF7+exbUyisWbPZy/yiLvO6PtXdNGgJHOY8zf+OZ+iAubr5+Tx4Lg D4HeiosK8RaYH70wLLBoyGznPMMuJUn0V+ocWO9N930QQt7fPPBvGVsW8vOLNjXPWLRJ HkUS7exwuBnCFIc1OZ028wKpj25WTPUot6ReBMtdHn/iN8mcZwnlTrlzELhcNeGkhWGY TFje4r50V7bjdc94j0MAgMsh5GCFD+me2eO4hQx0IUtZreCgJFCWBiuSwLKGsBDoHK5K Bujw== 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=KdY4CqOeXBwEiWOcFlqbqG5is4zfH8IsaBHV/GBHIHQ=; b=hH6dAnMxRCYnLZXfExZ8yAEX9DKRd27S8Uh5VDekIHbFjcQhOtC7fSrncGKAVl3AhS WYtiueOACgTaUSEXNvxEXMxO+gbW3zYF/auKMqhbmH8/ag2cu+eX1vZJDzGAoOdD/Y4x SPaU/hIWyV/WFeIMsGPGubzJyfSjOagd76Ze7aSDtqWcnwIYHCO8+gVUrEwC4mxEFEpI yv/KTGM+NeIi3YDcxGji8YLHq6K3KMnGZvU/vAC7olDK1LVqg2/3Bio8UhmQFc297Phn iupLZZekVCy/7YVgsEEyMXGVabN+4pJvZbGjC8Z8FfZSRv+p637AdBEbuFyXQCnHBaq1 s6yQ== X-Gm-Message-State: AOAM533Hg8KGqXg2+vO8uD3/Dt2e9hAUPW0At9/mb+ngyY5hblKKZt6s mHohk2Cdk2KXMfY2EuvfFjIgIA== X-Received: by 2002:ae9:efc2:: with SMTP id d185mr8655279qkg.177.1591884917518; Thu, 11 Jun 2020 07:15:17 -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 d16sm2634050qte.49.2020.06.11.07.15.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 07:15:16 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.93) (envelope-from ) id 1jjNz9-005wvW-Ge; Thu, 11 Jun 2020 11:15:15 -0300 Date: Thu, 11 Jun 2020 11:15:15 -0300 From: Jason Gunthorpe To: Thomas =?utf-8?B?SGVsbHN0csO2bSAoSW50ZWwp?= , DRI Development , linux-rdma@vger.kernel.org, Intel Graphics Development , Maarten Lankhorst , LKML , amd-gfx@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, Thomas Hellstrom , Daniel Vetter , linux-media@vger.kernel.org, Christian =?utf-8?B?S8O2bmln?= , Mika Kuoppala Subject: Re: [Linaro-mm-sig] [PATCH 04/18] dma-fence: prime lockdep annotations Message-ID: <20200611141515.GW6578@ziepe.ca> References: <20200604081224.863494-1-daniel.vetter@ffwll.ch> <20200604081224.863494-5-daniel.vetter@ffwll.ch> <20200611083430.GD20149@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200611083430.GD20149@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 11, 2020 at 10:34:30AM +0200, Daniel Vetter wrote: > > I still have my doubts about allowing fence waiting from within shrinkers. > > IMO ideally they should use a trywait approach, in order to allow memory > > allocation during command submission for drivers that > > publish fences before command submission. (Since early reservation object > > release requires that). > > Yeah it is a bit annoying, e.g. for drm/scheduler I think we'll end up > with a mempool to make sure it can handle it's allocations. > > > But since drivers are already waiting from within shrinkers and I take your > > word for HMM requiring this, > > Yeah the big trouble is HMM and mmu notifiers. That's the really awkward > one, the shrinker one is a lot less established. I really question if HW that needs something like DMA fence should even be using mmu notifiers - the best use is HW that can fence the DMA directly without having to get involved with some command stream processing. Or at the very least it should not be a generic DMA fence but a narrowed completion tied only into the same GPU driver's command completion processing which should be able to progress without blocking. The intent of notifiers was never to endlessly block while vast amounts of SW does work. Going around and switching everything in a GPU to GFP_ATOMIC seems like bad idea. > I've pinged a bunch of armsoc gpu driver people and ask them how much this > hurts, so that we have a clear answer. On x86 I don't think we have much > of a choice on this, with userptr in amd and i915 and hmm work in nouveau > (but nouveau I think doesn't use dma_fence in there). Right, nor will RDMA ODP. Jason