qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hawkins Jiawei <yin31149@gmail.com>
To: eperezma@redhat.com, jasowang@redhat.com
Cc: yin31149@gmail.com, 18801353760@163.com, qemu-devel@nongnu.org
Subject: [PATCH v2 0/2] Send all the SVQ control commands in parallel
Date: Sat,  6 May 2023 22:06:11 +0800	[thread overview]
Message-ID: <cover.1683371965.git.yin31149@gmail.com> (raw)

This patchset allows QEMU to poll and check the device used buffer
after sending all SVQ control commands, instead of polling and checking
immediately after sending each SVQ control command, so that QEMU can
send all the SVQ control commands in parallel, which have better
performance improvement.

I use vdpa_sim_net to simulate vdpa device, refactor
vhost_vdpa_net_load() to call vhost_vdpa_net_load_mac() 30 times,
to build a test environment for sending multiple SVQ control commands.
The monotonic time to finish vhost_vdpa_net_load() is as follows:

    QEMU                            microseconds
--------------------------------------------------
not patched                              85.092
--------------------------------------------------
patched                                  79.222

So this is a save of (85.092 - 79.222)/30 = 0.2 ms per command.

This patchset resolves the GitLab issue at
https://gitlab.com/qemu-project/qemu/-/issues/1578.

v2:
  - recover accidentally deleted rows
  - remove extra newline
  - refactor `need_poll_len` to `cmds_in_flight`
  - return -EINVAL when vhost_svq_poll() return 0 or check
on buffers written by device fails
  - change the type of `in_cursor`, and refactor the
code for updating cursor
  - return directly when vhost_vdpa_net_load_{mac,mq}()
returns a failure in vhost_vdpa_net_load()

v1: https://lists.nongnu.org/archive/html/qemu-devel/2023-04/msg02668.html

Hawkins Jiawei (2):
  vdpa: rename vhost_vdpa_net_cvq_add()
  vdpa: send CVQ state load commands in parallel

 net/vhost-vdpa.c | 165 +++++++++++++++++++++++++++++++++++++----------
 1 file changed, 130 insertions(+), 35 deletions(-)

-- 
2.25.1



             reply	other threads:[~2023-05-06 14:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-06 14:06 Hawkins Jiawei [this message]
2023-05-06 14:06 ` [PATCH v2 1/2] vdpa: rename vhost_vdpa_net_cvq_add() Hawkins Jiawei
2023-05-17  4:12   ` Jason Wang
2023-05-17 15:11     ` Hawkins Jiawei
2023-05-06 14:06 ` [PATCH v2 2/2] vdpa: send CVQ state load commands in parallel Hawkins Jiawei
2023-05-17  5:22   ` Jason Wang
2023-05-17  8:21     ` Eugenio Perez Martin
2023-05-17 15:01       ` Hawkins Jiawei
2023-05-18  5:46         ` Jason Wang
2023-05-18  6:00           ` Eugenio Perez Martin
2023-05-18  6:12             ` Jason Wang
2023-05-18  6:54               ` Hawkins Jiawei

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=cover.1683371965.git.yin31149@gmail.com \
    --to=yin31149@gmail.com \
    --cc=18801353760@163.com \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).