Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-07-02 Thread Danilo Krummrich
On Wed, Jul 02, 2025 at 11:23:26AM +0200, Pierre-Eric Pelloux-Prayer wrote: > > > Le 18/06/2025 à 11:18, Pierre-Eric Pelloux-Prayer a écrit : > > > > > > > > > > > > > > Adding an API to reserve fixed numbers would work but: > > > > * if the fixed numbers are chosen by the driver ("drm_reserv

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-07-02 Thread Pierre-Eric Pelloux-Prayer
Le 18/06/2025 à 11:18, Pierre-Eric Pelloux-Prayer a écrit : Adding an API to reserve fixed numbers would work but: * if the fixed numbers are chosen by the driver ("drm_reserve_id(u64_max -1)"), I don't see the benefit over the current patch * if the fixed numbers are allocated by drm (dr

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-18 Thread Pierre-Eric Pelloux-Prayer
Adding an API to reserve fixed numbers would work but: * if the fixed numbers are chosen by the driver ("drm_reserve_id(u64_max -1)"), I don't see the benefit over the current patch * if the fixed numbers are allocated by drm (drm_reserve_id("vm_update") -> u64), it would then require a way

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-13 Thread Danilo Krummrich
On Fri, Jun 13, 2025 at 11:27:08AM +0200, Pierre-Eric Pelloux-Prayer wrote: > Le 13/06/2025 à 10:35, Danilo Krummrich a écrit : > > On Fri, Jun 13, 2025 at 10:23:15AM +0200, Christian König wrote: > > > > Another option is to just add an interface to get a kernel client_id > > > > from the > > > >

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-13 Thread Pierre-Eric Pelloux-Prayer
Le 13/06/2025 à 10:35, Danilo Krummrich a écrit : On Fri, Jun 13, 2025 at 10:23:15AM +0200, Christian König wrote: Another option is to just add an interface to get a kernel client_id from the same atomic / IDA. That won't give us fixed numbers for in kernel clients. That's fine, then let

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-13 Thread Danilo Krummrich
On Fri, Jun 13, 2025 at 10:23:15AM +0200, Christian König wrote: > > Another option is to just add an interface to get a kernel client_id from > > the > > same atomic / IDA. > > That won't give us fixed numbers for in kernel clients. That's fine, then let's come up with an API that reserves fixe

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-13 Thread Danilo Krummrich
On Fri, Jun 13, 2025 at 10:29:35AM +0200, Philipp Stanner wrote: > Shouldn't the xarray be used nowadays for ID allocation? I think > idr_alloc_cyclic() (ida_alloc_cyclic() doesn't exist) is just a wrapper > around the xarray anyways. Yes, IDR is basically xarray under the hood. But, a raw xarray

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-13 Thread Danilo Krummrich
On Fri, Jun 13, 2025 at 09:51:27AM +0200, Pierre-Eric Pelloux-Prayer wrote: > If the theoretical overlap with client drm id is a concern, adding code to > drm_file_alloc() to not use the last 0xff ids would be easy. Not the theoretical overlap is not of any concern for me. What I dislike is driver

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-13 Thread Philipp Stanner
On Fri, 2025-06-13 at 10:23 +0200, Christian König wrote: > On 6/13/25 01:48, Danilo Krummrich wrote: > > On Thu, Jun 12, 2025 at 09:00:34AM +0200, Christian König wrote: > > > On 6/11/25 17:11, Danilo Krummrich wrote: > > > > > > > Mhm, reiterating our internal discussion on the mailing > > > > >

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-13 Thread Christian König
On 6/13/25 01:48, Danilo Krummrich wrote: > On Thu, Jun 12, 2025 at 09:00:34AM +0200, Christian König wrote: >> On 6/11/25 17:11, Danilo Krummrich wrote: >> Mhm, reiterating our internal discussion on the mailing list. >> >> I think it would be nicer if we could use negative values for

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-13 Thread Pierre-Eric Pelloux-Prayer
Hi, Le 13/06/2025 à 01:48, Danilo Krummrich a écrit : On Thu, Jun 12, 2025 at 09:00:34AM +0200, Christian König wrote: On 6/11/25 17:11, Danilo Krummrich wrote: Mhm, reiterating our internal discussion on the mailing list. I think it would be nicer if we could use negative values for the ke

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-12 Thread Danilo Krummrich
On Thu, Jun 12, 2025 at 09:00:34AM +0200, Christian König wrote: > On 6/11/25 17:11, Danilo Krummrich wrote: > Mhm, reiterating our internal discussion on the mailing list. > > I think it would be nicer if we could use negative values for the kernel > submissions and positive f

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-12 Thread Christian König
On 6/11/25 17:11, Danilo Krummrich wrote: Mhm, reiterating our internal discussion on the mailing list. I think it would be nicer if we could use negative values for the kernel submissions and positive for userspace. But as discussed internally we would need to adjust the

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-11 Thread Danilo Krummrich
On Wed, Jun 11, 2025 at 04:57:50PM +0200, Christian König wrote: > On 6/11/25 16:25, Danilo Krummrich wrote: > > (Cc: dri-devel) > > > > On Tue, Jun 10, 2025 at 03:05:34PM +0200, Christian König wrote: > >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h > >>> b/drivers/gpu/drm/amd/amdgpu/a

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-11 Thread Christian König
On 6/11/25 16:25, Danilo Krummrich wrote: > (Cc: dri-devel) > > On Tue, Jun 10, 2025 at 03:05:34PM +0200, Christian König wrote: >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h >>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h >>> index 5a8bc634..6108a6f9dba7 100644 >>> --- a/drivers/gpu

Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id

2025-06-11 Thread Danilo Krummrich
(Cc: dri-devel) On Tue, Jun 10, 2025 at 03:05:34PM +0200, Christian König wrote: > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h > > index 5a8bc634..6108a6f9dba7 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h > > +++ b/drivers/g