Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-10-16 Thread Matthew Brost
On Wed, Oct 16, 2024 at 08:27:51AM +0200, Thomas Hellström wrote: > On Wed, 2024-10-16 at 03:18 +, Matthew Brost wrote: > > On Wed, Oct 09, 2024 at 12:50:42PM +0200, Thomas Hellström wrote: > > > Hi, Matthew. > > > > > > Some comments below around migrating to SRAM. > > > > > > > > > On Tue,

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-10-15 Thread Thomas Hellström
On Wed, 2024-10-16 at 03:18 +, Matthew Brost wrote: > On Wed, Oct 09, 2024 at 12:50:42PM +0200, Thomas Hellström wrote: > > Hi, Matthew. > > > > Some comments below around migrating to SRAM. > > > > > > On Tue, 2024-08-27 at 19:48 -0700, Matthew Brost wrote: > > > This patch introduces suppo

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-10-15 Thread Matthew Brost
On Wed, Oct 09, 2024 at 12:50:42PM +0200, Thomas Hellström wrote: > Hi, Matthew. > > Some comments below around migrating to SRAM. > > > On Tue, 2024-08-27 at 19:48 -0700, Matthew Brost wrote: > > This patch introduces support for GPU Shared Virtual Memory (SVM) in > > the > > Direct Rendering M

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-10-09 Thread Thomas Hellström
Hi, Matthew. Some comments below around migrating to SRAM. On Tue, 2024-08-27 at 19:48 -0700, Matthew Brost wrote: > This patch introduces support for GPU Shared Virtual Memory (SVM) in > the > Direct Rendering Manager (DRM) subsystem. SVM allows for seamless > sharing of memory between the CPU

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-25 Thread Matthew Brost
On Tue, Sep 24, 2024 at 04:30:06PM +, Matthew Brost wrote: > On Tue, Sep 24, 2024 at 12:42:56PM +0200, Thomas Hellström wrote: > > Hi, Matt, > > > > Some random review comments on this patch I came across while looking > > at multi-device. > > > > Thanks, > > Thomas > > > > > > On Tue, 2024

RE: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-25 Thread Zeng, Oak
; dan...@ffwll.ch; airl...@gmail.com; > christian.koe...@amd.com > Subject: Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU > Shared Virtual Memory > > On Fri, Sep 06, 2024 at 06:41:18PM +, Zeng, Oak wrote: > > There are fundamental design conflicts with what we have a

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-24 Thread Matthew Brost
On Tue, Sep 24, 2024 at 12:42:56PM +0200, Thomas Hellström wrote: > Hi, Matt, > > Some random review comments on this patch I came across while looking > at multi-device. > > Thanks, > Thomas > > > On Tue, 2024-08-27 at 19:48 -0700, Matthew Brost wrote: > > This patch introduces support for GPU

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-24 Thread Thomas Hellström
Hi, Matt, Some random review comments on this patch I came across while looking at multi-device. Thanks, Thomas On Tue, 2024-08-27 at 19:48 -0700, Matthew Brost wrote: > This patch introduces support for GPU Shared Virtual Memory (SVM) in > the > Direct Rendering Manager (DRM) subsystem. SVM al

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-24 Thread Simona Vetter
On Fri, Sep 06, 2024 at 06:41:18PM +, Zeng, Oak wrote: > There are fundamental design conflicts with what we have aligned, see inline. > > > -Original Message- > > From: Intel-xe On Behalf > > Of Matthew Brost > > Sent: Tuesday, August 27, 2024 10:49 PM > > To: intel...@lists.freedesk

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-24 Thread Simona Vetter
On Wed, Sep 04, 2024 at 02:27:15PM +0200, Thomas Hellström wrote: > Hi, Sima, > > On Mon, 2024-09-02 at 14:33 +0200, Daniel Vetter wrote: > > Jumping in here in the middle, since I think it's a solid place to > > drop my > > idea of "align with core mm" gpusvm locking ... > > > > On Thu, Aug 29,

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-11 Thread Matthew Brost
On Mon, Sep 02, 2024 at 05:03:20PM +, Matthew Brost wrote: > On Mon, Sep 02, 2024 at 01:53:14PM +0200, Daniel Vetter wrote: > > On Thu, Aug 29, 2024 at 05:27:13PM +, Matthew Brost wrote: > > > On Thu, Aug 29, 2024 at 11:45:08AM +0200, Daniel Vetter wrote: > > > > On Tue, Aug 27, 2024 at 07:

RE: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-06 Thread Zeng, Oak
There are fundamental design conflicts with what we have aligned, see inline. > -Original Message- > From: Intel-xe On Behalf > Of Matthew Brost > Sent: Tuesday, August 27, 2024 10:49 PM > To: intel...@lists.freedesktop.org; dri-devel@lists.freedesktop.org > Cc: airl...@gmail.com; christi

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-04 Thread Thomas Hellström
Hi, Sima, On Mon, 2024-09-02 at 14:33 +0200, Daniel Vetter wrote: > Jumping in here in the middle, since I think it's a solid place to > drop my > idea of "align with core mm" gpusvm locking ... > > On Thu, Aug 29, 2024 at 08:56:23PM +, Matthew Brost wrote: > > On Thu, Aug 29, 2024 at 09:18:2

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-02 Thread Matthew Brost
On Mon, Sep 02, 2024 at 01:53:14PM +0200, Daniel Vetter wrote: > On Thu, Aug 29, 2024 at 05:27:13PM +, Matthew Brost wrote: > > On Thu, Aug 29, 2024 at 11:45:08AM +0200, Daniel Vetter wrote: > > > On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: > > > > This patch introduces suppo

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-02 Thread Daniel Vetter
Jumping in here in the middle, since I think it's a solid place to drop my idea of "align with core mm" gpusvm locking ... On Thu, Aug 29, 2024 at 08:56:23PM +, Matthew Brost wrote: > On Thu, Aug 29, 2024 at 09:18:29PM +0200, Thomas Hellström wrote: > Issues with removing a SVM range: > > - X

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-02 Thread Daniel Vetter
On Fri, Aug 30, 2024 at 11:16:53AM +0200, Thomas Hellström wrote: > Hi, Matthew > > On Tue, 2024-08-27 at 19:48 -0700, Matthew Brost wrote: > > +/** > > + * DOC: Overview > > + * > > + * GPU Shared Virtual Memory (GPU SVM) layer for the Direct > > Rendering Manager (DRM) > > + * > > + * The GPU SV

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-02 Thread Daniel Vetter
On Thu, Aug 29, 2024 at 05:27:13PM +, Matthew Brost wrote: > On Thu, Aug 29, 2024 at 11:45:08AM +0200, Daniel Vetter wrote: > > On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: > > > This patch introduces support for GPU Shared Virtual Memory (SVM) in the > > > Direct Rendering Ma

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-02 Thread Daniel Vetter
On Thu, Aug 29, 2024 at 04:49:15PM +, Matthew Brost wrote: > On Wed, Aug 28, 2024 at 08:50:02PM +0200, Daniel Vetter wrote: > > On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: > > > +int drm_gpusvm_migrate_to_sram(struct drm_gpusvm *gpusvm, > > > +struct d

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-02 Thread Daniel Vetter
On Fri, Aug 30, 2024 at 05:00:11AM +, Matthew Brost wrote: > On Wed, Aug 28, 2024 at 04:31:19PM +0200, Daniel Vetter wrote: > > On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: > > > + if (!ctx->mmap_locked) { > > > + /* > > > + * XXX: HMM

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-02 Thread Daniel Vetter
On Thu, Aug 29, 2024 at 04:40:47PM +, Matthew Brost wrote: > On Wed, Aug 28, 2024 at 06:25:18PM +0200, Daniel Vetter wrote: > > On Wed, Aug 28, 2024 at 03:43:48PM +, Matthew Brost wrote: > > > On Wed, Aug 28, 2024 at 04:46:24PM +0200, Christian König wrote: > > > > Am 28.08.24 um 16:31 schr

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-02 Thread Thomas Hellström
Hi, Matt On Fri, 2024-08-30 at 13:58 +, Matthew Brost wrote: > > > > So I specifically asked Jason about the performance problem about > > using > > many notifiers vs using a single one, and he responded that the > > problem > > is slowing down the core mm on invalidations, if the RB tree get

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-09-02 Thread Thomas Hellström
Hi, Matt. On Fri, 2024-08-30 at 13:47 +, Matthew Brost wrote: > On Fri, Aug 30, 2024 at 11:57:33AM +0200, Thomas Hellström wrote: > > Hi, Matthew, > > > > Agreed the below might not be important just now, but some ideas: > > > > On Thu, 2024-08-29 at 20:56 +, Matthew Brost wrote: > > > I

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-30 Thread Matthew Brost
On Fri, Aug 30, 2024 at 10:18:58AM +0200, Thomas Hellström wrote: > Hi, Matthew, > > On Thu, 2024-08-29 at 20:56 +, Matthew Brost wrote: > > On Thu, Aug 29, 2024 at 09:18:29PM +0200, Thomas Hellström wrote: > > > Hi, Matthew, > > > > > > On Thu, 2024-08-29 at 17:45 +, Matthew Brost wrote:

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-30 Thread Matthew Brost
On Fri, Aug 30, 2024 at 11:57:33AM +0200, Thomas Hellström wrote: > Hi, Matthew, > > Agreed the below might not be important just now, but some ideas: > > On Thu, 2024-08-29 at 20:56 +, Matthew Brost wrote: > > Issues with removing a SVM range: > > > > - Xe bind code stores invalidation / pr

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-30 Thread Thomas Hellström
Hi, Matthew, Agreed the below might not be important just now, but some ideas: On Thu, 2024-08-29 at 20:56 +, Matthew Brost wrote: > Issues with removing a SVM range: > > - Xe bind code stores invalidation / present state in VMA, this would >   need to be moved to the radix tree. I have Jira

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-30 Thread Thomas Hellström
Hi, Matthew On Tue, 2024-08-27 at 19:48 -0700, Matthew Brost wrote: > +/** > + * DOC: Overview > + * > + * GPU Shared Virtual Memory (GPU SVM) layer for the Direct > Rendering Manager (DRM) > + * > + * The GPU SVM layer is a component of the DRM framework designed to > manage shared > + * virtual

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-30 Thread Thomas Hellström
Hi, Matthew, On Thu, 2024-08-29 at 20:56 +, Matthew Brost wrote: > On Thu, Aug 29, 2024 at 09:18:29PM +0200, Thomas Hellström wrote: > > Hi, Matthew, > > > > On Thu, 2024-08-29 at 17:45 +, Matthew Brost wrote: > > > On Thu, Aug 29, 2024 at 11:16:49AM +0200, Thomas Hellström wrote: > > > >

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-29 Thread Matthew Brost
On Wed, Aug 28, 2024 at 04:31:19PM +0200, Daniel Vetter wrote: > On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: > > + if (!ctx->mmap_locked) { > > + /* > > +* XXX: HMM locking document indicates only a read-lock > > +

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-29 Thread Matthew Brost
On Thu, Aug 29, 2024 at 11:16:49AM +0200, Thomas Hellström wrote: > Hi, Matt. > > Some initial design comments / questions: > Hi, Thomas. Missed one question in initial reply. > On Tue, 2024-08-27 at 19:48 -0700, Matthew Brost wrote: > > This patch introduces support for GPU Shared Virtual Mem

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-29 Thread Matthew Brost
On Thu, Aug 29, 2024 at 09:18:29PM +0200, Thomas Hellström wrote: > Hi, Matthew, > > On Thu, 2024-08-29 at 17:45 +, Matthew Brost wrote: > > On Thu, Aug 29, 2024 at 11:16:49AM +0200, Thomas Hellström wrote: > > > Hi, Matt. > > > > > > Some initial design comments / questions: > > > > > > On

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-29 Thread Thomas Hellström
Hi, Matthew, On Thu, 2024-08-29 at 17:45 +, Matthew Brost wrote: > On Thu, Aug 29, 2024 at 11:16:49AM +0200, Thomas Hellström wrote: > > Hi, Matt. > > > > Some initial design comments / questions: > > > > On Tue, 2024-08-27 at 19:48 -0700, Matthew Brost wrote: > > > This patch introduces su

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-29 Thread Matthew Brost
On Thu, Aug 29, 2024 at 05:45:07PM +, Matthew Brost wrote: > On Thu, Aug 29, 2024 at 11:16:49AM +0200, Thomas Hellström wrote: > > Hi, Matt. > > > > Some initial design comments / questions: > > > > On Tue, 2024-08-27 at 19:48 -0700, Matthew Brost wrote: > > > This patch introduces support f

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-29 Thread Matthew Brost
On Thu, Aug 29, 2024 at 11:16:49AM +0200, Thomas Hellström wrote: > Hi, Matt. > > Some initial design comments / questions: > > On Tue, 2024-08-27 at 19:48 -0700, Matthew Brost wrote: > > This patch introduces support for GPU Shared Virtual Memory (SVM) in > > the > > Direct Rendering Manager (D

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-29 Thread Matthew Brost
On Thu, Aug 29, 2024 at 11:45:08AM +0200, Daniel Vetter wrote: > On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: > > This patch introduces support for GPU Shared Virtual Memory (SVM) in the > > Direct Rendering Manager (DRM) subsystem. SVM allows for seamless > > sharing of memory be

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-29 Thread Matthew Brost
On Wed, Aug 28, 2024 at 08:50:02PM +0200, Daniel Vetter wrote: > On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: > > +int drm_gpusvm_migrate_to_sram(struct drm_gpusvm *gpusvm, > > + struct drm_gpusvm_range *range, > > + const struct d

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-29 Thread Matthew Brost
On Wed, Aug 28, 2024 at 06:25:18PM +0200, Daniel Vetter wrote: > On Wed, Aug 28, 2024 at 03:43:48PM +, Matthew Brost wrote: > > On Wed, Aug 28, 2024 at 04:46:24PM +0200, Christian König wrote: > > > Am 28.08.24 um 16:31 schrieb Daniel Vetter: > > > > On Tue, Aug 27, 2024 at 07:48:38PM -0700, Ma

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-29 Thread Daniel Vetter
On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: > This patch introduces support for GPU Shared Virtual Memory (SVM) in the > Direct Rendering Manager (DRM) subsystem. SVM allows for seamless > sharing of memory between the CPU and GPU, enhancing performance and > flexibility in GPU c

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-29 Thread Thomas Hellström
Hi, Matt. Some initial design comments / questions: On Tue, 2024-08-27 at 19:48 -0700, Matthew Brost wrote: > This patch introduces support for GPU Shared Virtual Memory (SVM) in > the > Direct Rendering Manager (DRM) subsystem. SVM allows for seamless > sharing of memory between the CPU and GPU

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-28 Thread Daniel Vetter
On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: > +int drm_gpusvm_migrate_to_sram(struct drm_gpusvm *gpusvm, > +struct drm_gpusvm_range *range, > +const struct drm_gpusvm_ctx *ctx) > +{ > + u64 start = range->va.start, end =

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-28 Thread Daniel Vetter
On Wed, Aug 28, 2024 at 03:43:48PM +, Matthew Brost wrote: > On Wed, Aug 28, 2024 at 04:46:24PM +0200, Christian König wrote: > > Am 28.08.24 um 16:31 schrieb Daniel Vetter: > > > On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: > > > > + if (!ctx->mmap_locked) { > >

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-28 Thread Alex Deucher
On Wed, Aug 28, 2024 at 11:53 AM Matthew Brost wrote: > > On Wed, Aug 28, 2024 at 04:46:24PM +0200, Christian König wrote: > > Am 28.08.24 um 16:31 schrieb Daniel Vetter: > > > On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: > > > > + if (!ctx->mmap_locked) { > > > > +

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-28 Thread Matthew Brost
On Wed, Aug 28, 2024 at 04:46:24PM +0200, Christian König wrote: > Am 28.08.24 um 16:31 schrieb Daniel Vetter: > > On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: > > > + if (!ctx->mmap_locked) { > > > + /* > > > + * XXX: HMM locking document

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-28 Thread Christian König
Am 28.08.24 um 16:31 schrieb Daniel Vetter: On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: + if (!ctx->mmap_locked) { + /* +* XXX: HMM locking document indicates only a read-lock +* is required bu

Re: [RFC PATCH 05/28] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-08-28 Thread Daniel Vetter
On Tue, Aug 27, 2024 at 07:48:38PM -0700, Matthew Brost wrote: > + if (!ctx->mmap_locked) { > + /* > + * XXX: HMM locking document indicates only a read-lock > + * is required but there apears to be a window between > +