Michael S. Tsirkin
2023-Jun-09 15:57 UTC
[PATCH 1/3] virtio-crypto: fixup potential cpu stall when free unused bufs
On Fri, Jun 09, 2023 at 09:18:15PM +0800, Xianting Tian wrote:> From: Xianting Tian <tianxianting.txt at alibaba-inc.com> > > Cpu stall issue may happen if device is configured with multi queues > and large queue depth, so fix it.What does "may happen" imply exactly? was this observed?> Signed-off-by: Xianting Tian <xianting.tian at linux.alibaba.com> > --- > drivers/crypto/virtio/virtio_crypto_core.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers/crypto/virtio/virtio_crypto_core.c > index 1198bd306365..94849fa3bd74 100644 > --- a/drivers/crypto/virtio/virtio_crypto_core.c > +++ b/drivers/crypto/virtio/virtio_crypto_core.c > @@ -480,6 +480,7 @@ static void virtcrypto_free_unused_reqs(struct virtio_crypto *vcrypto) > kfree(vc_req->req_data); > kfree(vc_req->sgs); > } > + cond_resched(); > } > } > > -- > 2.17.1