Re: [PATCH] vhost: fix IOTLB locking

2018-11-30 Thread Jean-Philippe Brucker
On 30/11/2018 13:32, Michael S. Tsirkin wrote: > On Fri, Nov 30, 2018 at 11:37:02AM +, Jean-Philippe Brucker wrote: >> Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq >> lock to improve scalability, but introduced a possible deadlock in >> vhost-iotlb. vhost_iotlb_notif

Re: [PATCH] vhost: fix IOTLB locking

2018-11-30 Thread Michael S. Tsirkin
On Fri, Nov 30, 2018 at 11:37:02AM +, Jean-Philippe Brucker wrote: > Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq > lock to improve scalability, but introduced a possible deadlock in > vhost-iotlb. vhost_iotlb_notify_vq() now takes vq->mutex while holding > the devic

Re: [PATCH] vhost: fix IOTLB locking

2018-11-30 Thread Jason Wang
On 2018/11/30 下午7:37, Jean-Philippe Brucker wrote: Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq lock to improve scalability, but introduced a possible deadlock in vhost-iotlb. vhost_iotlb_notify_vq() now takes vq->mutex while holding the device's IOTLB spinlock. And

[PATCH] vhost: fix IOTLB locking

2018-11-30 Thread Jean-Philippe Brucker
Commit 78139c94dc8c ("net: vhost: lock the vqs one by one") moved the vq lock to improve scalability, but introduced a possible deadlock in vhost-iotlb. vhost_iotlb_notify_vq() now takes vq->mutex while holding the device's IOTLB spinlock. And on the vhost_iotlb_miss() path, the spinlock is taken w