From patchwork Wed Jan 9 01:52:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam X-Patchwork-Id: 10753359 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5806F6C5 for ; Wed, 9 Jan 2019 01:55:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 423812899B for ; Wed, 9 Jan 2019 01:55:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3004028D8D; Wed, 9 Jan 2019 01:55:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E2B832899B for ; Wed, 9 Jan 2019 01:55:12 +0000 (UTC) Received: from localhost ([127.0.0.1]:38453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gh35K-0003E4-Bi for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Jan 2019 20:55:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gh33z-00022W-Gr for qemu-devel@nongnu.org; Tue, 08 Jan 2019 20:53:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gh33y-0005wk-LN for qemu-devel@nongnu.org; Tue, 08 Jan 2019 20:53:47 -0500 Received: from sender2-op-o12.zoho.com.cn ([163.53.93.243]:17745 helo=sender1.zoho.com.cn) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gh33x-0005kQ-CL for qemu-devel@nongnu.org; Tue, 08 Jan 2019 20:53:46 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1546998768; cv=none; d=zoho.com.cn; s=zohoarc; b=ZZLLh6os+RWL8EJojbSh4zdrr5rSadrF+bmlZXY+kh9N6Qv1Y2/qDYa+LHfx43mJ5LOsnMIlqm/WzSwEFNvCSIvOcwB5BWfxPU8jrGrN72iUMBRT4oVIjoWbyFH81VMvAk6cYTrQkdfXwmw8pMQ7kndCo6fUwm1PnSfXuRJExOo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com.cn; s=zohoarc; t=1546998768; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=Fb5hc+G6CN9iuGA//nSqw7ZVubWJmu8R+anBUfdqI0k=; b=Xp6DuiKLsItghpfjf/TNO7H7RyjQbhR4dVPPY53ccLhp+lgjFohA2Hp8wKQyutqiBMI6wgzigXsRR7x/bcJKm/XdDBWas7D6RVcE0XXMLRjCWVmdTsB70dC7LknDvaveHn7eqz3+y2yrIIDo6xMy0kVqgt9x7Glb4a2zmyZHUvo= ARC-Authentication-Results: i=1; mx.zoho.com.cn; dkim=pass header.i=euphon.net; spf=pass smtp.mailfrom=fam@euphon.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1546998768; s=zoho; d=euphon.net; i=fam@euphon.net; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; l=2253; bh=Fb5hc+G6CN9iuGA//nSqw7ZVubWJmu8R+anBUfdqI0k=; b=cANBn1WjFjpr96GvjHcmUg6Quq/vNjiNzUhZRjLcGYGWZs3g6wmiSLI4YizZ6EuU jrQ6lN1XtVqxkhFXJrKufjF6sY3m3LwQfdIAiB5tCFuKKJUkehAT9jFpOahodRiy8fc nRuzHRENuLxFNKe39H4mNxQ8MYOHd4y60xDT8CDc= Received: from localhost (120.52.147.52 [120.52.147.52]) by mx.zoho.com.cn with SMTPS id 1546998767341420.105138964553; Wed, 9 Jan 2019 09:52:47 +0800 (CST) From: Fam Zheng To: qemu-devel@nongnu.org Date: Wed, 9 Jan 2019 09:52:39 +0800 Message-Id: <20190109015240.2116-2-fam@euphon.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190109015240.2116-1-fam@euphon.net> References: <20190109015240.2116-1-fam@euphon.net> X-ZohoCNMailClient: External X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 163.53.93.243 Subject: [Qemu-devel] [PULL 1/2] block/nvme: optimize the performance of nvme driver based on vfio-pci X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Li Feng 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) Signed-off-by: Li Feng Message-Id: <20181101103807.25862-1-lifeng1519@gmail.com> Signed-off-by: Fam Zheng --- block/nvme.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/block/nvme.c b/block/nvme.c index 29294038fc..982097b5b1 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -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); From patchwork Wed Jan 9 01:52:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fam X-Patchwork-Id: 10753363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1BDE713BF for ; Wed, 9 Jan 2019 01:55:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AC272899B for ; Wed, 9 Jan 2019 01:55:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2FDD28D8D; Wed, 9 Jan 2019 01:55:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 94A5D2899B for ; Wed, 9 Jan 2019 01:55:23 +0000 (UTC) Received: from localhost ([127.0.0.1]:38502 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gh35W-0003PB-SB for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Jan 2019 20:55:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gh346-00028S-0k for qemu-devel@nongnu.org; Tue, 08 Jan 2019 20:53:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gh345-00062Q-1h for qemu-devel@nongnu.org; Tue, 08 Jan 2019 20:53:53 -0500 Received: from sender2-op-o12.zoho.com.cn ([163.53.93.243]:17776 helo=sender1.zoho.com.cn) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gh344-00060v-Fb for qemu-devel@nongnu.org; Tue, 08 Jan 2019 20:53:52 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1546998770; cv=none; d=zoho.com.cn; s=zohoarc; b=XqEqiY4Up4aabQnZLfFJGt35SIgJaKc2VGY7/gtJcz3CGSFQwLVrzytxSDVP+RLZQ2gRL6OsJCjr6Ny4gxw8YpkXObxQHqucb5n+/qrN+paiQVuUR1HA1RoUZsrGoxvI4urldtWhuRh791asmDwVp3coSQfJQB3WqA7wWq03jFo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com.cn; s=zohoarc; t=1546998770; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=jhq38tiZy+crr84voA/EAyFCLFGDmK1s91zaM9ARFC8=; b=Pp3n9MBHlbcBSSvtBoIlvsGbVo8pcN+SUACUQDprQXO7FKWSTe6qwt9faGDkh6wMxZAmw7X824IbJ52XXrizG8Ax/c4dSPpht1OV5+7pc8xUkkY72aBV4ePsLCp2rlNwE836mBgV5kgpbhHkNlN2mQhcJOul+0P7xT+rdOKJRo4= ARC-Authentication-Results: i=1; mx.zoho.com.cn; dkim=pass header.i=euphon.net; spf=pass smtp.mailfrom=fam@euphon.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1546998770; s=zoho; d=euphon.net; i=fam@euphon.net; h=From:To:Cc:Message-ID:Subject:Date:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding; l=2301; bh=jhq38tiZy+crr84voA/EAyFCLFGDmK1s91zaM9ARFC8=; b=N3Nw/Tgh4Dh2Vwom+Gbgij7wSHti+4YYSMRPvOZIQPs8VPVfdf9v5RoidYx29tgG 0Upy+o/cPs06DGIPrs31Ww+7ayf8Zidsy68bgyeqnnNXmFSPVHzc38kvoo1a175P02c 2Og3dK2TSJUWigwj1jn8zC0eC74o3QW3ZZIo0Njs= Received: from localhost (120.52.147.52 [120.52.147.52]) by mx.zoho.com.cn with SMTPS id 1546998769687569.379257302775; Wed, 9 Jan 2019 09:52:49 +0800 (CST) From: Fam Zheng To: qemu-devel@nongnu.org Message-ID: <20190109015240.2116-3-fam@euphon.net> Date: Wed, 9 Jan 2019 09:52:40 +0800 X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190109015240.2116-1-fam@euphon.net> References: <20190109015240.2116-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 163.53.93.243 Subject: [Qemu-devel] [PULL 2/2] docker: Use a stable snapshot for Debian Sid X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Philippe Mathieu-Daudé 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. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181101183705.5422-1-philmd@redhat.com> Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/debian-sid.docker | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/docker/dockerfiles/debian-sid.docker b/tests/docker/dockerfiles/debian-sid.docker index 9a3d168705..4e4cda0ba5 100644 --- a/tests/docker/dockerfiles/debian-sid.docker +++ b/tests/docker/dockerfiles/debian-sid.docker @@ -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