Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4757225pxv; Tue, 6 Jul 2021 08:26:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyy7+142GJGS/QQuA6+6+uYavYC+OOGpeq/tAqftBhvvAur2BWpB8cYxpvTeNh9jcGczAOf X-Received: by 2002:a5d:8186:: with SMTP id u6mr12812899ion.45.1625585186235; Tue, 06 Jul 2021 08:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625585186; cv=none; d=google.com; s=arc-20160816; b=PXE405WedhzWujLPgsq19DnIFwKIs1bDkqzAB2WroZYs5qokelRuSIhdOYOb95S9xl hKOa6iNeKkZwi05UXpLd6iHPAnWAstmWDXIGuTlHhOGiM6Y8i5ll3uFXHlkgQZfaHHQD lTVvH3YwW1eJ44WX51oButpbiINaQnBnMqdk/3DTta/cukj13ALZFsMJaT49EFYJroC4 1VZCQgk8wXe12dyrb8BuvgUyLTcyRIk36yLX2Ba9VSGapv97Ht0+Qq8TbsHM0FWy7qyI krC+JUeYBQRvc6jpNdPxvKKXd+sL1EeabBZq3yZn8O7n0xDo/Z9mEf1EGj0l9OMGBc8W UOpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kBvoTSBcOt78f+hoOE9oCqUZer2JVIUIWKm+LE7tBB8=; b=eHXX8RixzfCL7hvW95S3SBvxxw+z/CwpQI/nrLn0PdsbMHD4IoeIl+kj7YWEnevETi GWwkcimOI37UbdI1BHn0B5YBMDdVd6ZZvKR3q4OMlo/7xtyYfaF/KBVRda7vtUiFGHeM XWjhTEbybKjiJ/eXKgt/yu83KASx4HXhmDTlocaFSvuo7lc4P3xEWrWlozNTBeTOCz3Z or6yfykhHvDbllYFMJXOYaN4r/N+egN1KT7jtMGAx2oi3yaLL+8HIU8ObllnN6QjwmB1 8fPjti//hGW7djzxNB2p1eC6hO6bL6s8SIoWAXhNMX9brMsmwKajnzbt5EMWPsyZakh8 AFkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=X163Xk+G; 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 q3si11965308iob.0.2021.07.06.08.26.13; Tue, 06 Jul 2021 08:26:26 -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=X163Xk+G; 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 S231872AbhGFP2Z (ORCPT + 99 others); Tue, 6 Jul 2021 11:28:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231715AbhGFP2Y (ORCPT ); Tue, 6 Jul 2021 11:28:24 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 152A3C061762 for ; Tue, 6 Jul 2021 08:25:46 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id p9so1112724pjl.3 for ; Tue, 06 Jul 2021 08:25:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kBvoTSBcOt78f+hoOE9oCqUZer2JVIUIWKm+LE7tBB8=; b=X163Xk+G02T/FYeziNGDwCPOc6BLNJpmRANJZemVrSobPquSFvpYvLg7I+/xXol03F kgToG/GWqTW22vdfS86rrDbHG+VIoJpV7F3ia6ZGlrrWTBFKBlA1qJfDU2QYjFMxw9bn 18zM+SC3OK5PBTSWnVn9GnFtpVk1NhRB4WRRd6zVs3M5rR6QpNocNXBiV7EL2h8le3Ow jvZU/A0iyEbkwxC5Yua5tblx9J0ejeZ7v4lloFM8eg/sgExGmReJOD+eEQ6g9p7ckBea AQnNsdBTVeckFCBTYdf84UR54cEJl3YU8s6gAghdvxWN3OAHAx/OxyzWsnveJxZQA+4F K0qg== 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:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kBvoTSBcOt78f+hoOE9oCqUZer2JVIUIWKm+LE7tBB8=; b=iLRkXb//OKY3Qu9FA0wILwPHAcuXwmpq7gZiZpHF4nc/b6LIBpF0pBrX/qSuYnCfnG I/HM+0JS4TrhwfHIBD+Snt6fSmOhHE/Ap9RxTfUo2+HWrV/+EB7asmcW4WmS3Nq6pA9n NrMAD5pFoUCtGQX5MaoNyHxYTPNg+VQEnNTim/wu61LazjmWOfr2uUr13Znw1VlniOtF 8DyNAB251t3tiaAWCJorHYFoOJmTq2yEQ3vLK4Cui9KWAOz3ww0YPAqEeBJgDtsibGL/ lSK5+1TQJ89j+55zF5/YsN0MrGPieVptckYePEMk/t8wqsJ6crHzFVjf4udXUZum5k8/ 4uNQ== X-Gm-Message-State: AOAM531cEqUab/p5Q2pQKXhHsF/dhZf/HakiFSzQ9A3zfCGFxnvJLCEZ ihtO/NT5u70F6K8YzVw92ug39w== X-Received: by 2002:a17:90a:8417:: with SMTP id j23mr1072739pjn.210.1625585145462; Tue, 06 Jul 2021 08:25:45 -0700 (PDT) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id m18sm17872288pff.88.2021.07.06.08.25.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 08:25:44 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1m0mxC-004SbX-Ps; Tue, 06 Jul 2021 12:25:42 -0300 Date: Tue, 6 Jul 2021 12:25:42 -0300 From: Jason Gunthorpe To: Daniel Vetter Cc: Oded Gabbay , Oded Gabbay , "Linux-Kernel@Vger. Kernel. Org" , Greg Kroah-Hartman , Sumit Semwal , Christian =?utf-8?B?S8O2bmln?= , Gal Pressman , sleybo@amazon.com, Maling list - DRI developers , linux-rdma , Linux Media Mailing List , Doug Ledford , Dave Airlie , Alex Deucher , Leon Romanovsky , Christoph Hellwig , amd-gfx list , "moderated list:DMA BUFFER SHARING FRAMEWORK" Subject: Re: [PATCH v4 0/2] Add p2p via dmabuf to habanalabs Message-ID: <20210706152542.GP4604@ziepe.ca> References: <20210705130314.11519-1-ogabbay@kernel.org> <20210706142357.GN4604@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 06, 2021 at 04:39:19PM +0200, Daniel Vetter wrote: > On Tue, Jul 6, 2021 at 4:23 PM Jason Gunthorpe wrote: > > > > On Tue, Jul 06, 2021 at 12:36:51PM +0200, Daniel Vetter wrote: > > > > > If that means AI companies don't want to open our their hw specs > > > enough to allow that, so be it - all you get in that case is > > > offloading the kernel side of the stack for convenience, with zero > > > long term prospects to ever make this into a cross vendor subsystem > > > stack that does something useful. > > > > I don't think this is true at all - nouveau is probably the best > > example. > > > > nouveau reverse engineered a userspace stack for one of these devices. > > > > How much further ahead would they have been by now if they had a > > vendor supported, fully featured, open kernel driver to build the > > userspace upon? > > There is actually tons of example here, most of the arm socs have > fully open kernel drivers, supported by the vendor (out of tree). I choose nouveau because of this: $ git ls-files drivers/gpu/drm/arm/ | xargs wc -l 15039 total $ git ls-files drivers/gpu/drm/nouveau/ | xargs wc -l 204198 total At 13x the size of mali this is not just some easy to wire up memory manager and command submission. And after all that typing it still isn't very good. The fully supported AMD vendor driver is over 3 million lines, so nouveau probably needs to grow several times. My argument is that an in-tree open kernel driver is a big help to reverse engineering an open userspace. Having the vendors collaboration to build that monstrous thing can only help the end goal of an end to end open stack. For instance a vendor with an in-tree driver has a strong incentive to sort out their FW licensing issues so it can be redistributed. I'm not sure about this all or nothing approach. AFAIK DRM has the worst problems with out of tree drivers right now. > Where it would have helped is if this open driver would come with > redistributable firmware, because that is right now the thing making > nouveau reverse-engineering painful enough to be non-feasible. Well > not the reverse-engineering, but the "shipping the result as a working > driver stack". I don't think much of the out of tree but open drivers. The goal must be to get vendors in tree. I would applaud Habana for getting an intree driver at least, even if the userspace is not what we'd all want to see. > I don't think the facts on the ground support your claim here, aside > from the practical problem that nvidia is unwilling to even create an > open driver to begin with. So there isn't anything to merge. The internet tells me there is nvgpu, it doesn't seem to have helped. Jason