Skip to contentSkip to conversation

Block and testing patches

GIT PULL Fam Zheng 3 participants 6 messages Jan 6, 2019 – Jan 7, 2019 Block layer

lore
Share & tools
lore

Fam Zheng

author
#0 lore raw

The following changes since commit 9b2e891ec5ccdb4a7d583b77988848282606fdea:

Merge remote-tracking branch 'remotes/marcel/tags/rdma-pull-request' into staging (2018-12-22 11:25:31 +0000)

are available in the git repository at:

https://[email protected]/famz/qemu tags/block-and-testing-pull-request

for you to fetch changes up to 3baa6942169cce0f58b88484ad010742c382480a:

tests: vm: auto_install OpenBSD (2019-01-02 20:51:15 +0800)

----------------------------------------------------------------
Pull request

----------------------------------------------------------------

Fam Zheng (1):
tests: vm: auto_install OpenBSD

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 ++
 tests/vm/basevm.py                         |  6 +--
 tests/vm/openbsd                           | 85 +++++++++++++++++++++++++-----
 4 files changed, 86 insertions(+), 25 deletions(-)
Signature · 1 line
2.11.0
author
#1 lore raw

[Qemu-devel] [PULL 1/3] block/nvme: optimize the performance of nvme driver based on vfio-pci

From: 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
index 29294038fc..982097b5b1 100644
@@ -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
author
#2 lore raw

[Qemu-devel] [PULL 2/3] docker: Use a stable snapshot for Debian Sid

In reply to Fam Zheng

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
index 9a3d168705..4e4cda0ba5 100644
@@ -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
author
#3 lore raw

[Qemu-devel] [PULL 3/3] tests: vm: auto_install OpenBSD

In reply to Fam Zheng

From: Fam Zheng <[email protected]>

Upgrade OpenBSD to 6.4 using auto_install. Especially, drop SDL1, include SDL2.

Also do the build in $HOME since both /var/tmp and /tmp are tmpfs with limited capacities.

Message-Id: <[email protected]>

---
 tests/vm/basevm.py |  6 ++--
 tests/vm/openbsd   | 85 ++++++++++++++++++++++++++++++++++++++++++++++--------
 2 files changed, 76 insertions(+), 15 deletions(-)
tests/vm/basevm.py +3 -3
index 5caf77d6b8..6fb446d4c5 100755
@@ -68,8 +68,6 @@ class BaseVM(object):
         self._args = [ \
             "-nodefaults", "-m", "4G",
             "-cpu", "max",
-            "-netdev", "user,id=vnet,hostfwd=:127.0.0.1:0-:22",
-            "-device", "virtio-net-pci,netdev=vnet",
             "-vnc", "127.0.0.1:0,to=20",
             "-serial", "file:%s" % os.path.join(self._tmpdir, "serial.out")]
         if vcpus and vcpus > 1:
@@ -146,8 +144,10 @@ class BaseVM(object):
                             "-device",
                             "virtio-blk,drive=%s,serial=%s,bootindex=1" % (name, name)]
 
-    def boot(self, img, extra_args=[]):
+    def boot(self, img, extra_args=[], extra_usernet_args=""):
         args = self._args + [
+            "-netdev", "user,id=vnet,hostfwd=:127.0.0.1:0-:22" + extra_usernet_args,
+            "-device", "virtio-net-pci,netdev=vnet",
             "-device", "VGA",
             "-drive", "file=%s,if=none,id=drive0,cache=writeback" % img,
             "-device", "virtio-blk,drive=drive0,bootindex=0"]
tests/vm/openbsd +73 -12

104 lines not on this page · raw message

Signature · 1 line
2.11.0
#4 lore raw

Re: [Qemu-devel] [PULL 3/3] tests: vm: auto_install OpenBSD

Quoted 1 line · Fam Zheng

+ self.ssh_root("shutdown -p now")

could use halt -p as a more direct/obvious/effective command

#5 lore raw
In reply to Fam Zheng
Quoted 8 lines · Fam Zheng

The following changes since commit 9b2e891ec5ccdb4a7d583b77988848282606fdea:

Merge remote-tracking branch 'remotes/marcel/tags/rdma-pull-request' into staging (2018-12-22 11:25:31 +0000)

are available in the git repository at:

https://[email protected]/famz/qemu tags/block-and-testing-pull-request

I think something in your workflow has put in the wrong URL for your repo here: this looks like the one you use to log in with (ie to push with), not the general one other people pull from the repo with. I manually used the github URL I have on record for you (git://github.com/famz/qemu).

Quoted 3 lines

for you to fetch changes up to 3baa6942169cce0f58b88484ad010742c382480a:

tests: vm: auto_install OpenBSD (2019-01-02 20:51:15 +0800)

This makes my OpenBSD build test fail:

DEBUG:root:QEMU args: -nodefaults -m 4G -cpu max -vnc
127.0.0.1:0,to=20 -serial file:/home/peter.maydell
/qemu-openbsd/build/vm-test-0cyRK6.tmp/serial.out -smp 18 -enable-kvm
-netdev user,id=vnet,hostfwd=:127. 0.0.1:0-:22,tftp=/tmp/tmpXrGR4K,bootfile=/auto_install,tftp-server-name=10.0.2.4,guestfwd=tcp:10.0.2.4:8
0-cmd:cat /tmp/tmpXrGR4K/install.conf -device
virtio-net-pci,netdev=vnet -device VGA -drive file=tests/v
m/openbsd.img.tmp,if=none,id=drive0,cache=writeback -device
virtio-blk,drive=drive0,bootindex=0 -boot on
ce=n -no-reboot -cdrom
/home/peter.maydell/.cache/qemu-vm/download/535472578c58eb79f8b3c168a22fa5bcd2c1e
6d4
DEBUG:QMP:>>> {'execute': 'quit'}
DEBUG:qemu:Error launching VM
DEBUG:qemu:Command: 'qemu-system-x86_64 -chardev
socket,id=mon,path=/var/tmp/tmp2kj6Xg/qemu-35162-monito
r.sock -mon chardev=mon,mode=control -display none -vga none
-nodefaults -m 4G -cpu max -vnc 127.0.0.1:0
,to=20 -serial file:/home/peter.maydell/qemu-openbsd/build/vm-test-0cyRK6.tmp/serial.out
-smp 18 -enable
-kvm -netdev user,id=vnet,hostfwd=:127.0.0.1:0-:22,tftp=/tmp/tmpXrGR4K,bootfile=/auto_install,tftp-serve r-name=10.0.2.4,guestfwd=tcp:10.0.2.4:80-cmd:cat
/tmp/tmpXrGR4K/install.conf -device virtio-net-pci,netd
ev=vnet -device VGA -drive
file=tests/vm/openbsd.img.tmp,if=none,id=drive0,cache=writeback
-device virti
o-blk,drive=drive0,bootindex=0 -boot once=n -no-reboot -cdrom
/home/peter.maydell/.cache/qemu-vm/downloa
d/535472578c58eb79f8b3c168a22fa5bcd2c1e6d4'
DEBUG:qemu:Output: "qemu-system-x86_64: -netdev user,id=vnet,hostfwd=:127.0.0.1:0-:22,tftp=/tmp/tmpXrGR4K,bootfile=/auto_install,tftp-server-name=10.0.2.4,guestfwd=tcp:10.0.2.4:80-cmd:cat /tmp/tmpXrGR4K/install.conf: Invalid parameter 'tftp-server-name'\n"
ERROR:root:Failed to launch QEMU, command line:
ERROR:root:qemu-system-x86_64 -nodefaults -m 4G -cpu max -vnc
127.0.0.1:0,to=20 -serial
file:/home/peter.maydell/qemu-openbsd/build/vm-test-0cyRK6.tmp/serial.out
-smp 18 -enable-kvm -netdev user,id=vnet,hostfwd=:127.0.0.1:0-:22,tftp=/tmp/tmpXrGR4K,bootfile=/auto_install,tftp-server-name=10.0.2.4,guestfwd=tcp:10.0.2.4:80-cmd:cat /tmp/tmpXrGR4K/install.conf -device virtio-net-pci,netdev=vnet -device
VGA -drive file=tests/vm/openbsd.img.tmp,if=none,id=drive0,cache=writeback
-device virtio-blk,drive=drive0,bootindex=0 -boot once=n -no-reboot
-cdrom /home/peter.maydell/.cache/qemu-vm/download/535472578c58eb79f8b3c168a22fa5bcd2c1e6d4
ERROR:root:Log:
ERROR:root:qemu-system-x86_64: -netdev user,id=vnet,hostfwd=:127.0.0.1:0-:22,tftp=/tmp/tmpXrGR4K,bootfile=/auto_install,tftp-server-name=10.0.2.4,guestfwd=tcp:10.0.2.4:80-cmd:cat /tmp/tmpXrGR4K/install.conf: Invalid parameter 'tftp-server-name'

ERROR:root:QEMU version >= 2.10 is required
Failed to prepare guest environment

The host is an Ubuntu 18.04.1, with QEMU version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.8), so that should be good enough for a ">= 2.10" requirement.
I notice that our qapi/net.json says tftp-server-name is "Since 3.1", though, so maybe the error message is wrong.

I don't really want to have to build and maintain a non-distro QEMU binary for running these VM tests if we can avoid it.

thanks
-- PMM