virtio_bt: call scheduler when we free unused buffs
authorXianting Tian <xianting.tian@linux.alibaba.com>
Fri, 9 Jun 2023 13:18:17 +0000 (21:18 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 3 Jul 2023 16:15:12 +0000 (12:15 -0400)
For virtio-net we were getting CPU stall warnings, and fixed it by
calling the scheduler: see f8bb51043945 ("virtio_net: suppress cpu stall
when free_unused_bufs").

This driver is similar so theoretically the same logic applies.

Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
Message-Id: <20230609131817.712867-4-xianting.tian@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/bluetooth/virtio_bt.c

index c570c45..2ac70b5 100644 (file)
@@ -79,6 +79,7 @@ static int virtbt_close_vdev(struct virtio_bluetooth *vbt)
 
                while ((skb = virtqueue_detach_unused_buf(vq)))
                        kfree_skb(skb);
+               cond_resched();
        }
 
        return 0;