From: Daniel Vetter <daniel@ffwll.ch>
To: Olof Johansson <olof@lixom.net>
Cc: linux-kernel@vger.kernel.org,
linux-accelerators@lists.ozlabs.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Frederic Barrat <fbarrat@linux.ibm.com>,
Andrew Donnellan <andrew.donnellan@au1.ibm.com>,
ogabbay@habana.ai, airlied@redhat.com, jglisse@redhat.com
Subject: Re: [PATCH 1/5] drivers/accel: Introduce subsystem
Date: Fri, 25 Jan 2019 23:23:37 +0100 [thread overview]
Message-ID: <20190125222337.GI3271@phenom.ffwll.local> (raw)
In-Reply-To: <20190125181616.62609-2-olof@lixom.net>
On Fri, Jan 25, 2019 at 10:16:12AM -0800, Olof Johansson wrote:
> We're starting to see more of these kind of devices, the current
> upcoming wave will likely be around machine learning and inference
> engines. A few drivers have been added to drivers/misc for this, but
> it's timely to make it into a separate group of drivers/subsystem, to
> make it easier to find them, and to encourage collaboration between
> contributors.
>
> Over time, we expect to build shared frameworks that the drivers will
> make use of, but how that framework needs to look like to fill the needs
> is still unclear, and the best way to gain that knowledge is to give the
> disparate implementations a shared location.
>
> There has been some controversy around expectations for userspace
> stacks being open. The clear preference is to see that happen, and any
> driver and platform stack that is delivered like that will be given
> preferential treatment, and at some point in the future it might
> become the requirement. Until then, the bare minimum we need is an
> open low-level userspace such that the driver and HW interfaces can be
> exercised if someone is modifying the driver, even if the full details
> of the workload are not always available.
>
> Bootstrapping this with myself and Greg as maintainers (since the current
> drivers will be moving out of drivers/misc). Looking forward to expanding
> that group over time.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Olof Johansson <olof@lixom.net>
I spent a bit of time reading the proposed drivers, mostly just their uapi
(habanalabs and ocxl&cxl), and there's really no technical difference I
think between an accelaration driver sitting in drivers/gpu and an
accelaration driver sitting in drivers/accel. Except:
- drivers/gpu already has common interfaces for the things you'll probably
want to standardize (buffer sharing, syncronization primitives,
scheduler - right now we're working on figuring out some common
tracepoints).
- Maybe even more important, drivers/gpu has the lessons learned in its
codebase about what not to standardize between drivers (everything else,
you'll regret it, we've been there).
- drivers/gpu is the subsystem with 20 years of experience writing tiny
shim drivers in the kernel for high performance accelarators that need a
pretty huge stack in userspace to make them do anything useful. 20 years
ago all the rage to make faster was graphics, now it's AI. Looks exactly
the same from a kernel pov - command buffers, gigabytes of DMA and a
security/long term support nightmare.
- drivers/gpu requires open source. The real thing, not some demo that
does a few DMA operations.
And now we have drivers/accel and someone gets to explain to nvidia (or
arm or whatever) how their exact same drivers (and well run engineering
orgs really only invent command submission once) can be merged when they
say it's for a TPU, and will get rejected when they say it's for a GPU. Or
someone gets to explain to TPU+GPU vendors why their driver is not cool
(because we'd end up with two), while their startup-competition only doing
a TPU is totally fine and merged into upstream. Or we just stuff all the
kernel drivers for blobby userspace into drivers/accel and otherwise
ignore each another.
I guess that last option would at least somewhat help me, since I wont
ever have to explain anymore why we're the radical commies on dri-devel
:-)
Anyway, only reason I replied here again is because I accidentally started
a private thread (well was too lazy to download the mbox to properly
reply), and that's not good either. But I don't think anyone's going to
change their opinion here, I think this reply is just for the record.
Cheers, Daniel
PS: Seen that there's a v2 of this now with Documentation, hasn't reached
my inbox (yet). I don't think that one clarifies any of the tricky
questions between drivers/gpu and drivers/accel, so figured won't harm if
I leave the reply on v1.
> ---
> MAINTAINERS | 8 ++++++++
> drivers/Kconfig | 2 ++
> drivers/Makefile | 1 +
> drivers/accel/Kconfig | 16 ++++++++++++++++
> drivers/accel/Makefile | 5 +++++
> 5 files changed, 32 insertions(+)
> create mode 100644 drivers/accel/Kconfig
> create mode 100644 drivers/accel/Makefile
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index ddcdc29dfe1f6..8a9bbaf8f6e90 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -7033,6 +7033,14 @@ W: https://linuxtv.org
> S: Supported
> F: drivers/media/platform/sti/hva
>
> +HW ACCELERATOR OFFLOAD SUBSYSTEM
> +M: Olof Johansson <olof@lixom.net>
> +M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> +L: linux-accelerators@lists.ozlabs.org
> +S: Supported
> +F: drivers/accel/
> +F: Documentation/accelerators/
> +
> HWPOISON MEMORY FAILURE HANDLING
> M: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> L: linux-mm@kvack.org
> diff --git a/drivers/Kconfig b/drivers/Kconfig
> index 4f9f99057ff85..3cc461f325569 100644
> --- a/drivers/Kconfig
> +++ b/drivers/Kconfig
> @@ -228,4 +228,6 @@ source "drivers/siox/Kconfig"
>
> source "drivers/slimbus/Kconfig"
>
> +source "drivers/accel/Kconfig"
> +
> endmenu
> diff --git a/drivers/Makefile b/drivers/Makefile
> index 04da7876032cc..e4be06579cc5d 100644
> --- a/drivers/Makefile
> +++ b/drivers/Makefile
> @@ -186,3 +186,4 @@ obj-$(CONFIG_MULTIPLEXER) += mux/
> obj-$(CONFIG_UNISYS_VISORBUS) += visorbus/
> obj-$(CONFIG_SIOX) += siox/
> obj-$(CONFIG_GNSS) += gnss/
> +obj-$(CONFIG_ACCEL) += accel/
> diff --git a/drivers/accel/Kconfig b/drivers/accel/Kconfig
> new file mode 100644
> index 0000000000000..13b36c0398895
> --- /dev/null
> +++ b/drivers/accel/Kconfig
> @@ -0,0 +1,16 @@
> +#
> +# Drivers for hardware offload accelerators
> +# See Documentation/accel/README.rst for more details
> +#
> +
> +menuconfig ACCEL
> + bool "Hardware offload accelerator support"
> + help
> + HW offload accelerators are used for high-bandwidth workloads
> + where a higher-level kernel/userspace interface isn't suitable.
> +
> +if ACCEL
> +
> +comment "HW Accellerator drivers"
> +
> +endif
> diff --git a/drivers/accel/Makefile b/drivers/accel/Makefile
> new file mode 100644
> index 0000000000000..343bbb8f45a14
> --- /dev/null
> +++ b/drivers/accel/Makefile
> @@ -0,0 +1,5 @@
> +# SPDX-License-Identifier: GPL-2.0
> +#
> +# Makefile for accel devices
> +#
> +
> --
> 2.11.0
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2019-01-25 22:23 UTC|newest]
Thread overview: 103+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 0:00 [PATCH 00/15] Habana Labs kernel driver Oded Gabbay
2019-01-23 0:00 ` [PATCH 01/15] habanalabs: add skeleton driver Oded Gabbay
2019-01-23 0:49 ` Joe Perches
2019-01-25 19:18 ` Oded Gabbay
2019-01-23 12:28 ` Mike Rapoport
2019-01-23 12:40 ` Greg KH
2019-01-23 12:55 ` Mike Rapoport
2019-01-25 20:09 ` Oded Gabbay
2019-01-25 20:05 ` Oded Gabbay
2019-01-26 16:05 ` Arnd Bergmann
2019-01-26 16:24 ` Oded Gabbay
2019-01-26 21:14 ` Arnd Bergmann
2019-01-26 21:48 ` Oded Gabbay
2019-01-27 8:32 ` gregkh
2019-01-29 22:49 ` Oded Gabbay
2019-01-23 0:00 ` [PATCH 03/15] habanalabs: add basic Goya support Oded Gabbay
2019-01-23 12:28 ` Mike Rapoport
2019-01-25 20:32 ` Oded Gabbay
2019-01-27 6:39 ` Mike Rapoport
2019-01-28 7:44 ` Oded Gabbay
2019-01-23 0:00 ` [PATCH 04/15] habanalabs: add context and ASID modules Oded Gabbay
2019-01-23 12:28 ` Mike Rapoport
2019-01-25 21:07 ` Oded Gabbay
2019-01-23 0:00 ` [PATCH 05/15] habanalabs: add command buffer module Oded Gabbay
2019-01-23 12:28 ` Mike Rapoport
2019-01-25 21:47 ` Oded Gabbay
2019-01-27 6:49 ` Mike Rapoport
2019-01-28 7:55 ` Oded Gabbay
2019-01-28 8:41 ` Mike Rapoport
2019-01-23 0:00 ` [PATCH 06/15] habanalabs: add basic Goya h/w initialization Oded Gabbay
2019-01-25 7:46 ` Mike Rapoport
2019-01-28 10:35 ` Oded Gabbay
2019-01-23 0:00 ` [PATCH 07/15] habanalabs: add h/w queues module Oded Gabbay
2019-01-25 7:50 ` Mike Rapoport
2019-01-28 10:50 ` Oded Gabbay
2019-01-23 0:00 ` [PATCH 08/15] habanalabs: add event queue and interrupts Oded Gabbay
2019-01-25 7:51 ` Mike Rapoport
2019-01-28 11:14 ` Oded Gabbay
2019-01-23 0:00 ` [PATCH 09/15] habanalabs: add sysfs and hwmon support Oded Gabbay
2019-01-25 7:54 ` Mike Rapoport
2019-01-28 11:26 ` Oded Gabbay
2019-01-23 0:00 ` [PATCH 10/15] habanalabs: add device reset support Oded Gabbay
2019-01-27 7:51 ` Mike Rapoport
2019-01-28 12:53 ` Oded Gabbay
2019-01-23 0:00 ` [PATCH 11/15] habanalabs: add command submission module Oded Gabbay
2019-01-27 15:11 ` Mike Rapoport
2019-01-28 13:51 ` Oded Gabbay
2019-01-23 0:00 ` [PATCH 12/15] habanalabs: add virtual memory and MMU modules Oded Gabbay
2019-01-27 16:13 ` Mike Rapoport
2019-01-30 10:34 ` Oded Gabbay
2019-01-23 0:00 ` [PATCH 13/15] habanalabs: implement INFO IOCTL Oded Gabbay
2019-01-23 0:00 ` [PATCH 14/15] habanalabs: add debugfs support Oded Gabbay
2019-01-23 0:00 ` [PATCH 15/15] Update MAINTAINERS and CREDITS with habanalabs info Oded Gabbay
2019-01-23 12:27 ` [PATCH 00/15] Habana Labs kernel driver Mike Rapoport
2019-01-23 22:43 ` Oded Gabbay
2019-01-23 21:52 ` Olof Johansson
2019-01-23 22:40 ` Oded Gabbay
2019-01-23 23:16 ` Olof Johansson
2019-01-24 1:03 ` Andrew Donnellan
2019-01-24 11:59 ` Jonathan Cameron
2019-01-25 17:13 ` Olof Johansson
2019-02-24 22:23 ` Pavel Machek
2019-01-23 21:57 ` Dave Airlie
2019-01-23 22:02 ` Dave Airlie
2019-01-23 22:31 ` Oded Gabbay
2019-01-23 22:45 ` Dave Airlie
2019-01-23 23:04 ` Olof Johansson
2019-01-23 23:20 ` Jerome Glisse
2019-01-23 23:35 ` Oded Gabbay
2019-01-23 23:41 ` Olof Johansson
2019-01-23 23:40 ` Olof Johansson
2019-01-23 23:48 ` Jerome Glisse
2019-01-24 7:35 ` Daniel Vetter
2019-01-24 9:50 ` Oded Gabbay
2019-01-24 10:22 ` Dave Airlie
2019-01-25 0:13 ` Olof Johansson
2019-01-25 7:43 ` Daniel Vetter
2019-01-25 15:02 ` Olof Johansson
2019-01-25 16:00 ` Daniel Vetter
2019-01-24 23:51 ` Olof Johansson
2019-01-23 23:23 ` Oded Gabbay
2019-01-25 7:37 ` Greg Kroah-Hartman
2019-01-25 15:33 ` Olof Johansson
2019-01-25 16:06 ` Greg Kroah-Hartman
2019-01-25 17:12 ` Olof Johansson
2019-01-25 18:16 ` [PATCH/RFC 0/5] HW accel subsystem Olof Johansson
2019-01-25 18:16 ` [PATCH 1/5] drivers/accel: Introduce subsystem Olof Johansson
2019-01-25 21:13 ` [PATCH v2 " Olof Johansson
2019-01-26 17:09 ` Randy Dunlap
2019-01-27 4:31 ` Andrew Donnellan
2019-01-28 19:36 ` Frederic Barrat
2019-01-25 22:23 ` Daniel Vetter [this message]
2019-01-27 16:31 ` [PATCH " Daniel Vetter
2019-01-25 18:16 ` [PATCH 2/5] cxl: Move to drivers/accel Olof Johansson
2019-01-25 18:16 ` [PATCH 3/5] drivers/accel: cxl: Move non-uapi include files Olof Johansson
2019-01-25 18:16 ` [PATCH 4/5] ocxl: Move to drivers/accel Olof Johansson
2019-01-25 18:16 ` [PATCH 5/5] drivers/accel: ocxl: Move non-uapi include files Olof Johansson
2019-01-26 13:51 ` Greg Kroah-Hartman
2019-01-26 21:11 ` [PATCH/RFC 0/5] HW accel subsystem Arnd Bergmann
2019-02-01 9:10 ` Kenneth Lee
2019-02-01 10:07 ` Greg Kroah-Hartman
2019-02-01 12:09 ` Kenneth Lee
2019-01-26 13:52 ` [PATCH 00/15] Habana Labs kernel driver Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190125222337.GI3271@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@redhat.com \
--cc=andrew.donnellan@au1.ibm.com \
--cc=fbarrat@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=jglisse@redhat.com \
--cc=linux-accelerators@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ogabbay@habana.ai \
--cc=olof@lixom.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox