Re: [PATCH v2 7/7] drm/virtio: implement userptr: add interval tree

2025-04-05 Thread Dmitry Osipenko
On 3/30/25 14:57, Dmitry Osipenko wrote: >> +userptr = virtio_gpu_userptr_from_addr_range( >> +vfpriv, params->userptr, params->userptr + params->size - 1UL); > Is it possible that userptr address will be same for two different > processes? See now the vfpriv->userptrs_tree, i.e. i

Re: [PATCH v2 7/7] drm/virtio: implement userptr: add interval tree

2025-04-03 Thread Dmitry Osipenko
On 4/3/25 06:28, Huang, Honglei1 wrote: > > Hi Dmitry: > > Really sorry for missed this comment. Yes it can be done in UMD, > actually the interval tree is used with the MMU notifier normally, > it is for preventing create same MMU notifier for overlapped areas. > Cause this version patch set doe

Re: [PATCH v2 7/7] drm/virtio: implement userptr: add interval tree

2025-04-02 Thread Huang, Honglei1
Hi Dmitry: Really sorry for missed this comment. Yes it can be done in UMD, actually the interval tree is used with the MMU notifier normally, it is for preventing create same MMU notifier for overlapped areas. Cause this version patch set doesn't have MMU notifier, removing interval tree is

Re: [PATCH v2 7/7] drm/virtio: implement userptr: add interval tree

2025-04-02 Thread Demi Marie Obenour
On 4/2/25 8:34 AM, Dmitry Osipenko wrote: > On 4/2/25 04:53, Huang, Honglei1 wrote: >> >> On 2025/3/30 19:57, Dmitry Osipenko wrote: >>> If the purpose of this feature is to dedup usrptr BOs of a the single >>> process/application, can this can be done in userspace? > > I assume it can be done in

Re: [PATCH v2 7/7] drm/virtio: implement userptr: add interval tree

2025-04-02 Thread Dmitry Osipenko
On 4/2/25 04:53, Huang, Honglei1 wrote: > > On 2025/3/30 19:57, Dmitry Osipenko wrote: >> If the purpose of this feature is to dedup usrptr BOs of a the single >> process/application, can this can be done in userspace? I assume it can be done in userspace, don't see why it needs to be in kernel.

Re: [PATCH v2 7/7] drm/virtio: implement userptr: add interval tree

2025-04-01 Thread Huang, Honglei1
On 2025/3/30 19:57, Dmitry Osipenko wrote: If the purpose of this feature is to dedup usrptr BOs of a the single process/application, can this can be done in userspace? On 3/21/25 11:00, Honglei Huang wrote: int virtio_gpu_userptr_create(struct virtio_gpu_device *vgdev,

Re: [PATCH v2 7/7] drm/virtio: implement userptr: add interval tree

2025-03-30 Thread Dmitry Osipenko
If the purpose of this feature is to dedup usrptr BOs of a the single process/application, can this can be done in userspace? On 3/21/25 11:00, Honglei Huang wrote: > int virtio_gpu_userptr_create(struct virtio_gpu_device *vgdev, > struct drm_file *file, >