Hi Dmitry, > Subject: Re: [PATCH v8 2/3] drm/virtio: Add support for saving and restoring > virtio_gpu_objects > > On 5/19/26 03:23, Kim, Dongwon wrote: > >> Can virtio_gpu_remove_from_restore_list() be moved to > >> virtio_gpu_cmd_unref_resource()? > > Yes, technically it can be done and we can remove some redundancy but > > don't you think adding it or removing it from the list would be better > > to be handled outside of vq functions (virtgpu_vq.c) where actual > > communication messages are processed? > > cmd_unref() indeed isn't a good fit > > Could you please check if list node can now be removed from > virtio_gpu_cleanup_object()? IIRC, there was a problem with that in older > patch > versions.
Yes, you are talking about patch v7 where removal of the node was done in virtio_gpu_cleanup_object(). You actually mentioned this at that time, " Also, looks wrong to delete object's node from the list by the virtio_gpu_cleanup_object() that is invoked from cmd-completion callback. You calling virtio_gpu_object_unref_all() that walks up obj_restore_list while obj already may be in process of async unref'ing?" Your concern was valid so I moved node removal right before cmd unref call in v8 (the latest so far). Thanks, DW > > -- > Best regards, > Dmitry
