[PATCH] kthread: add kthread_mod_pending_delayed_work api

2021-02-13 Thread Yiwei Zhang
after the timeout delayed work gets scheduled, because the clean up work may not be safe to run twice. Signed-off-by: Yiwei Zhang --- include/linux/kthread.h | 3 +++ kernel/kthread.c| 48 + 2 files changed, 51 insertions(+) diff --git a/include

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

2021-01-21 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-21 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-18 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-18 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