Re: [PATCH RFC 1/4] vsock/virtio: reduce credit update messages

2019-04-19 Thread Stefano Garzarella
On Thu, Apr 04, 2019 at 08:15:39PM +0100, Stefan Hajnoczi wrote: > On Thu, Apr 04, 2019 at 12:58:35PM +0200, Stefano Garzarella wrote: > > @@ -256,6 +257,7 @@ virtio_transport_stream_do_dequeue(struct vsock_sock > > *vsk, > > struct virtio_vsock_sock *vvs = vsk->trans; > > struct

[PATCH RFC 1/4] vsock/virtio: reduce credit update messages

2019-04-19 Thread Stefano Garzarella
In order to reduce the number of credit update messages, we send them only when the space available seen by the transmitter is less than VIRTIO_VSOCK_MAX_PKT_BUF_SIZE. Signed-off-by: Stefano Garzarella --- include/linux/virtio_vsock.h| 1 + net/vmw_vsock/virtio_transport_common.c |

Re: [PATCH RFC 1/4] vsock/virtio: reduce credit update messages

2019-04-08 Thread Stefan Hajnoczi
On Fri, Apr 05, 2019 at 10:16:48AM +0200, Stefano Garzarella wrote: > On Thu, Apr 04, 2019 at 08:15:39PM +0100, Stefan Hajnoczi wrote: > > On Thu, Apr 04, 2019 at 12:58:35PM +0200, Stefano Garzarella wrote: > > > int err = -EFAULT; > > > > > > spin_lock_bh(>rx_lock); > > > @@ -288,9 +290,15

Re: [PATCH RFC 1/4] vsock/virtio: reduce credit update messages

2019-04-04 Thread Stefan Hajnoczi
On Thu, Apr 04, 2019 at 12:58:35PM +0200, Stefano Garzarella wrote: > @@ -256,6 +257,7 @@ virtio_transport_stream_do_dequeue(struct vsock_sock *vsk, > struct virtio_vsock_sock *vvs = vsk->trans; > struct virtio_vsock_pkt *pkt; > size_t bytes, total = 0; > + s64 free_space;