Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4724547pxv; Tue, 6 Jul 2021 07:44:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzd52GRMnyfrtH0c9dKyz+4hKEKi0E1YPhXj5i1NmG3fxpazpUyWbbsceT9dmZ1rRpmZqu X-Received: by 2002:a17:906:c14a:: with SMTP id dp10mr19374786ejc.426.1625582642835; Tue, 06 Jul 2021 07:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625582642; cv=none; d=google.com; s=arc-20160816; b=iQci7vXxiudtRU5CH1nojpYqvb8Nwhyo1e9fhBrJ5sFp9+G6OU5YXKoMJ2S1xtw3oh IFLThY+QyB0lo1x8f4me0T97sbpQGkzWPHzldH785FtWmfX2j64rOAqIl5wgMixh9LEu dJLo84QyYiGCWSEnIoJOTor0kP7vRon1hTXsvue28K5mwXLiuNCMNOIv0x4t+xXkbK63 2HEx4ce2YBv/EPlOsIfXTw42VtcoT0dYYL85vphrQdviDetoA8yNfjF9zyxw5h9x7Fv8 mPQC/O/4uCDK9oO3x7u2CmRAJy9yEMfURkGr4kLLtFr57Cj1DZqM8xVGI4GHqHSpHbTi HGLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zm0DaryDqZq3vejGZ3jPeBiO1tR+wTWZk5xnShXCnO4=; b=z4ioi+knB+9JHd0xYysZghe9O4GeEir4MntdPRMFCWe7E39zjG6RRHiqQAnu1GQBp9 CUPfPhR/6WLUg52y0+RgTts7uoUN5uLDwpLonaxEfDIi4wq9Am6sGJTyapN4UOzpUyHC rk5K67TvKRIXuWcLgx6laHOs0WzaEE3CsCrFM07Z2xLqbub9gKOot0BzCsceahZZFLXS r+mJAPzqnPyOxj5R54yLNELVi7i1WjSDdNM4f5nWt9fZCSdAgQsInV6dZnkOgKGHtt6Z /TjUKSlQgENkImSTQEH+3ELgBGgBQtsJri2dG6KOXhG7wTW7rcT+UgxzJuon6JjsmeNl Ympg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=G30UzRcj; 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 f26si14652775edy.22.2021.07.06.07.43.40; Tue, 06 Jul 2021 07:44:02 -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=@ffwll.ch header.s=google header.b=G30UzRcj; 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 S232591AbhGFOmO (ORCPT + 99 others); Tue, 6 Jul 2021 10:42:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232588AbhGFOmM (ORCPT ); Tue, 6 Jul 2021 10:42:12 -0400 Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B7F0C08EC26 for ; Tue, 6 Jul 2021 07:39:31 -0700 (PDT) Received: by mail-ot1-x333.google.com with SMTP id 75-20020a9d08510000b02904acfe6bcccaso1659020oty.12 for ; Tue, 06 Jul 2021 07:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zm0DaryDqZq3vejGZ3jPeBiO1tR+wTWZk5xnShXCnO4=; b=G30UzRcjxEx6Xt1b6aM3vMaunEynpsORVhKQH6x0woz09DwXifJzfkCwSyC/RCtJF6 0dlH0FE/N9kBHKK6ACyKzCL9AAOx7O6sYOnj6Loko6p9DlXanIsMowNmzYBNl9TxrrVf GOw2Y2m6AMmOya+oUGFCdCcJKjukWk6zcmTM4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zm0DaryDqZq3vejGZ3jPeBiO1tR+wTWZk5xnShXCnO4=; b=CAVPagU/eIAjA2pA5p8REMeyh7g8CRJvKO3yu7ktfS1f1fZZ2QV1oh/BxYjX26SQm4 t5O3BqZzMY/kOT25+ex2+B4nc5YsLjGtwHguPmYj11VjhZxV9gLs5ompy+SosyNiF1x4 35blOru0avFO9kl26ylvzlk3+kIHJqfhJUN/K1HdC8YmYhDBQ9XdIThHZ5+CXXomxOGI 7xLBuhQl1Gk+kdmLI56++eY8iRw6Tlc/jfcSZs8fig7bpB8jOHonb90CvgZ6Ze6tibdc U13ZZTnIDctYwAzbGNM21zibjoSqHqXYFi0wRZNH/T2zh7LKz0rw7XhrtJY0xHgAhp6a yQzw== X-Gm-Message-State: AOAM532Iy9xQ64klG+169Uw3CnlqGYJwfapeUTE3K083ahuOTXU5IETV 5cw/pZ4Bz4NDmU2wmzCjv+2LZE3KZg3X1PFEVTN5Mg== X-Received: by 2002:a9d:27a4:: with SMTP id c33mr15519363otb.281.1625582370636; Tue, 06 Jul 2021 07:39:30 -0700 (PDT) MIME-Version: 1.0 References: <20210705130314.11519-1-ogabbay@kernel.org> <20210706142357.GN4604@ziepe.ca> In-Reply-To: <20210706142357.GN4604@ziepe.ca> From: Daniel Vetter Date: Tue, 6 Jul 2021 16:39:19 +0200 Message-ID: Subject: Re: [PATCH v4 0/2] Add p2p via dmabuf to habanalabs To: Jason Gunthorpe Cc: Oded Gabbay , Oded Gabbay , "Linux-Kernel@Vger. Kernel. Org" , Greg Kroah-Hartman , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , 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" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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). The hard part is the userspace driver and all the things you're submitting to it. We've had open kernel drivers for mail/qualcomm/... years before any believable open implementation started existing. Typing up the memory manager and hw submission queue handling is comparitively trivial. Generally the kernel driver is also done last, you bring up the userspace first, often by just directly programming the hw from userspace. Kernel driver only gets in the way with this stuff (nouveau is entirely developed as a userspace driver, as the most extreme example). This is a bit different for the display side, but nowadays those drivers are fully in-kernel so they're all open. Well except the nvidia one, and I've not heard of nvidia working on even an out-of-tree open display driver, so that won't help the in-tree effort at all. 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 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. > > open up your hw enough for that, I really don't see the point in > > merging such a driver, it'll be an unmaintainable stack by anyone else > > who's not having access to those NDA covered specs and patents and > > everything. > > My perspective from RDMA is that the drivers are black boxes. I can > hack around the interface layers but there is a lot of wild stuff in > there that can't be understood without access to the HW documentation. There's shipping gpu drivers with entirely reverse-engineered stacks. And I don't mean "shipping in fedora" but "shipping in Chrome tablets sold by OEM partners of Google". So it's very much possible, even if the vendor is maximally stubborn about things. > I think only HW that has open specs, like say NVMe, can really be > properly community oriented. Otherwise we have to work in a community > partnership with the vendor. Well sure that's the ideal case, but most vendors in the accel space arent interested actual partnership with the wider community. It's "merge this kernel driver and have no further demands about anything else". Well there are some who are on board, but it does take pretty enormous amounts of coercion. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch