Re: [RFC PATCH] KVM: Introduce KVM VIRTIO device

2023-12-18 Thread Yiwei Zhang
> +Yiwei > > On Fri, Dec 15, 2023, Kevin Tian wrote: > > > From: Zhao, Yan Y > > > Sent: Thursday, December 14, 2023 6:35 PM > > > > > > - For host non-MMIO pages, > > > * virtio guest frontend and host backend driver should be synced to use > > > the same memory type to map a buffer.

[PATCH v4] drm/virtio: Track total GPU memory for virtio driver

2021-01-22 Thread Yiwei Zhang
accurate to do this in device driver layer to best match when the underlying resource gets allocated and destroyed during tracing. Signed-off-by: Yiwei Zhang --- drivers/gpu/drm/virtio/Kconfig | 1 + drivers/gpu/drm/virtio/virtgpu_drv.h| 2 ++ drivers/gpu/drm/virtio/virtgpu_object.c | 11

[PATCH v3] drm/virtio: trace total gem bo for virtio

2021-01-22 Thread Yiwei Zhang
From: Yiwei Zhang On the success of virtio_gpu_object_create, add size of newly allocated bo to the tracked total_mem. In drm_gem_object_funcs.free, after the gem bo lost its last refcount, subtract the bo size from the tracked total_mem if the original underlying memory allocation is successful

[PATCH v2] drm/virtio: Track total GPU memory for virtio driver

2021-01-19 Thread Yiwei Zhang
-by: Yiwei Zhang --- drivers/gpu/drm/virtio/Kconfig | 1 + drivers/gpu/drm/virtio/virtgpu_drv.h| 4 drivers/gpu/drm/virtio/virtgpu_object.c | 19 +++ 3 files changed, 24 insertions(+) diff --git a/drivers/gpu/drm/virtio/Kconfig b/drivers/gpu/drm/virtio/Kconfig index

[PATCH] Track total GPU memory for virtio driver

2021-01-19 Thread Yiwei Zhang
-by: Yiwei Zhang --- drivers/gpu/drm/virtio/Kconfig | 1 + drivers/gpu/drm/virtio/virtgpu_drv.h| 4 drivers/gpu/drm/virtio/virtgpu_object.c | 19 +++ 3 files changed, 24 insertions(+) diff --git a/drivers/gpu/drm/virtio/Kconfig b/drivers/gpu/drm/virtio/Kconfig index

Re: Proposal to report GPU private memory allocations with sysfs nodes [plain text version]

2019-12-14 Thread Yiwei Zhang
ook forward to better ideas as well! Best regards, Yiwei On Thu, Nov 14, 2019 at 5:02 PM Yiwei Zhang wrote: > > Thanks for all the comments and feedback, and they are all so valuable to me. > > Let me summarize the main concerns so far here: > (1) Open source driver never

Re: Proposal to report GPU private memory allocations with sysfs nodes [plain text version]

2019-11-15 Thread Yiwei Zhang
for {total, total_unmapped} counters? or just surface through /proc/meminfo? Many thanks for the feedback! Yiwei On Tue, Nov 12, 2019 at 12:18 PM Jerome Glisse wrote: > > On Tue, Nov 12, 2019 at 10:17:10AM -0800, Yiwei Zhang wrote: > > Hi folks, > > > > What do you think a

Re: Proposal to report GPU private memory allocations with sysfs nodes [plain text version]

2019-11-12 Thread Yiwei Zhang
and the KMD will only consume the corresponding > ones so that the sysfs nodes won't change at all? Report zero if > there's no allocation or re-use under a particular "label". Best, Yiwei On Wed, Nov 6, 2019 at 11:21 AM Yiwei Zhang wrote: > > For the sysfs approach,

Re: Proposal to report GPU private memory allocations with sysfs nodes [plain text version]

2019-11-06 Thread Yiwei Zhang
ives under "/sys/devices//gpu_mem/". How difficult it is to define such procfs node structure? Just curious. Thanks for all the comments and replies! Best regards, Yiwei On Wed, Nov 6, 2019 at 8:55 AM Rob Clark wrote: > > On Tue, Nov 5, 2019 at 1:47 AM Daniel Vetter wrote: > > > &g

Re: Proposal to report GPU private memory allocations with sysfs nodes [plain text version]

2019-11-05 Thread Yiwei Zhang
Hi Daniel, > - The labels are currently free-form, baking them back into your structure > would mean we'd need to do lots of hot add/remove of sysfs directory > trees. Which sounds like a real bad idea :-/ Given the free form of that ioctl, what's the plan of using that and the reporting of the

Re: Proposal to report GPU private memory allocations with sysfs nodes [plain text version]

2019-11-04 Thread Yiwei Zhang
ork.kernel.org/cover/11120371/ > > > > (I still need to reply some of the feedback.) > > > > Regards, > > Kenny > > > > On Thu, Oct 31, 2019 at 12:59 PM Yiwei Zhang wrote: > > > > > > Hi Kenny, > > > > > > Thanks for the info. Do yo

Re: Proposal to report GPU private memory allocations with sysfs nodes [plain text version]

2019-11-01 Thread Yiwei Zhang
There are no consensus on it at this point. > > (sorry for being late to the discussion. I only noticed this thread > when one of the email got lucky and escape the spam folder.) > > Regards, > Kenny > > On Wed, Oct 30, 2019 at 4:14 AM Yiwei Zhang wrote: > > > > Hi Jerome and a

Re: Proposal to report GPU private memory allocations with sysfs nodes [plain text version]

2019-10-31 Thread Yiwei Zhang
we'd like precise total GPU private memory per process. We'll check if there're other options as well. Thanks for pointing this out! On Wed, Oct 30, 2019 at 2:03 PM Yiwei Zhang wrote: > > Hi folks, > > Didn't realize gmail has a plain text mode ; ) > > > In my opinion trackin

Re: Proposal to report GPU private memory allocations with sysfs nodes [plain text version]

2019-10-31 Thread Yiwei Zhang
Hi folks, Didn't realize gmail has a plain text mode ; ) > In my opinion tracking per process is good, but you cannot sidestep the > question of tracking performance by saying that there is only few > processes using the GPU. Agreed, I shouldn't make that statement. Thanks for the info as well!

Proposal to report GPU private memory allocations with sysfs nodes [plain text version]

2019-10-28 Thread Yiwei Zhang
Hi folks, This is the plain text version of the previous email in case that was considered as spam. --- Background --- On the downstream Android, vendors used to report GPU private memory allocations with debugfs nodes in their own formats. However, debugfs nodes are getting deprecated in the

Proposal to report GPU private memory allocations with sysfs nodes

2019-10-24 Thread Yiwei Zhang
Hi folks, This is Yiwei from the Android Platform Graphics team. On the downstream Android, vendors used to report GPU private memory allocations with debugfs nodes in their own formats. However, debugfs nodes are getting deprecated in the next Android release, so we are taking the chance to