Re: [PATCH v17 07/10] virtio-fs: honour isolcpus=managed_irq in queue mapping

From: Hannes Reinecke

Date: Thu Dec 03 2026 - 02:43:51 EST


On 11/29/26 8:26 AM, Aaron Tomlin wrote:
Since commit df28040c7f24 ("virtio_fs: store actual queue index in
mq_map"), fs->mq_map is zero-initialised to 0 (VQ_HIPRIO, the
forget-only virtqueue) while virtio_fs_map_queues() populates entries
only for CPUs in get_vq_affinity(). When isolcpus=managed_irq restricts
managed interrupt affinity to housekeeping CPUs, isolated CPUs remain at
VQ_HIPRIO; requests submitted from them are treated as forget objects by
virtio_fs_hiprio_done_work() and freed via kfree() without calling
fuse_request_end(), corrupting slab state and hanging the caller.

Cap fs->num_request_queues to the HK_TYPE_MANAGED_IRQ housekeeping CPU
count when enabled (or num_possible_cpus() otherwise), use
group_mask_cpus_evenly() in the software fallback path, and spread any
unmapped possible CPUs across active request queues so every possible
CPU maps to a valid VQ_REQUEST queue.

Signed-off-by: Aaron Tomlin <atomlin@xxxxxxxxxxx>
---
fs/fuse/virtio_fs.c | 98 ++++++++++++++++++++++++++++++++++-----------
1 file changed, 75 insertions(+), 23 deletions(-)

Reviewed-by: Hannes Reinecke <hare@xxxxxxxxxx>

Cheers,

Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@xxxxxxx +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich