virtio-fs: limit number of request queues
authorPeter-Jan Gootzen <pgootzen@nvidia.com>
Wed, 1 May 2024 15:38:16 +0000 (17:38 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 10 May 2024 11:38:14 +0000 (13:38 +0200)
commit103c2de111bf32f7c36a0ce8f638b114a37e0b76
tree851640b5dc84c00d407f1d26ba0b587dd3a575ad
parent246014876d782bbf2e652267482cd2e799fb5fcd
virtio-fs: limit number of request queues

Virtio-fs devices might allocate significant resources to virtio queues
such as CPU cores that busy poll on the queue. The device indicates how
many request queues it can support and the driver should initialize the
number of queues that they want to utilize.

In this patch we limit the number of initialized request queues to the
number of CPUs, to limit the resource consumption on the device-side
and to prepare for the upcoming multi-queue patch.

Signed-off-by: Peter-Jan Gootzen <pgootzen@nvidia.com>
Signed-off-by: Yoray Zack <yorayz@nvidia.com>
Suggested-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/virtio_fs.c