Block/testing patches
[Qemu-devel] [PULL 1/2] block/nvme: optimize the performance of nvme driver based on vfio-pci
In reply to Fam ZhengFrom: Li Feng <[email protected]>
When the IO size is larger than 2 pages, we move the the pointer one by one in the pagelist, this is inefficient.
This is a simple benchmark result:
Before:
$ qemu-io -c 'write 0 1G' nvme://0000:00:04.0/1
wrote 1073741824/1073741824 bytes at offset 0
1 GiB, 1 ops; 0:00:02.41 (424.504 MiB/sec and 0.4146 ops/sec)
$ qemu-io -c 'read 0 1G' nvme://0000:00:04.0/1
read 1073741824/1073741824 bytes at offset 0
1 GiB, 1 ops; 0:00:02.03 (503.055 MiB/sec and 0.4913 ops/sec)
After:
$ qemu-io -c 'write 0 1G' nvme://0000:00:04.0/1
wrote 1073741824/1073741824 bytes at offset 0
1 GiB, 1 ops; 0:00:02.17 (471.517 MiB/sec and 0.4605 ops/sec)
$ qemu-io -c 'read 0 1G' nvme://0000:00:04.0/1
read 1073741824/1073741824 bytes at offset 0
1 GiB, 1 ops; 0:00:01.94 (526.770 MiB/sec and 0.5144 ops/sec)
Message-Id: <[email protected]>
--- block/nvme.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
block/nvme.c +6 -10
@@ -837,7 +837,7 @@ try_map: }for (j =0 ; j < qiov->iov[i].iov_len / s->page_size; j++) { - pagelist[entries++] = iova + j * s->page_size; + pagelist[entries++] =cpu_to_le64 (iova + j * s->page_size); }trace_nvme_cmd_map_qiov_iov (s, i, qiov->iov[i].iov_base, qiov->iov[i].iov_len / s->page_size);
@@ -850,20 +850,16 @@ try_map:case 0 :abort ();case 1 : - cmd->prp1 =cpu_to_le64 (pagelist[0 ]); + cmd->prp1 = pagelist[0 ]; cmd->prp2 =0 ;break ;case 2 : - cmd->prp1 =cpu_to_le64 (pagelist[0 ]); - cmd->prp2 =cpu_to_le64 (pagelist[1 ]);; + cmd->prp1 = pagelist[0 ]; + cmd->prp2 = pagelist[1 ];break ;default : - cmd->prp1 =cpu_to_le64 (pagelist[0 ]); - cmd->prp2 =cpu_to_le64 (req->prp_list_iova); -for (i =0 ; i < entries -1 ; ++i) { - pagelist[i] =cpu_to_le64 (pagelist[i +1 ]); - } - pagelist[entries -1 ] =0 ; + cmd->prp1 = pagelist[0 ]; + cmd->prp2 =cpu_to_le64 (req->prp_list_iova +sizeof (uint64_t ));break ; }trace_nvme_cmd_map_qiov (s, cmd, req, qiov, entries);
Signature · 1 line
2.11.0
The following changes since commit 147923b1a901a0370f83a0f4c58ec1baffef22f0:
Merge remote-tracking branch 'remotes/kraxel/tags/usb-20190108-pull-request' into staging (2019-01-08 16:07:32 +0000)
are available in the git repository at:
https://github.com/famz/qemu.git tags/staging-pull-request
for you to fetch changes up to 4ce58d861bf740bb893bd28b974675ad3d9f98b5:
docker: Use a stable snapshot for Debian Sid (2019-01-09 09:38:34 +0800)
----------------------------------------------------------------
Block/testing patches
v2: Fix URL.
Drop BSD patch.
----------------------------------------------------------------
Li Feng (1):
block/nvme: optimize the performance of nvme driver based on vfio-pci
Philippe Mathieu-Daudé (1):
docker: Use a stable snapshot for Debian Sid
block/nvme.c | 16 ++++++---------- tests/docker/dockerfiles/debian-sid.docker | 4 ++++ 2 files changed, 10 insertions(+), 10 deletions(-)
Signature · 1 line
2.11.0
[Qemu-devel] [PULL 2/2] docker: Use a stable snapshot for Debian Sid
From: Philippe Mathieu-Daudé <[email protected]>
The Debian Sid repository is not garanteed to be stable, as his 'unstable' name suggest :)
To allow quick testing, Debian maintainers might push packages various time a day. Sometime package dependencies might break, which is annoying when using this repository for stable development (which is not recommended, but Sid provides edge packages we use for testing).
Debian provides repositories snapshots which are suitable for our use. Pick a recent date that works. When required, update to newer releases will be easy.
This fixes current issues with this image:
$ make docker-image-debian-sid
[...]
The following packages have unmet dependencies:
build-essential : Depends: dpkg-dev (>= 1.17.11) but it is not going to be installed
git : Depends: perl but it is not going to be installed
Depends: liberror-perl but it is not going to be installed
pkg-config : Depends: libdpkg-perl but it is not going to be installed
texinfo : Depends: perl (>= 5.26.2-6) but it is not going to be installed
Depends: libtext-unidecode-perl but it is not going to be installed
Depends: libxml-libxml-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.Message-Id: <[email protected]>
--- tests/docker/dockerfiles/debian-sid.docker | 4 ++++ 1 file changed, 4 insertions(+)
tests/docker/dockerfiles/debian-sid.docker +4 -0
@@ -13,6 +13,10 @@ FROM debian:sid-slim +# Use a snapshot known to work (see http://snapshot.debian.org/#Usage) +ENV DEBIAN_SNAPSHOT_DATE "20181030" +RUN sed -i "s%^deb \(https\?://\)deb.debian.org/debian/\? \(.*\)%deb [check-valid-until=no] \1snapshot.debian.org/archive/debian/${DEBIAN_SNAPSHOT_DATE} \2%" /etc/apt/sources.list + # Duplicate deb line as deb-src RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
Signature · 1 line
2.11.0
Peter Maydell
AppliedQuoted 19 lines · Fam Zheng
The following changes since commit
147923b1a901a0370f83a0f4c58ec1baffef22f0:Merge remote-tracking branch 'remotes/kraxel/tags/usb-20190108-pull-request' into staging (2019-01-08 16:07:32 +0000)
are available in the git repository at:
https://github.com/famz/qemu.git tags/staging-pull-request
for you to fetch changes up to
4ce58d861bf740bb893bd28b974675ad3d9f98b5:docker: Use a stable snapshot for Debian Sid (2019-01-09 09:38:34 +0800)
----------------------------------------------------------------
Block/testing patchesv2: Fix URL.
Drop BSD patch.
Quoted 7 lines
----------------------------------------------------------------
Li Feng (1):
block/nvme: optimize the performance of nvme driver based on vfio-pciPhilippe Mathieu-Daudé (1):
docker: Use a stable snapshot for Debian Sid
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.
-- PMM