Re: New subsystem for acceleration devices

2022-09-28 Thread Oded Gabbay
On Mon, Sep 26, 2022 at 11:16 AM Christoph Hellwig wrote: > > Btw, there is another interesting thing around on the block: > > NVMe Computational Storage devices. Don't be fooled by the name, much > of it is not about neither computation not storage, but it allows to > use the existing NVMe queui

Re: New subsystem for acceleration devices

2022-09-23 Thread Oded Gabbay
On Mon, Aug 29, 2022 at 11:54 PM Kevin Hilman wrote: > > Hi Oded (and sorry I misspelled your name last time), > > Oded Gabbay writes: > > > On Tue, Aug 23, 2022 at 9:24 PM Kevin Hilman wrote: > >> > >> Hi Obed, > >> > >> Oded Gabbay writes: > >> > >> [...] > >> > >> > I want to update that I'm

Re: New subsystem for acceleration devices

2022-08-29 Thread Kevin Hilman
Hi Oded (and sorry I misspelled your name last time), Oded Gabbay writes: > On Tue, Aug 23, 2022 at 9:24 PM Kevin Hilman wrote: >> >> Hi Obed, >> >> Oded Gabbay writes: >> >> [...] >> >> > I want to update that I'm currently in discussions with Dave to figure >> > out what's the best way to mo

Re: New subsystem for acceleration devices

2022-08-23 Thread Oded Gabbay
On Tue, Aug 23, 2022 at 9:24 PM Kevin Hilman wrote: > > Hi Obed, > > Oded Gabbay writes: > > [...] > > > I want to update that I'm currently in discussions with Dave to figure > > out what's the best way to move forward. We are writing it down to do > > a proper comparison between the two paths (

Re: New subsystem for acceleration devices

2022-08-23 Thread Kevin Hilman
Hi Obed, Oded Gabbay writes: [...] > I want to update that I'm currently in discussions with Dave to figure > out what's the best way to move forward. We are writing it down to do > a proper comparison between the two paths (new accel subsystem or > using drm). I guess it will take a week or so

Re: New subsystem for acceleration devices

2022-08-10 Thread Jiho Chu
On Wed, 10 Aug 2022 00:42:24 +0300 Oded Gabbay wrote: > > Hi Jiho, Yuji. > > I want to update that I'm currently in discussions with Dave to figure > out what's the best way to move forward. We are writing it down to do > a proper comparison between the two paths (new accel subsystem or > using

Re: New subsystem for acceleration devices

2022-08-10 Thread Oded Gabbay
devel ; Arnd Bergmann > > ; Linux-Kernel@Vger. Kernel. Org > > ; Jason Gunthorpe > > Subject: Re: New subsystem for acceleration devices > > > > Hi Jiho, Yuji. > > > > I want to update that I'm currently in discussions with Dave to figure out > &

RE: New subsystem for acceleration devices

2022-08-10 Thread yuji2.ishikawa
nthorpe > Subject: Re: New subsystem for acceleration devices > > Hi Jiho, Yuji. > > I want to update that I'm currently in discussions with Dave to figure out > what's > the best way to move forward. We are writing it down to do a proper comparison > between the

Re: New subsystem for acceleration devices

2022-08-09 Thread Oded Gabbay
On Sun, Aug 7, 2022 at 9:50 AM Oded Gabbay wrote: > > On Fri, Aug 5, 2022 at 6:03 AM Dave Airlie wrote: > > > > On Thu, 4 Aug 2022 at 17:44, Oded Gabbay wrote: > > > > > > On Thu, Aug 4, 2022 at 2:54 AM Dave Airlie wrote: > > > > > > > > On Thu, 4 Aug 2022 at 06:21, Oded Gabbay wrote: > > > >

Re: New subsystem for acceleration devices

2022-08-09 Thread Jason Gunthorpe
On Tue, Aug 09, 2022 at 02:46:36PM +0200, Arnd Bergmann wrote: > On Tue, Aug 9, 2022 at 2:18 PM Jason Gunthorpe wrote: > > On Tue, Aug 09, 2022 at 10:32:27AM +0200, Arnd Bergmann wrote: > > > On Tue, Aug 9, 2022 at 10:04 AM Christoph Hellwig > > > wrote: > > > > > > I think for devices with hard

Re: New subsystem for acceleration devices

2022-08-09 Thread Arnd Bergmann
On Tue, Aug 9, 2022 at 2:18 PM Jason Gunthorpe wrote: > On Tue, Aug 09, 2022 at 10:32:27AM +0200, Arnd Bergmann wrote: > > On Tue, Aug 9, 2022 at 10:04 AM Christoph Hellwig > > wrote: > > > > I think for devices with hardware MMU contexts you actually want to > > bind the context to a 'mm_struct

Re: New subsystem for acceleration devices

2022-08-09 Thread Jason Gunthorpe
On Mon, Aug 08, 2022 at 11:26:11PM +0300, Oded Gabbay wrote: > So if you want a common uAPI and a common userspace library to use it, > you need to expose the same device character files for every device, > regardless of the driver. e.g. you need all devices to be called > /dev/accelX and not /dev

Re: New subsystem for acceleration devices

2022-08-09 Thread Jason Gunthorpe
On Tue, Aug 09, 2022 at 10:32:27AM +0200, Arnd Bergmann wrote: > On Tue, Aug 9, 2022 at 10:04 AM Christoph Hellwig wrote: > > On Tue, Aug 09, 2022 at 08:23:27AM +0200, Greg Kroah-Hartman wrote: > > > > This is different from the number of FDs pointing at the struct file. > > > > Userpsace can open

Re: New subsystem for acceleration devices

2022-08-09 Thread Greg Kroah-Hartman
On Tue, Aug 09, 2022 at 01:04:15AM -0700, Christoph Hellwig wrote: > On Tue, Aug 09, 2022 at 08:23:27AM +0200, Greg Kroah-Hartman wrote: > > Based on the number of drivers that I see submitted weekly that try to > > restrict their open call to just one user by using atomic variables or > > other tr

Re: New subsystem for acceleration devices

2022-08-09 Thread Arnd Bergmann
On Tue, Aug 9, 2022 at 10:04 AM Christoph Hellwig wrote: > On Tue, Aug 09, 2022 at 08:23:27AM +0200, Greg Kroah-Hartman wrote: > > > This is different from the number of FDs pointing at the struct file. > > > Userpsace can open a HW state and point a lot of FDs at it, that is > > > userspace's pro

Re: New subsystem for acceleration devices

2022-08-08 Thread Greg Kroah-Hartman
On Mon, Aug 08, 2022 at 02:55:28PM -0300, Jason Gunthorpe wrote: > On Mon, Aug 08, 2022 at 08:10:22AM +0200, Greg Kroah-Hartman wrote: > > On Sun, Aug 07, 2022 at 02:25:33PM +0300, Oded Gabbay wrote: > > > 2. Common code to handle drivers that want to allow a single user at a > > > time to run open

Re: New subsystem for acceleration devices

2022-08-08 Thread Oded Gabbay
On Mon, Aug 8, 2022 at 8:46 PM Jason Gunthorpe wrote: > > On Sun, Aug 07, 2022 at 09:43:40AM +0300, Oded Gabbay wrote: > > > 1. If there is a subsystem which is responsible for creating and > > exposing the device character files, then there should be some code > > that connects between each devic

Re: New subsystem for acceleration devices

2022-08-08 Thread Jason Gunthorpe
On Mon, Aug 08, 2022 at 08:10:22AM +0200, Greg Kroah-Hartman wrote: > On Sun, Aug 07, 2022 at 02:25:33PM +0300, Oded Gabbay wrote: > > 2. Common code to handle drivers that want to allow a single user at a > > time to run open the device char file. > > Note, that's an impossible request, and one t

Re: New subsystem for acceleration devices

2022-08-08 Thread Jason Gunthorpe
On Sun, Aug 07, 2022 at 09:43:40AM +0300, Oded Gabbay wrote: > 1. If there is a subsystem which is responsible for creating and > exposing the device character files, then there should be some code > that connects between each device driver to that subsystem. > i.e. There should be functions that

Re: New subsystem for acceleration devices

2022-08-07 Thread Greg Kroah-Hartman
On Sun, Aug 07, 2022 at 02:25:33PM +0300, Oded Gabbay wrote: > 2. Common code to handle drivers that want to allow a single user at a > time to run open the device char file. Note, that's an impossible request, and one that the kernel should never worry about, so don't even try it. Think about us

Re: New subsystem for acceleration devices

2022-08-07 Thread Oded Gabbay
On Sun, Aug 7, 2022 at 9:43 AM Oded Gabbay wrote: > > On Fri, Aug 5, 2022 at 3:22 AM Jason Gunthorpe wrote: > > > > On Thu, Aug 04, 2022 at 08:48:28PM +0300, Oded Gabbay wrote: > > > > > > The flip is true of DRM - DRM is pretty general. I bet I could > > > > implement an RDMA device under DRM -

Re: New subsystem for acceleration devices

2022-08-06 Thread Oded Gabbay
On Fri, Aug 5, 2022 at 6:03 AM Dave Airlie wrote: > > On Thu, 4 Aug 2022 at 17:44, Oded Gabbay wrote: > > > > On Thu, Aug 4, 2022 at 2:54 AM Dave Airlie wrote: > > > > > > On Thu, 4 Aug 2022 at 06:21, Oded Gabbay wrote: > > > > > > > > On Wed, Aug 3, 2022 at 10:04 PM Dave Airlie wrote: > > > >

Re: New subsystem for acceleration devices

2022-08-06 Thread Oded Gabbay
On Fri, Aug 5, 2022 at 3:22 AM Jason Gunthorpe wrote: > > On Thu, Aug 04, 2022 at 08:48:28PM +0300, Oded Gabbay wrote: > > > > The flip is true of DRM - DRM is pretty general. I bet I could > > > implement an RDMA device under DRM - but that doesn't mean it should > > > be done. > > > > > > My big

Re: New subsystem for acceleration devices

2022-08-04 Thread Dave Airlie
On Thu, 4 Aug 2022 at 17:44, Oded Gabbay wrote: > > On Thu, Aug 4, 2022 at 2:54 AM Dave Airlie wrote: > > > > On Thu, 4 Aug 2022 at 06:21, Oded Gabbay wrote: > > > > > > On Wed, Aug 3, 2022 at 10:04 PM Dave Airlie wrote: > > > > > > > > On Sun, 31 Jul 2022 at 22:04, Oded Gabbay wrote: > > > >

Re: New subsystem for acceleration devices

2022-08-04 Thread Jason Gunthorpe
On Thu, Aug 04, 2022 at 08:48:28PM +0300, Oded Gabbay wrote: > > The flip is true of DRM - DRM is pretty general. I bet I could > > implement an RDMA device under DRM - but that doesn't mean it should > > be done. > > > > My biggest concern is that this subsystem not turn into a back door > > for

Re: New subsystem for acceleration devices

2022-08-04 Thread Oded Gabbay
On Thu, Aug 4, 2022 at 6:04 PM Jeffrey Hugo wrote: > > On 8/4/2022 6:00 AM, Tvrtko Ursulin wrote: > > > > On 04/08/2022 00:54, Dave Airlie wrote: > >> On Thu, 4 Aug 2022 at 06:21, Oded Gabbay wrote: > >>> > >>> On Wed, Aug 3, 2022 at 10:04 PM Dave Airlie wrote: > > On Sun, 31 Jul 2022

Re: New subsystem for acceleration devices

2022-08-04 Thread Oded Gabbay
On Thu, Aug 4, 2022 at 5:50 PM Jason Gunthorpe wrote: > > On Thu, Aug 04, 2022 at 10:43:42AM +0300, Oded Gabbay wrote: > > > After all, memory management services, or common device chars handling > > I can get from other subsystems (e.g. rdma) as well. I'm sure I could > > model my uAPI to be rdma

Re: New subsystem for acceleration devices

2022-08-04 Thread Jeffrey Hugo
On 8/4/2022 6:00 AM, Tvrtko Ursulin wrote: On 04/08/2022 00:54, Dave Airlie wrote: On Thu, 4 Aug 2022 at 06:21, Oded Gabbay wrote: On Wed, Aug 3, 2022 at 10:04 PM Dave Airlie wrote: On Sun, 31 Jul 2022 at 22:04, Oded Gabbay wrote: Hi, Greg and I talked a couple of months ago about pre

Re: New subsystem for acceleration devices

2022-08-04 Thread Jason Gunthorpe
On Thu, Aug 04, 2022 at 10:43:42AM +0300, Oded Gabbay wrote: > After all, memory management services, or common device chars handling > I can get from other subsystems (e.g. rdma) as well. I'm sure I could > model my uAPI to be rdma uAPI compliant (I can define proprietary uAPI > there as well), b

Re: New subsystem for acceleration devices

2022-08-04 Thread Tvrtko Ursulin
On 04/08/2022 00:54, Dave Airlie wrote: On Thu, 4 Aug 2022 at 06:21, Oded Gabbay wrote: On Wed, Aug 3, 2022 at 10:04 PM Dave Airlie wrote: On Sun, 31 Jul 2022 at 22:04, Oded Gabbay wrote: Hi, Greg and I talked a couple of months ago about preparing a new accel subsystem for compute/acc

Re: New subsystem for acceleration devices

2022-08-04 Thread Oded Gabbay
On Thu, Aug 4, 2022 at 2:54 AM Dave Airlie wrote: > > On Thu, 4 Aug 2022 at 06:21, Oded Gabbay wrote: > > > > On Wed, Aug 3, 2022 at 10:04 PM Dave Airlie wrote: > > > > > > On Sun, 31 Jul 2022 at 22:04, Oded Gabbay wrote: > > > > > > > > Hi, > > > > Greg and I talked a couple of months ago abou

Re: New subsystem for acceleration devices

2022-08-03 Thread Dave Airlie
On Thu, 4 Aug 2022 at 06:21, Oded Gabbay wrote: > > On Wed, Aug 3, 2022 at 10:04 PM Dave Airlie wrote: > > > > On Sun, 31 Jul 2022 at 22:04, Oded Gabbay wrote: > > > > > > Hi, > > > Greg and I talked a couple of months ago about preparing a new accel > > > subsystem for compute/acceleration devi