From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xie Yongji <xieyongji@bytedance.com>
Cc: linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org, tglx@linutronix.de,
hch@lst.de
Subject: Re: [PATCH v3 00/11] VDUSE: Improve performance
Date: Fri, 10 Mar 2023 03:49:56 -0500 [thread overview]
Message-ID: <20230310034934-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20230228094110.37-1-xieyongji@bytedance.com>
On Tue, Feb 28, 2023 at 05:40:59PM +0800, Xie Yongji wrote:
> Hi all,
>
> This series introduces some ways to improve VDUSE performance.
Pls fix warnings reported by 0-day infra, dropping this for now.
> 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!
>
> 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
> vdpa: Add set_irq_affinity callback in vdpa_config_ops
> vduse: Refactor allocation for vduse virtqueues
> vduse: Support automatic irq callback affinity
> vduse: Support set/get_vq_affinity callbacks
> vduse: Add sysfs interface for irq callback affinity
> vdpa: Add eventfd for the vdpa callback
> vduse: Signal interrupt's eventfd directly in vhost-vdpa case
> vduse: Delay iova domain creation
> vduse: Support specifying bounce buffer size via sysfs
>
> drivers/vdpa/vdpa_user/vduse_dev.c | 490 +++++++++++++++++++++++++----
> drivers/vhost/vdpa.c | 2 +
> drivers/virtio/virtio_vdpa.c | 33 ++
> include/linux/vdpa.h | 25 ++
> lib/group_cpus.c | 1 +
> 5 files changed, 488 insertions(+), 63 deletions(-)
>
> --
> 2.20.1
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xie Yongji <xieyongji@bytedance.com>
Cc: jasowang@redhat.com, tglx@linutronix.de, hch@lst.de,
virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 00/11] VDUSE: Improve performance
Date: Fri, 10 Mar 2023 03:49:56 -0500 [thread overview]
Message-ID: <20230310034934-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20230228094110.37-1-xieyongji@bytedance.com>
On Tue, Feb 28, 2023 at 05:40:59PM +0800, Xie Yongji wrote:
> Hi all,
>
> This series introduces some ways to improve VDUSE performance.
Pls fix warnings reported by 0-day infra, dropping this for now.
> 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!
>
> 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
> vdpa: Add set_irq_affinity callback in vdpa_config_ops
> vduse: Refactor allocation for vduse virtqueues
> vduse: Support automatic irq callback affinity
> vduse: Support set/get_vq_affinity callbacks
> vduse: Add sysfs interface for irq callback affinity
> vdpa: Add eventfd for the vdpa callback
> vduse: Signal interrupt's eventfd directly in vhost-vdpa case
> vduse: Delay iova domain creation
> vduse: Support specifying bounce buffer size via sysfs
>
> drivers/vdpa/vdpa_user/vduse_dev.c | 490 +++++++++++++++++++++++++----
> drivers/vhost/vdpa.c | 2 +
> drivers/virtio/virtio_vdpa.c | 33 ++
> include/linux/vdpa.h | 25 ++
> lib/group_cpus.c | 1 +
> 5 files changed, 488 insertions(+), 63 deletions(-)
>
> --
> 2.20.1
next prev parent reply other threads:[~2023-03-10 8:50 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-28 9:40 [PATCH v3 00/11] VDUSE: Improve performance Xie Yongji
2023-02-28 9:41 ` [PATCH v3 01/11] lib/group_cpus: Export group_cpus_evenly() Xie Yongji
2023-03-10 8:51 ` Michael S. Tsirkin
2023-03-10 8:51 ` Michael S. Tsirkin
2023-03-16 9:31 ` Jason Wang
2023-03-16 9:31 ` Jason Wang
2023-02-28 9:41 ` [PATCH v3 02/11] vdpa: Add set/get_vq_affinity callbacks in vdpa_config_ops Xie Yongji
2023-03-16 3:27 ` Jason Wang
2023-03-16 3:27 ` Jason Wang
2023-03-17 7:10 ` Yongji Xie
2023-02-28 9:41 ` [PATCH v3 03/11] vdpa: Add set_irq_affinity callback " Xie Yongji
2023-03-16 4:02 ` Jason Wang
2023-03-16 4:02 ` Jason Wang
2023-03-17 7:44 ` Yongji Xie
2023-03-20 9:31 ` Jason Wang
2023-03-20 9:31 ` Jason Wang
2023-03-20 11:17 ` Yongji Xie
2023-02-28 9:41 ` [PATCH v3 04/11] vduse: Refactor allocation for vduse virtqueues Xie Yongji
2023-02-28 9:41 ` [PATCH v3 05/11] vduse: Support automatic irq callback affinity Xie Yongji
2023-02-28 11:12 ` kernel test robot
2023-02-28 11:12 ` kernel test robot
2023-03-01 1:18 ` kernel test robot
2023-03-01 1:18 ` kernel test robot
2023-03-16 9:03 ` Jason Wang
2023-03-16 9:03 ` Jason Wang
2023-03-17 7:04 ` Yongji Xie
2023-02-28 9:41 ` [PATCH v3 06/11] vduse: Support set/get_vq_affinity callbacks Xie Yongji
2023-02-28 9:41 ` [PATCH v3 07/11] vduse: Add sysfs interface for irq callback affinity Xie Yongji
2023-02-28 9:41 ` [PATCH v3 08/11] vdpa: Add eventfd for the vdpa callback Xie Yongji
2023-03-16 9:25 ` Jason Wang
2023-03-16 9:25 ` Jason Wang
2023-03-16 9:40 ` Jason Wang
2023-03-16 9:40 ` Jason Wang
2023-03-17 6:57 ` Yongji Xie
2023-02-28 9:41 ` [PATCH v3 09/11] vduse: Signal interrupt's eventfd directly in vhost-vdpa case Xie Yongji
2023-03-16 9:30 ` Jason Wang
2023-03-16 9:30 ` Jason Wang
2023-03-17 7:01 ` Yongji Xie
2023-02-28 9:41 ` [PATCH v3 10/11] vduse: Delay iova domain creation Xie Yongji
2023-02-28 9:41 ` [PATCH v3 11/11] vduse: Support specifying bounce buffer size via sysfs Xie Yongji
2023-03-10 8:49 ` Michael S. Tsirkin [this message]
2023-03-10 8:49 ` [PATCH v3 00/11] VDUSE: Improve performance Michael S. Tsirkin
2023-03-10 9:41 ` Jason Wang
2023-03-10 9:41 ` Jason Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230310034934-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.linux-foundation.org \
--cc=xieyongji@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.