search for: virtio_transport_alloc_buf

Displaying 16 results from an estimated 16 matches for "virtio_transport_alloc_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; > + > + if (pkt->len == 0) > + return NULL; > + > + buf = kzalloc(sizeof(*buf), GFP_KERNEL); > + if (!buf) > + return NULL; > + > + /* If the buffer in the virtio_vsock_pkt is...
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; > + > + if (pkt->len == 0) > + return NULL; > + > + buf = kzalloc(sizeof(*buf), GFP_KERNEL); > + if (!buf) > + return NULL; > + > + /* If the buffer in the virtio_vsock_pkt is...
2019 May 17
0
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...2: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) > > +{ > > + struct virtio_vsock_buf *buf; > > + > > + if (pkt->len == 0) > > + return NULL; > > + > > + buf = kzalloc(sizeof(*buf), GFP_KERNEL); > > + if (!buf) > > + return NULL; > > + &...
2019 May 12
1
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...+ pkt->buf_len = len; > + > err = memcpy_from_msg(pkt->buf, info->msg, len); > if (err) > goto out; > @@ -86,6 +89,46 @@ virtio_transport_alloc_pkt(struct virtio_vsock_pkt_info *info, > return NULL; > } > > +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) > + return NULL; > + > + buf = kzalloc(sizeof(*buf), GFP_KERNEL); > + if (!buf) > + return NULL; > + > + /* If the buffer in the virtio_vsock_pkt is...
2019 May 15
2
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...if (err) >>>>> goto out; >>>>> @@ -86,6 +89,46 @@ virtio_transport_alloc_pkt(struct virtio_vsock_pkt_info *info, >>>>> return NULL; >>>>> } >>>>> +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) >>>>> + return NULL; >>>>> + >>>>> + buf = kzalloc(sizeof(*buf...
2019 May 15
2
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...if (err) >>>>> goto out; >>>>> @@ -86,6 +89,46 @@ virtio_transport_alloc_pkt(struct virtio_vsock_pkt_info *info, >>>>> return NULL; >>>>> } >>>>> +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) >>>>> + return NULL; >>>>> + >>>>> + buf = kzalloc(sizeof(*buf...
2019 May 13
2
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...t->buf_len = len; > + > err = memcpy_from_msg(pkt->buf, info->msg, len); > if (err) > goto out; > @@ -86,6 +89,46 @@ virtio_transport_alloc_pkt(struct virtio_vsock_pkt_info *info, > return NULL; > } > > +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) > + return NULL; > + > + buf = kzalloc(sizeof(*buf), GFP_KERNEL); > + if (!buf) > + return NULL; > + > + /* If the buffer in the virtio_vsock_pkt is...
2019 May 13
2
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...t->buf_len = len; > + > err = memcpy_from_msg(pkt->buf, info->msg, len); > if (err) > goto out; > @@ -86,6 +89,46 @@ virtio_transport_alloc_pkt(struct virtio_vsock_pkt_info *info, > return NULL; > } > > +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) > + return NULL; > + > + buf = kzalloc(sizeof(*buf), GFP_KERNEL); > + if (!buf) > + return NULL; > + > + /* If the buffer in the virtio_vsock_pkt is...
2019 May 10
0
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
..._KERNEL); if (!pkt->buf) goto out_pkt; + + pkt->buf_len = len; + err = memcpy_from_msg(pkt->buf, info->msg, len); if (err) goto out; @@ -86,6 +89,46 @@ virtio_transport_alloc_pkt(struct virtio_vsock_pkt_info *info, return NULL; } +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) + return NULL; + + buf = kzalloc(sizeof(*buf), GFP_KERNEL); + if (!buf) + return NULL; + + /* If the buffer in the virtio_vsock_pkt is full, we can move it to + * the new virtio_vsock_buf a...
2019 May 14
3
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...om_msg(pkt->buf, info->msg, len); >>> if (err) >>> goto out; >>> @@ -86,6 +89,46 @@ virtio_transport_alloc_pkt(struct virtio_vsock_pkt_info *info, >>> return NULL; >>> } >>> +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) >>> + return NULL; >>> + >>> + buf = kzalloc(sizeof(*buf), GFP_KERNEL); >>> + if (!buf) >>> +...
2019 May 14
3
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...om_msg(pkt->buf, info->msg, len); >>> if (err) >>> goto out; >>> @@ -86,6 +89,46 @@ virtio_transport_alloc_pkt(struct virtio_vsock_pkt_info *info, >>> return NULL; >>> } >>> +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) >>> + return NULL; >>> + >>> + buf = kzalloc(sizeof(*buf), GFP_KERNEL); >>> + if (!buf) >>> +...
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 28
0
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...> 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) > > > > > > + return NULL; > > > > > &...
2019 May 13
0
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...> err = memcpy_from_msg(pkt->buf, info->msg, len); > > if (err) > > goto out; > > @@ -86,6 +89,46 @@ virtio_transport_alloc_pkt(struct virtio_vsock_pkt_info *info, > > return NULL; > > } > > +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) > > + return NULL; > > + > > + buf = kzalloc(sizeof(*buf), GFP_KERNEL); > > + if (!buf) > > + return NULL; > > + &...
2019 May 14
0
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...> > if (err) > > > > goto out; > > > > @@ -86,6 +89,46 @@ virtio_transport_alloc_pkt(struct virtio_vsock_pkt_info *info, > > > > return NULL; > > > > } > > > > +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) > > > > + return NULL; > > > > + > > > > + buf = kzalloc(sizeof(*buf), GFP_...