On 2/23/23 10:35, Han Ding wrote: > > When use ovs-vsctl to delete vhostuserclient port while qemu destroy virtio, > there is a deadlock between OVS main thread and the vhost-events thread. > > openvswitch is 2.14 and dpdk is 20.11
FWIW, 2.14 supposed to be used with 19.11. > > Main thread: > ofport_remove > -> netdev_unref > -> netdev_dpdk_vhost_destruct > -> rte_vhost_driver_unregister (If fdentry is busy, circle again > until the fdentry is not busy) > -> fdset_try_del (fdentry is busy now, return -1. Goto again) > > vhost-nets thread: > > fdset_event_dispatch (set fdentry to busy. When destroy_device fuction return > set the fdentry to no busy) > > -> vhost_user_read_cb > > -> vhost_user_msg_handler > > -> vhost_user_get_vring_base > > ->destroy_device > > -> ovsrcu_synchronize (Wait for other threads to quiesce) > > > The vhost-nets thread wait for main thread to quiesce, but the main thread > now is waiting for fdentry to no busy > > and circle all the time. > > > Whether the ovsrcu_synchronize is necessary in destrory_device Yes, we have to wait for all threads to stop using this device. > or the rte_vhost_driver_unregister is correct in fdset_try_del ? CC: David and Maxime. Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
