search for: virtio_vsock_buf

Displaying 19 results from an estimated 19 matches for "virtio_vsock_buf".

2019 May 16
2
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
On Fri, May 10, 2019 at 02:58:36PM +0200, Stefano Garzarella wrote: > +struct virtio_vsock_buf { Please add a comment describing the purpose of this struct and to differentiate its use from struct virtio_vsock_pkt. > +static struct virtio_vsock_buf * > +virtio_transport_alloc_buf(struct virtio_vsock_pkt *pkt, bool zero_copy) > +{ > + struct virtio_vsock_buf *buf; > + > +...
2019 May 16
2
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
On Fri, May 10, 2019 at 02:58:36PM +0200, Stefano Garzarella wrote: > +struct virtio_vsock_buf { Please add a comment describing the purpose of this struct and to differentiate its use from struct virtio_vsock_pkt. > +static struct virtio_vsock_buf * > +virtio_transport_alloc_buf(struct virtio_vsock_pkt *pkt, bool zero_copy) > +{ > + struct virtio_vsock_buf *buf; > + > +...
2019 May 12
1
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...sock.h > index e223e2632edd..345f04ee9193 100644 > --- a/include/linux/virtio_vsock.h > +++ b/include/linux/virtio_vsock.h > @@ -54,9 +54,17 @@ struct virtio_vsock_pkt { > void *buf; > u32 len; > u32 off; > + u32 buf_len; > bool reply; > }; > > +struct virtio_vsock_buf { > + struct list_head list; > + void *addr; > + u32 len; > + u32 off; > +}; > + > struct virtio_vsock_pkt_info { > u32 remote_cid, remote_port; > struct vsock_sock *vsk; > diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c > index...
2019 May 13
2
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...> index e223e2632edd..345f04ee9193 100644 > --- a/include/linux/virtio_vsock.h > +++ b/include/linux/virtio_vsock.h > @@ -54,9 +54,17 @@ struct virtio_vsock_pkt { > void *buf; > u32 len; > u32 off; > + u32 buf_len; > bool reply; > }; > > +struct virtio_vsock_buf { > + struct list_head list; > + void *addr; > + u32 len; > + u32 off; > +}; > + > struct virtio_vsock_pkt_info { > u32 remote_cid, remote_port; > struct vsock_sock *vsk; > diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c > in...
2019 May 13
2
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...> index e223e2632edd..345f04ee9193 100644 > --- a/include/linux/virtio_vsock.h > +++ b/include/linux/virtio_vsock.h > @@ -54,9 +54,17 @@ struct virtio_vsock_pkt { > void *buf; > u32 len; > u32 off; > + u32 buf_len; > bool reply; > }; > > +struct virtio_vsock_buf { > + struct list_head list; > + void *addr; > + u32 len; > + u32 off; > +}; > + > struct virtio_vsock_pkt_info { > u32 remote_cid, remote_port; > struct vsock_sock *vsk; > diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c > in...
2019 May 10
0
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...-git a/include/linux/virtio_vsock.h b/include/linux/virtio_vsock.h index e223e2632edd..345f04ee9193 100644 --- a/include/linux/virtio_vsock.h +++ b/include/linux/virtio_vsock.h @@ -54,9 +54,17 @@ struct virtio_vsock_pkt { void *buf; u32 len; u32 off; + u32 buf_len; bool reply; }; +struct virtio_vsock_buf { + struct list_head list; + void *addr; + u32 len; + u32 off; +}; + struct virtio_vsock_pkt_info { u32 remote_cid, remote_port; struct vsock_sock *vsk; diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index 15eb5d3d4750..af1d2ce12f54 100644 --- a/net/vmw_vsock/...
2019 May 15
2
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...>>>> @@ -54,9 +54,17 @@ struct virtio_vsock_pkt { >>>>> void *buf; >>>>> u32 len; >>>>> u32 off; >>>>> + u32 buf_len; >>>>> bool reply; >>>>> }; >>>>> +struct virtio_vsock_buf { >>>>> + struct list_head list; >>>>> + void *addr; >>>>> + u32 len; >>>>> + u32 off; >>>>> +}; >>>>> + >>>>> struct virtio_vsock_pkt_info { >>>>> u32 remote_cid, remote...
2019 May 15
2
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...>>>> @@ -54,9 +54,17 @@ struct virtio_vsock_pkt { >>>>> void *buf; >>>>> u32 len; >>>>> u32 off; >>>>> + u32 buf_len; >>>>> bool reply; >>>>> }; >>>>> +struct virtio_vsock_buf { >>>>> + struct list_head list; >>>>> + void *addr; >>>>> + u32 len; >>>>> + u32 off; >>>>> +}; >>>>> + >>>>> struct virtio_vsock_pkt_info { >>>>> u32 remote_cid, remote...
2019 May 17
0
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
On Thu, May 16, 2019 at 04:25:33PM +0100, Stefan Hajnoczi wrote: > On Fri, May 10, 2019 at 02:58:36PM +0200, Stefano Garzarella wrote: > > +struct virtio_vsock_buf { > > Please add a comment describing the purpose of this struct and to > differentiate its use from struct virtio_vsock_pkt. > Sure, I'll fix it. > > +static struct virtio_vsock_buf * > > +virtio_transport_alloc_buf(struct virtio_vsock_pkt *pkt, bool zero_copy) >...
2019 May 10
18
[PATCH v2 0/8] vsock/virtio: optimizations to increase the throughput
While I was testing this new series (v2) I discovered an huge use of memory and a memory leak in the virtio-vsock driver in the guest when I sent 1-byte packets to the guest. These issues are present since the introduction of the virtio-vsock driver. I added the patches 1 and 2 to fix them in this series in order to better track the performance trends. v1:
2019 May 10
18
[PATCH v2 0/8] vsock/virtio: optimizations to increase the throughput
While I was testing this new series (v2) I discovered an huge use of memory and a memory leak in the virtio-vsock driver in the guest when I sent 1-byte packets to the guest. These issues are present since the introduction of the virtio-vsock driver. I added the patches 1 and 2 to fix them in this series in order to better track the performance trends. v1:
2019 May 14
3
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...x/virtio_vsock.h >>> +++ b/include/linux/virtio_vsock.h >>> @@ -54,9 +54,17 @@ struct virtio_vsock_pkt { >>> void *buf; >>> u32 len; >>> u32 off; >>> + u32 buf_len; >>> bool reply; >>> }; >>> +struct virtio_vsock_buf { >>> + struct list_head list; >>> + void *addr; >>> + u32 len; >>> + u32 off; >>> +}; >>> + >>> struct virtio_vsock_pkt_info { >>> u32 remote_cid, remote_port; >>> struct vsock_sock *vsk; >>> diff...
2019 May 14
3
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...x/virtio_vsock.h >>> +++ b/include/linux/virtio_vsock.h >>> @@ -54,9 +54,17 @@ struct virtio_vsock_pkt { >>> void *buf; >>> u32 len; >>> u32 off; >>> + u32 buf_len; >>> bool reply; >>> }; >>> +struct virtio_vsock_buf { >>> + struct list_head list; >>> + void *addr; >>> + u32 len; >>> + u32 off; >>> +}; >>> + >>> struct virtio_vsock_pkt_info { >>> u32 remote_cid, remote_port; >>> struct vsock_sock *vsk; >>> diff...
2019 May 10
1
[PATCH v2 2/8] vsock/virtio: free packets during the socket release
...<sgarzare at redhat.com> Date: Fri, 10 May 2019 14:58:37 +0200 > @@ -827,12 +827,20 @@ static bool virtio_transport_close(struct vsock_sock *vsk) > > void virtio_transport_release(struct vsock_sock *vsk) > { > + struct virtio_vsock_sock *vvs = vsk->trans; > + struct virtio_vsock_buf *buf; > struct sock *sk = &vsk->sk; > bool remove_sock = true; > > lock_sock(sk); > if (sk->sk_type == SOCK_STREAM) > remove_sock = virtio_transport_close(vsk); > + while (!list_empty(&vvs->rx_queue)) { > + buf = list_first_entry(&vvs->r...
2019 May 13
0
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...644 > > --- a/include/linux/virtio_vsock.h > > +++ b/include/linux/virtio_vsock.h > > @@ -54,9 +54,17 @@ struct virtio_vsock_pkt { > > void *buf; > > u32 len; > > u32 off; > > + u32 buf_len; > > bool reply; > > }; > > +struct virtio_vsock_buf { > > + struct list_head list; > > + void *addr; > > + u32 len; > > + u32 off; > > +}; > > + > > struct virtio_vsock_pkt_info { > > u32 remote_cid, remote_port; > > struct vsock_sock *vsk; > > diff --git a/net/vmw_vsock/virtio_tran...
2019 May 28
0
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...9 at 11:25:34AM +0800, Jason Wang wrote: > > > On 2019/5/14 ??1:23, Stefano Garzarella wrote: > > > > On Mon, May 13, 2019 at 05:58:53PM +0800, Jason Wang wrote: > > > > > On 2019/5/10 ??8:58, Stefano Garzarella wrote: > > > > > > +static struct virtio_vsock_buf * > > > > > > +virtio_transport_alloc_buf(struct virtio_vsock_pkt *pkt, bool zero_copy) > > > > > > +{ > > > > > > + struct virtio_vsock_buf *buf; > > > > > > + > > > > > > + if (pkt->len == 0) > > &g...
2019 May 14
0
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
..._vsock.h > > > > @@ -54,9 +54,17 @@ struct virtio_vsock_pkt { > > > > void *buf; > > > > u32 len; > > > > u32 off; > > > > + u32 buf_len; > > > > bool reply; > > > > }; > > > > +struct virtio_vsock_buf { > > > > + struct list_head list; > > > > + void *addr; > > > > + u32 len; > > > > + u32 off; > > > > +}; > > > > + > > > > struct virtio_vsock_pkt_info { > > > > u32 remote_cid, remote_port; &gt...
2019 May 10
0
[PATCH v2 2/8] vsock/virtio: free packets during the socket release
...b 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -827,12 +827,20 @@ static bool virtio_transport_close(struct vsock_sock *vsk) void virtio_transport_release(struct vsock_sock *vsk) { + struct virtio_vsock_sock *vvs = vsk->trans; + struct virtio_vsock_buf *buf; struct sock *sk = &vsk->sk; bool remove_sock = true; lock_sock(sk); if (sk->sk_type == SOCK_STREAM) remove_sock = virtio_transport_close(vsk); + while (!list_empty(&vvs->rx_queue)) { + buf = list_first_entry(&vvs->rx_queue, + struct virtio_vsock...
2019 May 16
1
[PATCH v2 2/8] vsock/virtio: free packets during the socket release
...rder to avoid a memory > leak. > > Signed-off-by: Stefano Garzarella <sgarzare at redhat.com> > --- > net/vmw_vsock/virtio_transport_common.c | 8 ++++++++ > 1 file changed, 8 insertions(+) Ouch, this would be nice as a separate patch that can be merged right away (with s/virtio_vsock_buf/virtio_vsock_pkt/). -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: not available URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20190516/70384c84/attachment.sig&g...