ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Dave Airlie <airlied@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>, ksummit@lists.linux.dev
Subject: Re: [MAINTAINER SUMMIT] User-space requirements for accelerator drivers
Date: Sun, 12 Sep 2021 22:48:15 +0300	[thread overview]
Message-ID: <YT5Zf/nq5WobZLyI@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CAPM=9tx+wAUSuYm+8eyGX2Y7+J5qY9hZHB7JY_XO_TYEQYJk8g@mail.gmail.com>

Hi Dave,

On Mon, Sep 13, 2021 at 05:13:05AM +1000, Dave Airlie wrote:
> On Sat, 11 Sept 2021 at 07:10, Jonathan Corbet <corbet@lwn.net> wrote:
> >
> > There has been a regular disagreement in recent years about whether
> > drivers for accelerators (such as for the Habana Gaudi device) should be
> > subject to the same requirements as GPU drivers when it comes to the
> > availability of a free implementation of the user-space side.  It flared
> > up again recently:
> >
> >    https://lwn.net/Articles/867168/
> >
> > Happily, the Habana situation in particular seems to be resolving
> > itself:
> >
> >    https://lwn.net/ml/linux-kernel/CAFCwf119s7iXk+qpwoVPnRtOGcxeuZb3rnihf6NWWoVT-4ODHA@mail.gmail.com/
> >
> > But even there it is clear that the fundamental question has not yet
> > been resolved.
> >
> > This seems like the sort of question that the maintainer summit exists
> > to address.  Specifically, we could discuss:
> >
> >  - Under which circumstances should the kernel community require the
> >    existence of freely licensed user-space code that exercises all
> >    functionalities of a proposed kernel driver or feature?
> >
> >  - Are there internal kernel interfaces, such as DMA-BUF or P2PDMA, that
> >    are only available to drivers with a free user-space implementation?
> >    Do we need an EXPORT_SYMBOL_USERSPACE_GPL()?
> >
> >  - What constitutes an acceptable user-space implementation in cases
> >    where these restrictions apply?
> >
> > I suspect that more clarity (and fewer arguments) on these questions
> > would be welcome both within and beyond the development community.
> >
> > Thanks,
> 
> Can everyone take a read of:
> 
> https://dri.freedesktop.org/docs/drm/gpu/drm-uapi.html#open-source-userspace-requirements
> 
> I think in order to clean the signal/noise ratio up in here, some
> education effort might help people realise how non-trivial these
> things are.
> 
> 1. These drivers are not one or two ioctls that a few selftests and a
> small test app can cover. It's like saying LTP is all we need to
> define the uAPI for the kernel and if anyone does something LTP
> doesn't cover the app is broken. These systems are generally complex,
> multithreaded and multiuser uAPIs, involving command streams recorded
> in userspace being submitted to the devices. They interact with memory
> management and can cause unfindable deadlocks across the system if
> designed incorrectly. Documentation or kselftests aren't going to cut
> it here.
> 
> 2. In my experience we don't build communities by merging everything,
> we build them by saying No more and pushing back on companies with
> education and cross-vendor cooperation. Responsible kernel maintenance
> shouldn't end at the kernel boundaries. If you aren't the person to
> help enforce a userspace for a driver you are being asked to merge,
> then don't merge it, but try and engage the vendor with the
> communities of interest in the kernel who already deal in those areas.
> 
> 3. The pressures on these companies to merge things into Linux isn't
> altruistic or even that they necessarily want to be in the Linux
> kernel upstream. They are being told by Red Hat, Facebook, Google or
> someone else that they need an upstream driver. They will generally
> engage at a minimal level to get past that blockage and then
> disengage. Having a clear set of rules (or a place to discuss those
> rules, for new subsystems) and a gentle pushback helps develop
> communities by unlocking funding within those larger areas. As Laurent
> has said this isn't free, but just putting things into the kernel and
> not caring about userspace hasn't built any Linux communities in the
> accelerator areas.
> 
> That said I started writing a cleaned up version of the above document
> which is more generic that other subsystems could sign on to. I was
> going to engage with a coalition of like-minded maintainers rather
> than trying to gain consensus among a herd of cats to see if we can
> draw clearer lines in the sand that cross more subsystems so the
> experience of drivers/gpu doesn't go unwasted but also isn't just
> bypassed by subsystem hunting.
> 
> https://cgit.freedesktop.org/~airlied/linux/log/?h=wip-open-source-userspace

Thank you for that effort. Could you add camera ISPs to the list with
FPGAs, DSPs and ML accelerators ?

You mention Level0 in that document. I assume you don't mean the
OpenStreetMap editor ?

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2021-09-12 19:48 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 21:00 Jonathan Corbet
2021-09-10 21:32 ` Josh Triplett
2021-09-13 13:50   ` Christian Brauner
2021-09-13 13:57     ` Daniel Vetter
2021-09-14  2:07       ` Laurent Pinchart
2021-09-14 14:40   ` Jani Nikula
2021-09-14 14:45     ` Geert Uytterhoeven
2021-09-14 14:59       ` Jani Nikula
2021-09-14 15:10         ` Geert Uytterhoeven
2021-09-10 21:51 ` James Bottomley
2021-09-10 21:59   ` Alexandre Belloni
2021-09-10 22:35     ` James Bottomley
2021-09-11 14:51       ` Jonathan Corbet
2021-09-11 15:24         ` James Bottomley
2021-09-11 21:52           ` Laurent Pinchart
2021-09-14 13:22             ` Johannes Berg
2021-09-11  0:08   ` Laurent Pinchart
2021-09-10 22:52 ` Mauro Carvalho Chehab
2021-09-10 23:45   ` Josh Triplett
2021-09-10 23:48     ` Dave Hansen
2021-09-11  0:13       ` Laurent Pinchart
2021-09-10 23:55     ` Thomas Gleixner
2021-09-11  0:20       ` Laurent Pinchart
2021-09-11 14:20         ` Steven Rostedt
2021-09-11 22:08           ` Laurent Pinchart
2021-09-11 22:42             ` Steven Rostedt
2021-09-11 23:10               ` Laurent Pinchart
2021-09-13 11:10               ` Mark Brown
2021-09-11 22:51           ` Mauro Carvalho Chehab
2021-09-11 23:22           ` Mauro Carvalho Chehab
2021-09-11 10:31       ` Leon Romanovsky
2021-09-11 11:41         ` Laurent Pinchart
2021-09-11 12:04           ` Leon Romanovsky
2021-09-11 22:04             ` Laurent Pinchart
2021-09-12  4:27               ` Leon Romanovsky
2021-09-12  7:26                 ` Greg KH
2021-09-12  8:29                   ` Leon Romanovsky
2021-09-12 13:25                     ` Greg KH
2021-09-12 14:15                       ` Leon Romanovsky
2021-09-12 14:34                         ` Greg KH
2021-09-12 16:41                           ` Laurent Pinchart
2021-09-12 20:35                           ` Dave Airlie
2021-09-12 20:41                           ` Dave Airlie
2021-09-12 20:49                             ` Daniel Vetter
2021-09-12 21:12                               ` Dave Airlie
2021-09-12 22:51                                 ` Linus Walleij
2021-09-12 23:15                                   ` Dave Airlie
2021-09-13 13:20                                   ` Arnd Bergmann
2021-09-13 13:54                                     ` Daniel Vetter
2021-09-13 22:04                                       ` Arnd Bergmann
2021-09-13 23:33                                         ` Dave Airlie
2021-09-14  9:08                                           ` Arnd Bergmann
2021-09-14  9:23                                             ` Daniel Vetter
2021-09-14 10:47                                               ` Laurent Pinchart
2021-09-14 12:58                                               ` Arnd Bergmann
2021-09-14 19:45                                                 ` Daniel Vetter
2021-09-14 15:43                                             ` Luck, Tony
2021-09-13 14:52                                     ` James Bottomley
2021-09-14 13:07                                     ` Linus Walleij
2021-09-13 14:03                           ` Mark Brown
2021-09-12 15:55                       ` Laurent Pinchart
2021-09-12 16:43                         ` James Bottomley
2021-09-12 16:58                           ` Laurent Pinchart
2021-09-12 17:08                             ` James Bottomley
2021-09-12 19:52                   ` Dave Airlie
2021-09-12  7:46                 ` Mauro Carvalho Chehab
2021-09-12  8:00                   ` Leon Romanovsky
2021-09-12 14:53                     ` Laurent Pinchart
2021-09-12 15:41                       ` Mauro Carvalho Chehab
2021-09-10 23:46   ` Laurent Pinchart
2021-09-11  0:38     ` Mauro Carvalho Chehab
2021-09-11  9:27       ` Laurent Pinchart
2021-09-11 22:33         ` Mauro Carvalho Chehab
2021-09-13 12:04         ` Mark Brown
2021-09-12 19:13 ` Dave Airlie
2021-09-12 19:48   ` Laurent Pinchart [this message]
2021-09-13  2:26     ` Dave Airlie

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=YT5Zf/nq5WobZLyI@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=corbet@lwn.net \
    --cc=ksummit@lists.linux.dev \
    /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