public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/11] VDUSE: Improve performance
@ 2023-03-23  5:30 Xie Yongji
  2023-03-23  5:30 ` [PATCH v4 01/11] lib/group_cpus: Export group_cpus_evenly() Xie Yongji
                   ` (10 more replies)
  0 siblings, 11 replies; 26+ messages in thread
From: Xie Yongji @ 2023-03-23  5:30 UTC (permalink / raw)
  To: mst, jasowang, tglx, hch; +Cc: virtualization, linux-kernel

Hi all,

This series introduces some ways to improve VDUSE performance.

Patch 1 ~ 6 bring 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, with those patches, we could get ~50% improvement (600k
iops -> 900k iops) when using per-cpu virtqueue.

Patch 7 adds a sysfs interface for each vduse virtqueue to change
the affinity for IRQ callback. It would be helpful for performance
tuning when the affinity mask contains more than one CPU.

Patch 8 ~ 9 associate an eventfd to the vdpa callback so that
we can signal it directly during irq injection without scheduling
an additional workqueue thread to do that.

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!

V3 to V4:
- Remove set_irq_affinity callback [Jason]
- Move the logic of interrupt affinity spreading mechanism from
  vduse module to virtio-vdpa module and unify set_vq_affinity
  callback to pass the affinity to vduse device [Jason]
- Rename the eventfd variable of the vdpa callback and add more
  comments for it [Jason]
- Fix compile warnings

V2 to V3:
- Rebased to newest kernel tree
- Export group_cpus_evenly() instead of irq_create_affinity_masks() [MST]
- Remove the sysfs for workqueue control [Jason]
- Associate an eventfd to the vdpa callback [Jason]
- Signal the eventfd directly in vhost-vdpa case [Jason]
- Use round-robin to spread IRQs between CPUs in the affinity mask [Jason]
- Handle the cpu hotplug case on IRQ injection [Jason]
- Remove effective IRQ affinity and balance mechanism for IRQ allocation

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):
  lib/group_cpus: Export group_cpus_evenly()
  vdpa: Add set/get_vq_affinity callbacks in vdpa_config_ops
  virtio-vdpa: Support interrupt affinity spreading mechanism
  vduse: Refactor allocation for vduse virtqueues
  vduse: Support set_vq_affinity callback
  vduse: Support get_vq_affinity callback
  vduse: Add sysfs interface for irq callback affinity
  vdpa: Add eventfd for the vdpa callback
  vduse: Signal vq trigger eventfd directly if possible
  vduse: Delay iova domain creation
  vduse: Support specifying bounce buffer size via sysfs

 drivers/vdpa/vdpa_user/vduse_dev.c | 414 ++++++++++++++++++++++++-----
 drivers/vhost/vdpa.c               |   2 +
 drivers/virtio/virtio_vdpa.c       |  97 +++++++
 include/linux/vdpa.h               |  19 ++
 lib/group_cpus.c                   |   1 +
 5 files changed, 470 insertions(+), 63 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2023-04-04 18:21 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23  5:30 [PATCH v4 00/11] VDUSE: Improve performance Xie Yongji
2023-03-23  5:30 ` [PATCH v4 01/11] lib/group_cpus: Export group_cpus_evenly() Xie Yongji
2023-04-04 18:20   ` Michael S. Tsirkin
2023-03-23  5:30 ` [PATCH v4 02/11] vdpa: Add set/get_vq_affinity callbacks in vdpa_config_ops Xie Yongji
2023-03-23  5:30 ` [PATCH v4 03/11] virtio-vdpa: Support interrupt affinity spreading mechanism Xie Yongji
2023-03-24  6:27   ` Jason Wang
2023-03-24  9:12     ` Michael S. Tsirkin
2023-03-28  6:12       ` Jason Wang
2023-03-28  3:03     ` Yongji Xie
2023-03-28  3:14       ` Jason Wang
2023-03-28  3:33         ` Yongji Xie
2023-03-28  3:44           ` Jason Wang
2023-03-28  4:04             ` Yongji Xie
2023-03-28  6:07               ` Jason Wang
2023-03-23  5:30 ` [PATCH v4 04/11] vduse: Refactor allocation for vduse virtqueues Xie Yongji
2023-03-23  5:30 ` [PATCH v4 05/11] vduse: Support set_vq_affinity callback Xie Yongji
2023-03-28  6:14   ` Jason Wang
2023-03-23  5:30 ` [PATCH v4 06/11] vduse: Support get_vq_affinity callback Xie Yongji
2023-03-28  6:15   ` Jason Wang
2023-03-23  5:30 ` [PATCH v4 07/11] vduse: Add sysfs interface for irq callback affinity Xie Yongji
2023-03-28  6:16   ` Jason Wang
2023-03-23  5:30 ` [PATCH v4 08/11] vdpa: Add eventfd for the vdpa callback Xie Yongji
2023-03-28  6:17   ` Jason Wang
2023-03-23  5:30 ` [PATCH v4 09/11] vduse: Signal vq trigger eventfd directly if possible Xie Yongji
2023-03-23  5:30 ` [PATCH v4 10/11] vduse: Delay iova domain creation Xie Yongji
2023-03-23  5:30 ` [PATCH v4 11/11] vduse: Support specifying bounce buffer size via sysfs Xie Yongji

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox