Re: [Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-12-01 Thread Ming Lin
On Tue, 2015-12-01 at 11:59 -0500, Paolo Bonzini wrote: > > What do you think about virtio-nvme+vhost-nvme? > > What would be the advantage over virtio-blk? Multiqueue is not supported > by QEMU but it's already supported by Linux (commit 6a27b656fc). I expect performance would be better. Seems

Re: [Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-12-01 Thread Ming Lin
On Tue, 2015-12-01 at 17:02 +0100, Paolo Bonzini wrote: > > On 01/12/2015 00:20, Ming Lin wrote: > > qemu-nvme: 148MB/s > > vhost-nvme + google-ext: 230MB/s > > qemu-nvme + google-ext + eventfd: 294MB/s > > virtio-scsi: 296MB/s > > virtio-blk: 344MB/s > >

Re: [Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-11-30 Thread Ming Lin
On Mon, 2015-11-23 at 15:14 +0100, Paolo Bonzini wrote: > > On 23/11/2015 09:17, Ming Lin wrote: > > On Sat, 2015-11-21 at 14:11 +0100, Paolo Bonzini wrote: > >> > >> On 20/11/2015 01:20, Ming Lin wrote: > >>> One improvment could be to use google&#x

Re: [Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-11-25 Thread Ming Lin
On Wed, 2015-11-25 at 12:27 +0100, Paolo Bonzini wrote: > Do you still have a blk_set_aio_context somewhere? I'm losing track of > the changes. No. > > In any case, I think using a separate I/O thread is a bit premature, > except for benchmarking. In the meanwhile I think the best option is to

Re: [Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-11-24 Thread Ming Lin
On Tue, 2015-11-24 at 11:51 +0100, Paolo Bonzini wrote: > > On 24/11/2015 08:27, Ming Lin wrote: > > handle_notify (qemu/hw/block/dataplane/virtio-blk.c:126) > > aio_dispatch (qemu/aio-posix.c:329) > > aio_poll (qemu/aio-posix.c:474) > > iothread_run (qemu/i

Re: [Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-11-24 Thread Ming Lin
On Mon, 2015-11-23 at 23:27 -0800, Ming Lin wrote: > On Mon, 2015-11-23 at 15:14 +0100, Paolo Bonzini wrote: > > > > On 23/11/2015 09:17, Ming Lin wrote: > > > On Sat, 2015-11-21 at 14:11 +0100, Paolo Bonzini wrote: > > >> > > >> On 20/11/2015 01:

Re: [Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-11-23 Thread Ming Lin
On Mon, 2015-11-23 at 15:14 +0100, Paolo Bonzini wrote: > > On 23/11/2015 09:17, Ming Lin wrote: > > On Sat, 2015-11-21 at 14:11 +0100, Paolo Bonzini wrote: > >> > >> On 20/11/2015 01:20, Ming Lin wrote: > >>> One improvment could be to use google&#x

Re: [Qemu-devel] [PATCH -qemu] nvme: support Google vendor extension

2015-11-23 Thread Ming Lin
On Sat, 2015-11-21 at 23:45 -0800, Ming Lin wrote: > On Sat, 2015-11-21 at 13:56 +0100, Paolo Bonzini wrote: > > > > On 21/11/2015 00:05, Ming Lin wrote: > > > [1.752129] Freeing unused kernel memory: 420K (880001b97000 - > > > 880001c0) >

Re: [Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-11-23 Thread Ming Lin
On Sat, 2015-11-21 at 14:11 +0100, Paolo Bonzini wrote: > > On 20/11/2015 01:20, Ming Lin wrote: > > One improvment could be to use google's NVMe vendor extension that > > I send in another thread, aslo here: > > https://git.kernel.org/cgit/linux/kernel/git/mlin/lin

Re: [Qemu-devel] [PATCH -qemu] nvme: support Google vendor extension

2015-11-21 Thread Ming Lin
On Sat, 2015-11-21 at 13:56 +0100, Paolo Bonzini wrote: > > On 21/11/2015 00:05, Ming Lin wrote: > > [1.752129] Freeing unused kernel memory: 420K (880001b97000 - > > 880001c0) > > [1.986573] clocksource: tsc: mask: 0x max_cy

Re: [Qemu-devel] [PATCH -qemu] nvme: support Google vendor extension

2015-11-20 Thread Ming Lin
On Fri, 2015-11-20 at 09:58 +0100, Paolo Bonzini wrote: > > On 20/11/2015 09:11, Ming Lin wrote: > > On Thu, 2015-11-19 at 11:37 +0100, Paolo Bonzini wrote: > >> > >> On 18/11/2015 06:47, Ming Lin wrote: > >>> @@ -726,7 +798,11 @@ static void nvme_proce

Re: [Qemu-devel] [PATCH -qemu] nvme: support Google vendor extension

2015-11-20 Thread Ming Lin
On Thu, 2015-11-19 at 11:37 +0100, Paolo Bonzini wrote: > > On 18/11/2015 06:47, Ming Lin wrote: > > @@ -726,7 +798,11 @@ static void nvme_process_db(NvmeCtrl *n, hwaddr addr, > > int val) > > } > > > > start_sqs = nvme_cq_full(cq) ? 1 :

Re: [Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-11-19 Thread Ming Lin
n't know why it's lost. mlin@ssi:~$ history |grep "nab" 1861 git send-email --from "Ming Lin " --to "linux-n...@lists.infradead.org" --cc "qemu-devel@nongnu.org" --cc "virtualizat...@lists.linux-foundation.org" --cc "Christoph Hellwig " --cc "Nicholas A. Bellinger " --compose ~/patches/*.patch

Re: [Qemu-devel] [RFC PATCH 4/9] nvmet: add a controller "start" hook

2015-11-19 Thread Ming Lin
On Fri, 2015-11-20 at 06:13 +0100, Christoph Hellwig wrote: > On Thu, Nov 19, 2015 at 04:21:03PM -0800, Ming Lin wrote: > > #define NVMET_SUBSYS_NAME_LEN 256 > > charsubsys_name[NVMET_SUBSYS_NAME_LEN]; > > + > > + void

[Qemu-devel] [RFC PATCH 8/9] nvme-vhost: add vhost memory helpers

2015-11-19 Thread Ming Lin
From: Ming Lin This borrows code from Hannes Reinecke's rts-megasas. Cc: Hannes Reinecke Signed-off-by: Ming Lin --- drivers/nvme/target/vhost.c | 108 1 file changed, 108 insertions(+) diff --git a/drivers/nvme/target/vhost.c b/drivers

[Qemu-devel] [RFC PATCH 6/9] nvmet: add a "parse_extra_admin_cmd" hook

2015-11-19 Thread Ming Lin
From: Ming Lin This is used to execute controller specific cmd parse code Signed-off-by: Ming Lin --- drivers/nvme/target/admin-cmd.c | 7 +++ drivers/nvme/target/nvmet.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target

[Qemu-devel] [RFC PATCH 9/9] nvme-vhost: add nvme queue handlers

2015-11-19 Thread Ming Lin
From: Ming Lin This adds nvme submission/completion queue handlers, which are ported from qemu-nvme. And hooks into nvme-target to do the real job. Cc: Keith Busch Signed-off-by: Ming Lin --- drivers/nvme/target/vhost.c | 420 +++- 1 file changed, 416

[Qemu-devel] [RFC PATCH 3/9] nvme-vhost: add basic nvme bar read/write

2015-11-19 Thread Ming Lin
From: Ming Lin Signed-off-by: Ming Lin --- drivers/nvme/target/vhost.c | 102 include/uapi/linux/vhost.h | 17 ++-- 2 files changed, 116 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/target/vhost.c b/drivers/nvme/target/vhost.c

[Qemu-devel] [RFC PATCH 4/9] nvmet: add a controller "start" hook

2015-11-19 Thread Ming Lin
From: Ming Lin This is used to execute controller specific start code Signed-off-by: Ming Lin --- drivers/nvme/target/core.c | 3 +++ drivers/nvme/target/nvmet.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index 1bfef66

[Qemu-devel] [RFC PATCH 7/9] nvme-vhost: add "parse_extra_admin_cmd" callback

2015-11-19 Thread Ming Lin
From: Ming Lin Signed-off-by: Ming Lin --- drivers/nvme/target/vhost.c | 153 1 file changed, 153 insertions(+) diff --git a/drivers/nvme/target/vhost.c b/drivers/nvme/target/vhost.c index 4a147d6..04ed0bc 100644 --- a/drivers/nvme/target/vhost.c

[Qemu-devel] [RFC PATCH 5/9] nvme-vhost: add controller "start" callback

2015-11-19 Thread Ming Lin
From: Ming Lin Signed-off-by: Ming Lin --- drivers/nvme/target/vhost.c | 106 1 file changed, 106 insertions(+) diff --git a/drivers/nvme/target/vhost.c b/drivers/nvme/target/vhost.c index 01c44b8..4a147d6 100644 --- a/drivers/nvme/target/vhost.c

[Qemu-devel] [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-11-19 Thread Ming Lin
Hi, This is the first attempt to add a new qemu nvme backend using in-kernel nvme target. Most code are ported from qemu-nvme and also borrow code from Hannes Reinecke's rts-megasas. It's similar as vhost-scsi, but doesn't use virtio. The advantage is guest can run unmodified NVMe driver. So gue

[Qemu-devel] [RFC PATCH 2/9] nvme-vhost: add basic ioctl handlers

2015-11-19 Thread Ming Lin
From: Ming Lin Signed-off-by: Ming Lin --- drivers/nvme/target/core.c | 1 + drivers/nvme/target/vhost.c | 264 +++- include/uapi/linux/vhost.h | 15 +++ 3 files changed, 279 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/target/core.c b

[Qemu-devel] [RFC PATCH 1/9] nvme-vhost: add initial commit

2015-11-19 Thread Ming Lin
From: Ming Lin Signed-off-by: Ming Lin --- drivers/nvme/target/Kconfig | 11 +++ drivers/nvme/target/Makefile | 2 ++ drivers/nvme/target/vhost.c | 16 3 files changed, 29 insertions(+) create mode 100644 drivers/nvme/target/vhost.c diff --git a/drivers/nvme

[Qemu-devel] [RFC PATCH 0/2] Google extension to improve qemu-nvme performance

2015-11-18 Thread Ming Lin
Hi Rob & Mihai, I wrote vhost-nvme patches on top of Christoph's NVMe target. vhost-nvme still uses mmio. So the guest OS can run unmodified NVMe driver. But the tests I have done didn't show competitive performance compared to virtio-blk/virtio-scsi. The bottleneck is in mmio. Your nvme vendor ex

[Qemu-devel] [PATCH -kernel] nvme: improve performance for virtual NVMe devices

2015-11-18 Thread Ming Lin
=1 --verify=0 --verify_fatal=0 --numjobs=4 --rw=randread --blocksize=4k --randrepeat=false Signed-off-by: Rob Nelson [mlin: port for upstream] Signed-off-by: Ming Lin --- drivers/nvme/host/Kconfig | 7 +++ drivers/nvme/host/core.c | 1 + drivers/nvme/host/pci.c | 147

[Qemu-devel] [PATCH -qemu] nvme: support Google vendor extension

2015-11-18 Thread Ming Lin
-by: Keith Busch [mlin: port for upstream] Signed-off-by: Ming Lin --- hw/block/nvme.c | 92 ++--- hw/block/nvme.h | 18 +++ 2 files changed, 106 insertions(+), 4 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 169e4f