RE: [Qemu-devel] [PATCH kernel v5 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration

2016-12-08 Thread Li, Liang Z
> On 12/08/2016 08:45 PM, Li, Liang Z wrote: > > What's the conclusion of your discussion? It seems you want some > > statistic before deciding whether to ripping the bitmap from the ABI, > > am I right? > > I think Andrea and David feel pretty strongly that we should remove the > bitmap, unless

Re: [Qemu-devel] [PATCH kernel v5 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration

2016-12-08 Thread Dave Hansen
On 12/08/2016 08:45 PM, Li, Liang Z wrote: > What's the conclusion of your discussion? It seems you want some > statistic before deciding whether to ripping the bitmap from the > ABI, am I right? I think Andrea and David feel pretty strongly that we should remove the bitmap, unless we have some d

RE: [Qemu-devel] [PATCH kernel v5 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration

2016-12-08 Thread Li, Liang Z
> > 1. Current patches do a hypercall for each order in the allocator. > >This is inefficient, but independent from the underlying data > >structure in the ABI, unless bitmaps are in play, which they aren't. > > 2. Should we have bitmaps in the ABI, even if they are not in use by the > >

RE: [PATCH kernel v5 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration

2016-12-08 Thread Li, Liang Z
> Subject: Re: [PATCH kernel v5 0/5] Extend virtio-balloon for fast > (de)inflating > & fast live migration > > On 12/07/2016 05:35 AM, Li, Liang Z wrote: > >> Am 30.11.2016 um 09:43 schrieb Liang Li: > >> IOW in real examples, do we have really large consecutive areas or > >> are all pages just

Re: [PATCH-RESEND] vhost-vsock: fix orphan connection reset

2016-12-08 Thread David Miller
From: Peng Tao Date: Fri, 9 Dec 2016 01:10:46 +0800 > local_addr.svm_cid is host cid. We should check guest cid instead, > which is remote_addr.svm_cid. Otherwise we end up resetting all > connections to all guests. > > Cc: sta...@vger.kernel.org [4.8+] > Reviewed-by: Stefan Hajnoczi > Signed-

[PATCH v3 4/4] vsock: cancel packets when failing to connect

2016-12-08 Thread Peng Tao
Otherwise we'll leave the packets queued until releasing vsock device. E.g., if guest is slow to start up, resulting ETIMEDOUT on connect, guest will get the connect requests from failed host sockets. Reviewed-by: Stefan Hajnoczi Signed-off-by: Peng Tao --- net/vmw_vsock/af_vsock.c | 14 +++

[PATCH v3 3/4] vsock: add pkt cancel capability

2016-12-08 Thread Peng Tao
Reviewed-by: Stefan Hajnoczi Signed-off-by: Peng Tao --- net/vmw_vsock/virtio_transport.c | 42 1 file changed, 42 insertions(+) diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index 936d7ee..95c1162 100644 --- a/net/vmw_

[PATCH v3 2/4] vhost-vsock: add pkt cancel capability

2016-12-08 Thread Peng Tao
To allow canceling all packets of a connection. Reviewed-by: Stefan Hajnoczi Signed-off-by: Peng Tao --- drivers/vhost/vsock.c | 41 + include/net/af_vsock.h | 3 +++ 2 files changed, 44 insertions(+) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/

[PATCH v3 1/4] vsock: track pkt owner vsock

2016-12-08 Thread Peng Tao
So that we can cancel a queued pkt later if necessary. Signed-off-by: Peng Tao --- include/linux/virtio_vsock.h| 2 ++ net/vmw_vsock/virtio_transport_common.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h index

[PATCH v3 0/4] vsock: cancel connect packets when failing to connect

2016-12-08 Thread Peng Tao
Currently, if a connect call fails on a signal or timeout (e.g., guest is still in the process of starting up), we'll just return to caller and leave the connect packet queued and they are sent even though the connection is considered a failure, which can confuse applications with unwanted false

[PATCH-RESEND] vhost-vsock: fix orphan connection reset

2016-12-08 Thread Peng Tao
local_addr.svm_cid is host cid. We should check guest cid instead, which is remote_addr.svm_cid. Otherwise we end up resetting all connections to all guests. Cc: sta...@vger.kernel.org [4.8+] Reviewed-by: Stefan Hajnoczi Signed-off-by: Peng Tao --- resending because the last attempt looks to be

Re: [PATCH 2/2] x86, paravirt: Fix bool return type for PVOP_CALL

2016-12-08 Thread Peter Zijlstra
On Fri, Dec 09, 2016 at 12:40:35AM +0800, Pan Xinhui wrote: > > hi, Peter > I think I know the point. > > then could we just let __eax rettype(here is bool), not unsigned long? > I does not do tests for my thoughts. > > @@ -461,7 +461,9 @@ int paravirt_disable_iospace(void); > #define PVO

Re: [PATCH 1/2] virtio_ring: Do not call dma_map_page if sg is already mapped.

2016-12-08 Thread Michael S. Tsirkin
On Wed, Dec 07, 2016 at 10:59:12PM -0800, Wendy Liang wrote: > If sg is already dma mapped, do not call dma_map_page() in > vring_map_one_sg(). > > In case of rpmsg, rpmsg uses dma_alloc_coherent() to allocate > memory to share with the remote. There is no pages setup > in dma_alloc_coherent(). >

Re: [PATCH 2/2] x86, paravirt: Fix bool return type for PVOP_CALL

2016-12-08 Thread Pan Xinhui
hi, Peter I think I know the point. then could we just let __eax rettype(here is bool), not unsigned long? I does not do tests for my thoughts. @@ -461,7 +461,9 @@ int paravirt_disable_iospace(void); #define PVOP_VCALL_ARGS \

Re: [PATCH 2/2] vhost: remove unnecessary smp_mb from vhost_work_queue

2016-12-08 Thread David Miller
From: Peng Tao Date: Wed, 7 Dec 2016 17:52:19 +0800 > test_and_set_bit() already implies a memory barrier. > > Signed-off-by: Peng Tao Applied. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.o

Re: [PATCH 1/2] vhost-vsock: remove unused vq variable

2016-12-08 Thread David Miller
From: Peng Tao Date: Wed, 7 Dec 2016 17:52:18 +0800 > Signed-off-by: Peng Tao Applied. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH] linux/types.h: enable endian checks for all sparse builds

2016-12-08 Thread Michael S. Tsirkin
On Thu, Dec 08, 2016 at 06:38:11AM +, Bart Van Assche wrote: > On 12/07/16 21:54, Michael S. Tsirkin wrote: > > On Thu, Dec 08, 2016 at 05:21:47AM +, Bart Van Assche wrote: > >> Additionally, there are notable exceptions to the rule that most drivers > >> are endian-clean, e.g. drivers/scsi

[PATCH 0/2] Fix paravirt fail

2016-12-08 Thread Peter Zijlstra
Two patches that cure fallout from commit: 3cded4179481 ("x86/paravirt: Optimize native pv_lock_ops.vcpu_is_preempted()") ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/vi

[PATCH 2/2] x86, paravirt: Fix bool return type for PVOP_CALL

2016-12-08 Thread Peter Zijlstra
Commit 3cded4179481 ("x86/paravirt: Optimize native pv_lock_ops.vcpu_is_preempted()") introduced a paravirt op with bool return type [*] It turns out that the PVOP_CALL*() macros miscompile when rettype is bool. Code that looked like: 83 ef 01sub$0x1,%edi ff 15 32 a0 d8

[PATCH 1/2] x86,paravirt: Fix native_patch()

2016-12-08 Thread Peter Zijlstra
While chasing a regression I noticed we potentially patch the wrong code in native_patch(). If we do not select the native code sequence, we must use the default patcher, not fall-through the switch case. Fixes: 3cded4179481 ("x86/paravirt: Optimize native pv_lock_ops.vcpu_is_preempted()") Signe

Re: [PATCH 08/10] vsock/virtio: mark an internal function static

2016-12-08 Thread Michael S. Tsirkin
On Wed, Dec 07, 2016 at 12:21:22PM +0800, Jason Wang wrote: > > > On 2016年12月06日 23:41, Michael S. Tsirkin wrote: > > virtio_transport_alloc_pkt is only used locally, make it static. > > > > Signed-off-by: Michael S. Tsirkin > > --- > > net/vmw_vsock/virtio_transport_common.c | 2 +- > > 1 f

Re: [PATCH] linux/types.h: enable endian checks for all sparse builds

2016-12-08 Thread Bart Van Assche
On 12/07/16 21:54, Michael S. Tsirkin wrote: > On Thu, Dec 08, 2016 at 05:21:47AM +, Bart Van Assche wrote: >> Additionally, there are notable exceptions to the rule that most drivers >> are endian-clean, e.g. drivers/scsi/qla2xxx. I would appreciate it if it >> would remain possible to check s

Re: [PATCH] linux/types.h: enable endian checks for all sparse builds

2016-12-08 Thread Bart Van Assche
On 12/07/16 18:29, Michael S. Tsirkin wrote: > By now, linux is mostly endian-clean. Enabling endian-ness > checks for everyone produces about 200 new sparse warnings for me - > less than 10% over the 2000 sparse warnings already there. > > Not a big deal, OTOH enabling this helps people notice > t

Re: [PATCH] linux/types.h: enable endian checks for all sparse builds

2016-12-08 Thread Cornelia Huck
On Thu, 8 Dec 2016 04:29:39 +0200 "Michael S. Tsirkin" wrote: > By now, linux is mostly endian-clean. Enabling endian-ness > checks for everyone produces about 200 new sparse warnings for me - > less than 10% over the 2000 sparse warnings already there. Out of curiousity: Where do most of those

Re: [PATCH] vhost-vsock: fix orphan connection reset

2016-12-08 Thread Stefan Hajnoczi
On Wed, Dec 07, 2016 at 05:45:47PM +0800, Peng Tao wrote: > local_addr.svm_cid is host cid. We should check guest cid instead, > which is remote_addr.svm_cid. > > Cc: Stefan Hajnoczi > Cc: sta...@vger.kernel.org #4.8+ > Signed-off-by: Peng Tao > --- > drivers/vhost/vsock.c | 2 +- > 1 file chan

Re: [PATCH] linux/types.h: enable endian checks for all sparse builds

2016-12-08 Thread Greg Kroah-Hartman
On Thu, Dec 08, 2016 at 06:38:11AM +, Bart Van Assche wrote: > On 12/07/16 21:54, Michael S. Tsirkin wrote: > > On Thu, Dec 08, 2016 at 05:21:47AM +, Bart Van Assche wrote: > >> Additionally, there are notable exceptions to the rule that most drivers > >> are endian-clean, e.g. drivers/scsi

Re: [PATCH v2 1/4] vsock: track pkt owner vsock

2016-12-08 Thread Peng Tao
On Thu, Dec 8, 2016 at 5:30 PM, Stefan Hajnoczi wrote: > On Wed, Dec 07, 2016 at 11:14:09PM +0800, Peng Tao wrote: >> So that we can cancel a queued pkt later if necessary. >> >> Signed-off-by: Peng Tao >> --- >> include/linux/virtio_vsock.h| 2 ++ >> net/vmw_vsock/virtio_transport_c

Re: [PATCH v2 4/4] vsock: cancel packets when failing to connect

2016-12-08 Thread Peng Tao
On Thu, Dec 8, 2016 at 5:24 PM, Stefan Hajnoczi wrote: > On Wed, Dec 07, 2016 at 11:14:12PM +0800, Peng Tao wrote: >> Otherwise we'll leave the packets queued until releasing vsock device. >> E.g., if guest is slow to start up, resulting ETIMEDOUT on connect, guest >> will get the connect requests

Re: [PATCH v2 3/4] vsock: add pkt cancel capability

2016-12-08 Thread Stefan Hajnoczi
On Wed, Dec 07, 2016 at 11:14:11PM +0800, Peng Tao wrote: > Signed-off-by: Peng Tao > --- > net/vmw_vsock/virtio_transport.c | 42 > > 1 file changed, 42 insertions(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature _

Re: [PATCH v2 2/4] vhost-vsock: add pkt cancel capability

2016-12-08 Thread Stefan Hajnoczi
On Wed, Dec 07, 2016 at 11:14:10PM +0800, Peng Tao wrote: > To allow canceling all packets of a connection. > > Signed-off-by: Peng Tao > --- > drivers/vhost/vsock.c| 41 + > include/linux/virtio_vsock.h | 3 +++ > 2 files changed, 44 insertions(+

Re: [PATCH v2 1/4] vsock: track pkt owner vsock

2016-12-08 Thread Stefan Hajnoczi
On Wed, Dec 07, 2016 at 11:14:09PM +0800, Peng Tao wrote: > So that we can cancel a queued pkt later if necessary. > > Signed-off-by: Peng Tao > --- > include/linux/virtio_vsock.h| 2 ++ > net/vmw_vsock/virtio_transport_common.c | 7 +++ > 2 files changed, 9 insertions(+) > > di

Re: [PATCH v2 4/4] vsock: cancel packets when failing to connect

2016-12-08 Thread Stefan Hajnoczi
On Wed, Dec 07, 2016 at 11:14:12PM +0800, Peng Tao wrote: > Otherwise we'll leave the packets queued until releasing vsock device. > E.g., if guest is slow to start up, resulting ETIMEDOUT on connect, guest > will get the connect requests from failed host sockets. > > Reviewed-by: Stefan Hajnoczi