Re: [PATCH RFC] vhost: basic device IOTLB support

2016-01-05 Thread Jason Wang
On 01/05/2016 11:18 AM, Yang Zhang wrote: > On 2016/1/4 14:22, Jason Wang wrote: >> >> >> On 01/04/2016 09:39 AM, Yang Zhang wrote: >>> On 2015/12/31 15:13, Jason Wang wrote: >>>> This patch tries to implement an device IOTLB for vhost. Thi

Re: [PATCH RFC] vhost: basic device IOTLB support

2016-01-03 Thread Jason Wang
On 01/04/2016 09:39 AM, Yang Zhang wrote: > On 2015/12/31 15:13, Jason Wang wrote: >> This patch tries to implement an device IOTLB for vhost. This could be >> used with for co-operation with userspace(qemu) implementation of >> iommu for a secure DMA environment in

Re: [PATCH RFC] vhost: basic device IOTLB support

2016-01-03 Thread Jason Wang
On 12/31/2015 07:17 PM, Michael S. Tsirkin wrote: > On Thu, Dec 31, 2015 at 03:13:45PM +0800, Jason Wang wrote: >> This patch tries to implement an device IOTLB for vhost. This could be >> used with for co-operation with userspace(qemu) implementation of >> iommu for a s

Re: [RFC v4 0/5] Add virtio transport for AF_VSOCK

2016-01-03 Thread Jason Wang
On 12/22/2015 05:07 PM, Stefan Hajnoczi wrote: > This series is based on v4.4-rc2 and the "virtio: make find_vqs() > checkpatch.pl-friendly" patch I recently submitted. > > v4: > * Addressed code review comments from Alex Bennee > * MAINTAINERS file entries for new files > * Trace events

[PATCH RFC] vhost: basic device IOTLB support

2015-12-30 Thread Jason Wang
ABLE is not reused (maybe there's a chance). - working at PAGE_SIZE level, don't support large mappings. - better data structure for IOTLB instead of simple hash array. - better API, e.g using mmap() instead of preset userspace address. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/v

Re: [PATCH net-next 3/3] vhost_net: basic polling support

2015-12-03 Thread Jason Wang
On 12/02/2015 08:36 PM, Michael S. Tsirkin wrote: > On Wed, Dec 02, 2015 at 01:04:03PM +0800, Jason Wang wrote: >> >> On 12/01/2015 10:43 PM, Michael S. Tsirkin wrote: >>> On Tue, Dec 01, 2015 at 01:17:49PM +0800, Jason Wang wrote: >>>> On 11/30/201

Re: [PATCH net-next 3/3] vhost_net: basic polling support

2015-12-01 Thread Jason Wang
On 12/01/2015 10:43 PM, Michael S. Tsirkin wrote: > On Tue, Dec 01, 2015 at 01:17:49PM +0800, Jason Wang wrote: >> >> On 11/30/2015 06:44 PM, Michael S. Tsirkin wrote: >>> On Wed, Nov 25, 2015 at 03:11:29PM +0800, Jason Wang wrote: >>>>> This patch tries to

Re: [PATCH net-next 3/3] vhost_net: basic polling support

2015-11-30 Thread Jason Wang
On 11/30/2015 06:44 PM, Michael S. Tsirkin wrote: > On Wed, Nov 25, 2015 at 03:11:29PM +0800, Jason Wang wrote: >> > This patch tries to poll for new added tx buffer or socket receive >> > queue for a while at the end of tx/rx processing. The maximum time >> > s

Re: [PATCH net-next 2/3] vhost: introduce vhost_vq_more_avail()

2015-11-30 Thread Jason Wang
On 11/30/2015 04:22 PM, Michael S. Tsirkin wrote: > On Wed, Nov 25, 2015 at 03:11:28PM +0800, Jason Wang wrote: >> Signed-off-by: Jason Wang <jasow...@redhat.com> >> --- >> drivers/vhost/vhost.c | 26 +- >> drivers/vhost/vhost.h | 1 + &

[PATCH V2 0/3] basic busy polling support for vhost_net

2015-11-30 Thread Jason Wang
for busyloop_timeout - Split out the busy polling logic into a new helper - Check and exit the loop when there's a pending signal - Disable preemption during busy looping to make sure lock_clock() was correctly used. Jason Wang (3): vhost: introduce vhost_has_work() vhost: introduce vhost_vq_more_avail

[PATCH V2 3/3] vhost_net: basic polling support

2015-11-30 Thread Jason Wang
This patch tries to poll for new added tx buffer or socket receive queue for a while at the end of tx/rx processing. The maximum time spent on polling were specified through a new kind of vring ioctl. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/net.c

[PATCH V2 1/3] vhost: introduce vhost_has_work()

2015-11-30 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/vhost/v

[PATCH V2 2/3] vhost: introduce vhost_vq_more_avail()

2015-11-30 Thread Jason Wang
Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 13 + drivers/vhost/vhost.h | 1 + 2 files changed, 14 insertions(+) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 163b365..4f45a03 100644 --- a/drivers/vhost/vhost.c +++ b/drivers

[PATCH net-next 0/3] basic busy polling support for vhost_net

2015-11-24 Thread Jason Wang
() was correctly used. Jason Wang (3): vhost: introduce vhost_has_work() vhost: introduce vhost_vq_more_avail() vhost_net: basic polling support drivers/vhost/net.c| 72 ++ drivers/vhost/vhost.c | 48

[PATCH net-next 1/3] vhost: introduce vhost_has_work()

2015-11-24 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/vhost/v

[PATCH net-next 3/3] vhost_net: basic polling support

2015-11-24 Thread Jason Wang
This patch tries to poll for new added tx buffer or socket receive queue for a while at the end of tx/rx processing. The maximum time spent on polling were specified through a new kind of vring ioctl. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/net.c

[PATCH net-next 2/3] vhost: introduce vhost_vq_more_avail()

2015-11-24 Thread Jason Wang
Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 26 +- drivers/vhost/vhost.h | 1 + 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 163b365..b86c5aa 100644 --- a/drivers

Re: [PATCH] vhost: relax log address alignment

2015-11-16 Thread Jason Wang
_SIZE - 1))) { > r = -EINVAL; > break; > } Acked-by: Jason Wang <jasow...@redhat.com> -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net-next RFC V3 0/3] basic busy polling support for vhost_net

2015-11-16 Thread Jason Wang
On 11/13/2015 05:20 PM, Jason Wang wrote: > > On 11/12/2015 08:02 PM, Felipe Franciosi wrote: >> Hi Jason, >> >> I understand your busy loop timeout is quite conservative at 50us. Did you >> try any other values? > I've also tried 20us. And results shows 50u

Re: [PATCH net-next RFC V3 0/3] basic busy polling support for vhost_net

2015-11-13 Thread Jason Wang
t tested this for vhost polling. Will run some simple test (e.g pin two vhost threads in one host cpu), and see how well it perform. Thanks > > Thanks, > Felipe > > > > On 12/11/2015 10:20, "kvm-ow...@vger.kernel.org on behalf of Jason Wang" > <kvm-ow...@vger.

[PATCH net-next RFC V3 3/3] vhost_net: basic polling support

2015-11-12 Thread Jason Wang
This patch tries to poll for new added tx buffer or socket receive queue for a while at the end of tx/rx processing. The maximum time spent on polling were specified through a new kind of vring ioctl. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/net.c

[PATCH net-next RFC V3 0/3] basic busy polling support for vhost_net

2015-11-12 Thread Jason Wang
logic into a new helper - Check and exit the loop when there's a pending signal - Disable preemption during busy looping to make sure lock_clock() was correctly used. Jason Wang (3): vhost: introduce vhost_has_work() vhost: introduce vhost_vq_more_avail() vhost_net: basic polling support

[PATCH net-next RFC V3 1/3] vhost: introduce vhost_has_work()

2015-11-12 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/vhost/v

[PATCH net-next RFC V3 2/3] vhost: introduce vhost_vq_more_avail()

2015-11-12 Thread Jason Wang
Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 26 +- drivers/vhost/vhost.h | 1 + 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 163b365..b86c5aa 100644 --- a/drivers

Re: [PATCH net-next RFC V3 0/3] basic busy polling support for vhost_net

2015-11-12 Thread Jason Wang
On 11/12/2015 06:16 PM, Jason Wang wrote: > Hi all: > > This series tries to add basic busy polling for vhost net. The idea is > simple: at the end of tx/rx processing, busy polling for new tx added > descriptor and rx receive socket for a while. The maximum number of >

Re: [PATCH V6 0/6] Fast mmio eventfd fixes

2015-11-09 Thread Jason Wang
On 11/10/2015 04:19 AM, Michael S. Tsirkin wrote: > On Mon, Nov 09, 2015 at 12:35:45PM +0800, Jason Wang wrote: >> > >> > >> > On 11/09/2015 01:11 AM, Michael S. Tsirkin wrote: >>> > > On Tue, Sep 15, 2015 at 02:41:53PM +0800, Jason Wang wrote:

Re: [PATCH V6 0/6] Fast mmio eventfd fixes

2015-11-08 Thread Jason Wang
On 11/09/2015 01:11 AM, Michael S. Tsirkin wrote: > On Tue, Sep 15, 2015 at 02:41:53PM +0800, Jason Wang wrote: >> Hi: >> >> This series fixes two issues of fast mmio eventfd: >> >> 1) A single iodev instance were registerd on two buses: KVM_MMIO_BUS >>

Re: [PATCH net-next rfc V2 0/2] basic busy polling support for vhost_net

2015-11-02 Thread Jason Wang
On 10/30/2015 07:58 PM, Jason Wang wrote: > > On 10/29/2015 04:45 PM, Jason Wang wrote: >> Hi all: >> >> This series tries to add basic busy polling for vhost net. The idea is >> simple: at the end of tx processing, busy polling for new tx added >> descript

Re: [PATCH net-next rfc V2 0/2] basic busy polling support for vhost_net

2015-10-30 Thread Jason Wang
On 10/29/2015 04:45 PM, Jason Wang wrote: > Hi all: > > This series tries to add basic busy polling for vhost net. The idea is > simple: at the end of tx processing, busy polling for new tx added > descriptor and rx receive socket for a while. The maximum number of > time (in

[PATCH net-next rfc V2 2/2] vhost_net: basic polling support

2015-10-29 Thread Jason Wang
. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/net.c | 54 + 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 9eda69e..30e6d3d 100644 --- a/drivers/vhost/net.c

[PATCH net-next rfc V2 0/2] basic busy polling support for vhost_net

2015-10-29 Thread Jason Wang
per VM through ioctl. Please review. Thanks Jason Wang (2): vhost: introduce vhost_has_work() vhost_net: basic polling support drivers/vhost/net.c | 54 +++ drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h | 1 + 3 files changed, 58

[PATCH net-next rfc V2 1/2] vhost: introduce vhost_has_work()

2015-10-29 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/vhost/v

Re: [PATCH net-next RFC 1/2] vhost: introduce vhost_has_work()

2015-10-23 Thread Jason Wang
On 10/22/2015 04:38 PM, Michael S. Tsirkin wrote: > On Thu, Oct 22, 2015 at 01:27:28AM -0400, Jason Wang wrote: >> > This path introduces a helper which can give a hint for whether or not >> > there's a work queued in the work list. >> > >> > Signed-

Re: [PATCH net-next RFC 2/2] vhost_net: basic polling support

2015-10-23 Thread Jason Wang
On 10/22/2015 05:33 PM, Michael S. Tsirkin wrote: > On Thu, Oct 22, 2015 at 01:27:29AM -0400, Jason Wang wrote: >> This patch tries to poll for new added tx buffer for a while at the >> end of tx processing. The maximum time spent on polling were limited >> through a modul

Re: [PATCH net-next RFC 2/2] vhost_net: basic polling support

2015-10-23 Thread Jason Wang
On 10/23/2015 12:16 AM, Michael S. Tsirkin wrote: > On Thu, Oct 22, 2015 at 08:46:33AM -0700, Rick Jones wrote: >> On 10/22/2015 02:33 AM, Michael S. Tsirkin wrote: >>> On Thu, Oct 22, 2015 at 01:27:29AM -0400, Jason Wang wrote: >>>> This patch tries to poll for n

[PATCH net-next RFC 2/2] vhost_net: basic polling support

2015-10-21 Thread Jason Wang
. busyloop_timeout = 50 gives us following improvement on TCP_RR test: size/session/+thu%/+normalize% 1/ 1/ +5%/ -20% 1/50/ +17%/ +3% Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/net.c | 19 +++ 1 file changed, 19 insertions(+) diff

[PATCH net-next RFC 1/2] vhost: introduce vhost_has_work()

2015-10-21 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 6 ++ drivers/vhost/vhost.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/vhost/vho

[PATCH V6 4/6] kvm: fix zero length mmio searching

2015-09-15 Thread Jason Wang
this by using zero length if an iodevice is zero length. Cc: sta...@vger.kernel.org Cc: Gleb Natapov <g...@kernel.org> Cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com> --- virt/kvm/kvm_main.c | 19 +-- 1 file changed, 17 insertio

[PATCH V6 2/6] kvm: factor out core eventfd assign/deassign logic

2015-09-15 Thread Jason Wang
This patch factors out core eventfd assign/deassign logic and leaves the argument checking and bus index selection to callers. Cc: sta...@vger.kernel.org Cc: Gleb Natapov <g...@kernel.org> Cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com

[PATCH V6 3/6] kvm: fix double free for fast mmio eventfd

2015-09-15 Thread Jason Wang
00 01 10 00 00 RIP [] ioeventfd_release+0x28/0x60 [kvm] RSP Cc: sta...@vger.kernel.org Cc: Gleb Natapov <g...@kernel.org> Cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com> --- virt/kvm/eventfd.c | 43 +--

[PATCH V6 6/6] kvm: add fast mmio capabilitiy

2015-09-15 Thread Jason Wang
Cc: Gleb Natapov <g...@kernel.org> Cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com> --- Documentation/virtual/kvm/api.txt | 7 ++- include/uapi/linux/kvm.h | 1 + virt/kvm/kvm_main.c | 1 + 3 files changed,

[PATCH V6 5/6] kvm: add tracepoint for fast mmio

2015-09-15 Thread Jason Wang
Cc: Gleb Natapov <g...@kernel.org> Cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com> --- arch/x86/kvm/trace.h | 18 ++ arch/x86/kvm/vmx.c | 1 + arch/x86/kvm/x86.c | 1 + 3 files changed, 20 insertions(+) diff --

[PATCH V6 1/6] kvm: don't try to register to KVM_FAST_MMIO_BUS for non mmio eventfd

2015-09-15 Thread Jason Wang
We only want zero length mmio eventfd to be registered on KVM_FAST_MMIO_BUS. So check this explicitly when arg->len is zero to make sure this. Cc: sta...@vger.kernel.org Cc: Gleb Natapov <g...@kernel.org> Cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Jason Wang <j

[PATCH V6 0/6] Fast mmio eventfd fixes

2015-09-15 Thread Jason Wang
: - Tweak styles and comment suggested by Cornelia. Changes from v1: - change ioeventfd_bus_from_flags() to return KVM_FAST_MMIO_BUS when needed to save lots of unnecessary changes. Jason Wang (6): kvm: don't try to register to KVM_FAST_MMIO_BUS for non mmio eventfd kvm: factor out core eventfd

Re: [PATCH V4 0/4] Fast MMIO eventfd fixes

2015-09-11 Thread Jason Wang
On 09/11/2015 04:33 PM, Paolo Bonzini wrote: > > On 11/09/2015 10:15, Michael S. Tsirkin wrote: >> I think we should add a capability for fast mmio. >> This way, userspace can avoid crashing buggy kernels. > I agree. > > Paolo Right, then qemu will use datamatch eventfd if kenrel dost not have

Re: [PATCH V4 1/4] kvm: factor out core eventfd assign/deassign logic

2015-09-11 Thread Jason Wang
On 09/11/2015 03:39 PM, Cornelia Huck wrote: > On Fri, 11 Sep 2015 11:17:34 +0800 > Jason Wang <jasow...@redhat.com> wrote: > >> This patch factors out core eventfd assign/deassign logic and leave >> the argument checking and bus index selection to callers

Re: [PATCH V4 2/4] kvm: fix double free for fast mmio eventfd

2015-09-11 Thread Jason Wang
On 09/11/2015 03:46 PM, Cornelia Huck wrote: > On Fri, 11 Sep 2015 11:17:35 +0800 > Jason Wang <jasow...@redhat.com> wrote: > >> We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS >> and another is KVM_FAST_MMIO_BUS but with a single iodev >>

Re: [PATCH V4 3/4] kvm: fix zero length mmio searching

2015-09-11 Thread Jason Wang
On 09/11/2015 04:31 PM, Cornelia Huck wrote: > On Fri, 11 Sep 2015 10:26:41 +0200 > Paolo Bonzini <pbonz...@redhat.com> wrote: > >> On 11/09/2015 05:17, Jason Wang wrote: >>> + int len = r2->len ? r1->len : 0; >>> + >>> if (r1->a

[PATCH V4 3/4] kvm: fix zero length mmio searching

2015-09-10 Thread Jason Wang
zero length if an iodevice is zero length. Cc: Gleb Natapov <g...@kernel.org> Cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com> --- virt/kvm/kvm_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/virt/kvm/kvm

[PATCH V4 4/4] kvm: add tracepoint for fast mmio

2015-09-10 Thread Jason Wang
Cc: Gleb Natapov <g...@kernel.org> Cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com> --- arch/x86/kvm/trace.h | 18 ++ arch/x86/kvm/vmx.c | 1 + arch/x86/kvm/x86.c | 1 + 3 files changed, 20 insertions(+) diff --

[PATCH V4 2/4] kvm: fix double free for fast mmio eventfd

2015-09-10 Thread Jason Wang
01 10 00 00 RIP [] ioeventfd_release+0x28/0x60 [kvm] RSP Cc: Gleb Natapov <g...@kernel.org> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com>

[PATCH V4 1/4] kvm: factor out core eventfd assign/deassign logic

2015-09-10 Thread Jason Wang
This patch factors out core eventfd assign/deassign logic and leave the argument checking and bus index selection to callers. Cc: Gleb Natapov <g...@kernel.org> Cc: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com> --- virt/

[PATCH V4 0/4] Fast MMIO eventfd fixes

2015-09-10 Thread Jason Wang
from v1: - change ioeventfd_bus_from_flags() to return KVM_FAST_MMIO_BUS when needed to save lots of unnecessary changes. Jason Wang (4): kvm: factor out core eventfd assign/deassign logic kvm: fix double free for fast mmio eventfd kvm: fix zero length mmio searching kvm: add tracepoint

Re: [PATCH V3 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-09-01 Thread Jason Wang
On 09/01/2015 02:54 PM, Michael S. Tsirkin wrote: > On Tue, Sep 01, 2015 at 12:47:36PM +0800, Jason Wang wrote: >> >> On 09/01/2015 12:31 PM, Michael S. Tsirkin wrote: >>> On Tue, Sep 01, 2015 at 11:33:43AM +0800, Jason Wang wrote: >>>> On 08/31/201

Re: [PATCH V3 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-31 Thread Jason Wang
On 08/31/2015 07:33 PM, Michael S. Tsirkin wrote: > On Mon, Aug 31, 2015 at 04:03:59PM +0800, Jason Wang wrote: >> > >> > >> > On 08/31/2015 03:29 PM, Michael S. Tsirkin wrote: >>>>>>> > >>>>> Thinking more about this,

Re: [PATCH V3 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-31 Thread Jason Wang
On 08/31/2015 03:29 PM, Michael S. Tsirkin wrote: > Thinking more about this, invoking the 0-length write after > > >> > the != 0 length one would be better: it would mean we only > > >> > handle the userspace MMIO like this. >>> > > Right. >>> > > >> > >> > Using current unittest.

Re: [PATCH RFC 1/3] vmx: allow ioeventfd for EPT violations

2015-08-31 Thread Jason Wang
On 08/30/2015 05:12 PM, Michael S. Tsirkin wrote: > Even when we skip data decoding, MMIO is slightly slower > than port IO because it uses the page-tables, so the CPU > must do a pagewalk on each access. > > This overhead is normally masked by using the TLB cache: > but not so for KVM MMIO,

Re: [PATCH RFC 1/3] vmx: allow ioeventfd for EPT violations

2015-08-31 Thread Jason Wang
On 09/01/2015 12:36 PM, Michael S. Tsirkin wrote: > On Tue, Sep 01, 2015 at 11:37:13AM +0800, Jason Wang wrote: >> > >> > >> > On 08/30/2015 05:12 PM, Michael S. Tsirkin wrote: >>> > > Even when we skip data decoding, MMIO is slightly slower >>

Re: [PATCH V3 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-31 Thread Jason Wang
On 09/01/2015 12:31 PM, Michael S. Tsirkin wrote: > On Tue, Sep 01, 2015 at 11:33:43AM +0800, Jason Wang wrote: >> >> On 08/31/2015 07:33 PM, Michael S. Tsirkin wrote: >>> On Mon, Aug 31, 2015 at 04:03:59PM +0800, Jason Wang wrote: >>>>> >>>>

Re: [PATCH V3 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-30 Thread Jason Wang
On 08/26/2015 01:10 PM, Jason Wang wrote: On 08/25/2015 07:51 PM, Michael S. Tsirkin wrote: On Tue, Aug 25, 2015 at 05:05:47PM +0800, Jason Wang wrote: We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS and another is KVM_FAST_MMIO_BUS. This leads to issue

Re: [PATCH V2 3/3] kvm: add tracepoint for fast mmio

2015-08-25 Thread Jason Wang
On 08/25/2015 07:34 PM, Michael S. Tsirkin wrote: On Tue, Aug 25, 2015 at 03:47:15PM +0800, Jason Wang wrote: Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/kvm

Re: [PATCH V2 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Jason Wang
On 08/25/2015 07:33 PM, Michael S. Tsirkin wrote: On Tue, Aug 25, 2015 at 03:47:14PM +0800, Jason Wang wrote: We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS and another is KVM_FAST_MMIO_BUS. This leads to issue: - kvm_io_bus_destroy() knows nothing about

Re: [PATCH V2 1/3] kvm: use kmalloc() instead of kzalloc() during iodev register/unregister

2015-08-25 Thread Jason Wang
On 08/26/2015 01:45 PM, Joe Perches wrote: On Wed, 2015-08-26 at 13:39 +0800, Jason Wang wrote: On 08/25/2015 11:29 PM, Joe Perches wrote: On Tue, 2015-08-25 at 15:47 +0800, Jason Wang wrote: All fields of kvm_io_range were initialized or copied explicitly afterwards. So switch

Re: [PATCH V3 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Jason Wang
On 08/25/2015 07:51 PM, Michael S. Tsirkin wrote: On Tue, Aug 25, 2015 at 05:05:47PM +0800, Jason Wang wrote: We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS and another is KVM_FAST_MMIO_BUS. This leads to issue: - kvm_io_bus_destroy() knows nothing about

Re: [PATCH V2 1/3] kvm: use kmalloc() instead of kzalloc() during iodev register/unregister

2015-08-25 Thread Jason Wang
On 08/25/2015 11:29 PM, Joe Perches wrote: On Tue, 2015-08-25 at 15:47 +0800, Jason Wang wrote: All fields of kvm_io_range were initialized or copied explicitly afterwards. So switch to use kmalloc(). Is there any compiler added alignment padding in either structure? If so, those padding

Re: [PATCH 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Jason Wang
On 08/25/2015 11:04 AM, Jason Wang wrote: [...] @@ -900,10 +899,11 @@ kvm_deassign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) if (!p-wildcard p-datamatch != args-datamatch) continue; -kvm_io_bus_unregister_dev(kvm, bus_idx

[PATCH V2 1/3] kvm: use kmalloc() instead of kzalloc() during iodev register/unregister

2015-08-25 Thread Jason Wang
All fields of kvm_io_range were initialized or copied explicitly afterwards. So switch to use kmalloc(). Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- virt/kvm/kvm_main.c | 4 ++-- 1

[PATCH V2 3/3] kvm: add tracepoint for fast mmio

2015-08-25 Thread Jason Wang
Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/kvm/trace.h | 17 + arch/x86/kvm/vmx.c | 1 + arch/x86/kvm/x86.c | 1 + 3 files changed, 19 insertions

[PATCH V2 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Jason Wang
+0x28/0x60 [kvm] RSP 88020e7f3bc8 Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- Changes from v1: - change ioeventfd_bus_from_flags() to return KVM_FAST_MMIO_BUS when needed to save

Re: [PATCH V2 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Jason Wang
On 08/25/2015 04:20 PM, Cornelia Huck wrote: On Tue, 25 Aug 2015 15:47:14 +0800 Jason Wang jasow...@redhat.com wrote: diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 9ff4193..95f2901 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c @@ -762,13 +762,15

[PATCH V3 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-25 Thread Jason Wang
+0x28/0x60 [kvm] RSP 88020e7f3bc8 Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- Changes from V2: - Tweak styles and comment suggested by Cornelia. Changes from v1: - change

[PATCH V3 1/3] kvm: use kmalloc() instead of kzalloc() during iodev register/unregister

2015-08-25 Thread Jason Wang
All fields of kvm_io_range were initialized or copied explicitly afterwards. So switch to use kmalloc(). Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- virt/kvm/kvm_main.c | 4 ++-- 1

[PATCH V3 3/3] kvm: add tracepoint for fast mmio

2015-08-25 Thread Jason Wang
Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/kvm/trace.h | 17 + arch/x86/kvm/vmx.c | 1 + arch/x86/kvm/x86.c | 1 + 3 files changed, 19 insertions

Re: [PATCH 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-24 Thread Jason Wang
On 08/24/2015 10:05 PM, Cornelia Huck wrote: On Mon, 24 Aug 2015 11:29:29 +0800 Jason Wang jasow...@redhat.com wrote: On 08/21/2015 05:29 PM, Cornelia Huck wrote: On Fri, 21 Aug 2015 16:03:52 +0800 Jason Wang jasow...@redhat.com wrote: @@ -850,9 +845,15 @@ kvm_assign_ioeventfd(struct kvm

Re: [PATCH 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-23 Thread Jason Wang
On 08/21/2015 05:29 PM, Cornelia Huck wrote: On Fri, 21 Aug 2015 16:03:52 +0800 Jason Wang jasow...@redhat.com wrote: diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 9ff4193..834a409 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c @@ -838,11 +838,6

[PATCH 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-21 Thread Jason Wang
/0x60 [kvm] RSP 88020e7f3bc8 Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- virt/kvm/eventfd.c | 18 +- virt/kvm/kvm_main.c | 16 ++-- 2 files changed

[PATCH 3/3] kvm: add tracepoint for fast mmio

2015-08-21 Thread Jason Wang
Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/kvm/trace.h | 17 + arch/x86/kvm/vmx.c | 1 + arch/x86/kvm/x86.c | 1 + 3 files changed, 19 insertions

[PATCH 1/3] kvm: use kmalloc() instead of kzalloc() during iodev register/unregister

2015-08-21 Thread Jason Wang
All fields of kvm_io_range were initialized or copied explicitly afterwards. So switch to use kmalloc(). Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- virt/kvm/kvm_main.c | 4 ++-- 1

[PATCH net] vhost_net: fix wrong iter offset when setting number of buffers

2015-02-15 Thread Jason Wang
...@davemloft.net Cc: Al Viro v...@zeniv.linux.org.uk Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 8dccca9

Re: how to optimize virtio-vhost in 10G net

2015-02-14 Thread Jason Wang
On Sun, Feb 15, 2015 at 3:30 PM, Ding Xiao ssdxiaod...@gmail.com wrote: I am test virtio-vhost in 10G environment host info cpu E2680@2.7GHz memory 16G network intel 82599BE os centos 7 VM info cpu 4 memory 4G network using virtio vhost os centos 7 I using pktgen to send udp package, the

Re: [PATCH net-next] vhost: remove unnecessary forward declarations in vhost.h

2014-11-30 Thread Jason Wang
On Sun, Nov 30, 2014 at 1:04 PM, David Miller da...@davemloft.net wrote: From: Jason Wang jasow...@redhat.com Date: Thu, 27 Nov 2014 14:41:21 +0800 Signed-off-by: Jason Wang jasow...@redhat.com I don't think generic vhost patches should go via my tree. If you disagree, let me know why

Re: [PATCH v6 28/46] vhost: make features 64 bit

2014-11-28 Thread Jason Wang
(1ULL bit); } #endif -- MST Reviewed-by: Jason Wang jasow...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v6 29/46] vhost: add memory access wrappers

2014-11-28 Thread Jason Wang
(struct vhost_virtqueue *vq, u64 val) +{ + return __cpu_to_virtio64(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); +} #endif -- MST Reviewed-by: Jason Wang jasow...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org

Re: [PATCH v6 30/46] vhost/net: force len for TX to host endian

2014-11-28 Thread Jason Wang
__virtio32)0) -#define VHOST_DMA_IS_DONE(len) ((len) = VHOST_DMA_DONE_LEN) +#define VHOST_DMA_IS_DONE(len) ((__force u32)(len) = (__force u32)VHOST_DMA_DONE_LEN) enum { VHOST_NET_FEATURES = VHOST_FEATURES | -- MST Reviewed-by: Jason Wang jasow...@redhat.com -- To unsubscribe from

Re: [PATCH v6 33/46] vhost/net: larger header for virtio 1.0

2014-11-28 Thread Jason Wang
VIRTIO_NET_F_MRG_RXBUF) | + (1ULL VIRTIO_F_VERSION_1))) ? sizeof(struct virtio_net_hdr_mrg_rxbuf) : sizeof(struct virtio_net_hdr); if (features (1 VHOST_NET_F_VIRTIO_NET_HDR)) { -- MST Reviewed-by: Jason Wang

[PATCH net-next] vhost: remove unnecessary forward declarations in vhost.h

2014-11-26 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/vhost.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 3eda654..7d039ef 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -12,8 +12,6 @@ #include linux

Re: vhost + multiqueue + RSS question.

2014-11-18 Thread Jason Wang
On 11/18/2014 07:05 PM, Michael S. Tsirkin wrote: On Tue, Nov 18, 2014 at 11:37:03AM +0800, Jason Wang wrote: On 11/17/2014 07:58 PM, Michael S. Tsirkin wrote: On Mon, Nov 17, 2014 at 01:22:07PM +0200, Gleb Natapov wrote: On Mon, Nov 17, 2014 at 12:38:16PM +0200, Michael S. Tsirkin wrote

Re: vhost + multiqueue + RSS question.

2014-11-17 Thread Jason Wang
On 11/17/2014 07:58 PM, Michael S. Tsirkin wrote: On Mon, Nov 17, 2014 at 01:22:07PM +0200, Gleb Natapov wrote: On Mon, Nov 17, 2014 at 12:38:16PM +0200, Michael S. Tsirkin wrote: On Mon, Nov 17, 2014 at 09:44:23AM +0200, Gleb Natapov wrote: On Sun, Nov 16, 2014 at 08:56:04PM +0200,

Re: vhost + multiqueue + RSS question.

2014-11-17 Thread Jason Wang
On 11/18/2014 09:37 AM, Zhang Haoyu wrote: On Mon, Nov 17, 2014 at 01:58:20PM +0200, Michael S. Tsirkin wrote: On Mon, Nov 17, 2014 at 01:22:07PM +0200, Gleb Natapov wrote: On Mon, Nov 17, 2014 at 12:38:16PM +0200, Michael S. Tsirkin wrote: On Mon, Nov 17, 2014 at 09:44:23AM +0200, Gleb

Re: vhost + multiqueue + RSS question.

2014-11-16 Thread Jason Wang
On 11/17/2014 02:56 AM, Michael S. Tsirkin wrote: On Sun, Nov 16, 2014 at 06:18:18PM +0200, Gleb Natapov wrote: Hi Michael, I am playing with vhost multiqueue capability and have a question about vhost multiqueue and RSS (receive side steering). My setup has Mellanox ConnectX-3 NIC which

Re: vhost + multiqueue + RSS question.

2014-11-16 Thread Jason Wang
On 11/17/2014 12:54 PM, Venkateswara Rao Nandigam wrote: I have a question related this topic. So How do you set the RSS Key on the Mellanox NIc? I mean from your Guest? I believe it's possible but not implemented currently. The issue is the implementation should not be vendor specific.

Re: [PATCH net-next RFC 1/3] virtio: support for urgent descriptors

2014-10-16 Thread Jason Wang
On 10/15/2014 01:40 PM, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: Below should be useful for some experiments Jason is doing. I thought I'd send it out for early review/feedback. event idx feature allows us to defer interrupts until a specific # of descriptors were used

Re: [PATCH net-next RFC 0/3] virtio-net: Conditionally enable tx interrupt

2014-10-15 Thread Jason Wang
On 10/15/2014 07:06 AM, Michael S. Tsirkin wrote: On Tue, Oct 14, 2014 at 02:53:27PM -0400, David Miller wrote: From: Jason Wang jasow...@redhat.com Date: Sat, 11 Oct 2014 15:16:43 +0800 We free old transmitted packets in ndo_start_xmit() currently, so any packet must be orphaned

Re: [PATCH net-next RFC 0/3] virtio-net: Conditionally enable tx interrupt

2014-10-14 Thread Jason Wang
On 10/15/2014 05:51 AM, Michael S. Tsirkin wrote: On Tue, Oct 14, 2014 at 02:53:27PM -0400, David Miller wrote: From: Jason Wang jasow...@redhat.com Date: Sat, 11 Oct 2014 15:16:43 +0800 We free old transmitted packets in ndo_start_xmit() currently, so any packet must be orphaned also

Re: [PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt

2014-10-14 Thread Jason Wang
On 10/15/2014 05:51 AM, Michael S. Tsirkin wrote: On Sat, Oct 11, 2014 at 03:16:46PM +0800, Jason Wang wrote: We free transmitted packets in ndo_start_xmit() in the past to get better performance in the past. One side effect is that skb_orphan() needs to be called in ndo_start_xmit() which

Re: [PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt

2014-10-13 Thread Jason Wang
On 10/11/2014 10:48 PM, Eric Dumazet wrote: On Sat, 2014-10-11 at 15:16 +0800, Jason Wang wrote: We free transmitted packets in ndo_start_xmit() in the past to get better performance in the past. One side effect is that skb_orphan() needs to be called in ndo_start_xmit() which makes

Re: [PATCH net-next RFC 1/3] virtio: support for urgent descriptors

2014-10-13 Thread Jason Wang
On 10/12/2014 05:27 PM, Michael S. Tsirkin wrote: On Sat, Oct 11, 2014 at 03:16:44PM +0800, Jason Wang wrote: Below should be useful for some experiments Jason is doing. I thought I'd send it out for early review/feedback. event idx feature allows us to defer interrupts until a specific

[PATCH net-next RFC 0/3] virtio-net: Conditionally enable tx interrupt

2014-10-11 Thread Jason Wang
on mlx4 was ongoing, will post the result in next week. Jason Wang (3): virtio: support for urgent descriptors vhost: support urgent descriptors virtio-net: conditionally enable tx interrupt drivers/net/virtio_net.c | 164 ++- drivers/vhost/net.c

[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt

2014-10-11 Thread Jason Wang
in ndo_start_xmit() but enable tx interrupt for those packets. After we get tx interrupt, a tx napi was scheduled to free those packets. With this method, sk_wmem_alloc of TCP socket were more accurate than in the past which let TCP can batch more through TSQ and auto corking. Signed-off-by: Jason Wang jasow

[PATCH net-next RFC 2/3] vhost: support urgent descriptors

2014-10-11 Thread Jason Wang
This patches let vhost-net support urgent descriptors. For zerocopy case, two new types of length was introduced to make it work. Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c | 43

  1   2   3   4   5   6   7   8   >