Messages in this thread | | | From | Xie Yongji <> | Subject | [PATCH v2 00/11] VDUSE: Improve performance | Date | Mon, 5 Dec 2022 16:41:16 +0800 |
| |
Hi all,
This series introduces some ways to improve VDUSE performance.
Patch 1 ~ 7 brings current interrupt affinity spreading mechanism to vduse device and make it possible for the virtio-blk driver to build the blk-mq queues based on it. This would be useful to mitigate the virtqueue lock contention in virtio-blk driver. In our test, we could get ~50% improvement (600k iops -> 900k iops) when using per-cpu virtqueue.
Patch 8 adds a sysfs interface for each vduse virtqueue to show the affinity and effective affinity for IRQ callback. And the effective affinity interface is also writable so that we can do some performance tuning when the affinity mask contains more than one CPU.
Patch 9 adds a sysfs interface for each virtqueues to control whether use workqueue to inject irq or not. The vhost-vdpa case can benefit from it.
Patch 10, 11 add a sysfs interface to support specifying bounce buffer size in virtio-vdpa case. The high throughput workloads can benefit from it. And we can also use it to reduce the memory overhead for small throughput workloads.
Please review, thanks!
V1 to V2: - Export irq_create_affinity_masks() - Add set/get_vq_affinity and set_irq_affinity callbacks in vDPA framework - Add automatic irq callback affinity support in VDUSE driver [Jason] - Add more backgrounds information in commit log [Jason] - Only support changing effective affinity when the value is a subset of the IRQ callback affinity mask.
Xie Yongji (11): genirq/affinity:: Export irq_create_affinity_masks() vdpa: Add set/get_vq_affinity callbacks in vdpa_config_ops vdpa: Add set_irq_affinity callback in vdpa_config_ops vduse: Refactor allocation for vduse virtqueues vduse: Introduce bound workqueue for irq injection vduse: Support automatic irq callback affinity vduse: Support set/get_vq_affinity callbacks vduse: Add sysfs interface for irq callback affinity vduse: Add enable_irq_wq sysfs interface for virtqueues vduse: Delay iova domain creation vduse: Support specifying bounce buffer size via sysfs
drivers/vdpa/vdpa_user/vduse_dev.c | 497 +++++++++++++++++++++++++---- drivers/virtio/virtio_vdpa.c | 32 ++ include/linux/vdpa.h | 21 ++ kernel/irq/affinity.c | 1 + 4 files changed, 488 insertions(+), 63 deletions(-)
-- 2.20.1
| |