search for: virtqueue_add_buf_gfp

Displaying 20 results from an estimated 40 matches for "virtqueue_add_buf_gfp".

2011 Nov 03
1
[PATCH 2 of 5] virtio: rename virtqueue_add_buf_gfp to virtqueue_add_buf
...ell Host to go! */ virtqueue_kick(out_vq); diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -368,7 +368,7 @@ static int add_recvbuf_small(struct virt skb_to_sgvec(skb, vi->rx_sg + 1, 0, skb->len); - err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, 2, skb, gfp); + err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, 2, skb, gfp); if (err < 0) dev_kfree_skb(skb); @@ -413,8 +413,8 @@ static int add_recvbuf_big(struct virtne /* chain first in list head */ first->private = (unsigned long)list; - err...
2011 Nov 03
1
[PATCH 2 of 5] virtio: rename virtqueue_add_buf_gfp to virtqueue_add_buf
...ell Host to go! */ virtqueue_kick(out_vq); diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -368,7 +368,7 @@ static int add_recvbuf_small(struct virt skb_to_sgvec(skb, vi->rx_sg + 1, 0, skb->len); - err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, 2, skb, gfp); + err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, 2, skb, gfp); if (err < 0) dev_kfree_skb(skb); @@ -413,8 +413,8 @@ static int add_recvbuf_big(struct virtne /* chain first in list head */ first->private = (unsigned long)list; - err...
2010 Jul 23
2
[PATCH] virtio: fix oops on OOM
...Russell <rusty at rustcorp.com.au> Tested-by: Chris Mason <chris.mason at oracle.com> --- diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index dd35b34..bffec32 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -164,7 +164,8 @@ int virtqueue_add_buf_gfp(struct virtqueue *_vq, gfp_t gfp) { struct vring_virtqueue *vq = to_vvq(_vq); - unsigned int i, avail, head, uninitialized_var(prev); + unsigned int i, avail, uninitialized_var(prev); + int head; START_USE(vq); @@ -174,8 +175,8 @@ int virtqueue_add_buf_gfp(struct virtqueue *_vq, *...
2010 Jul 23
2
[PATCH] virtio: fix oops on OOM
...Russell <rusty at rustcorp.com.au> Tested-by: Chris Mason <chris.mason at oracle.com> --- diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index dd35b34..bffec32 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -164,7 +164,8 @@ int virtqueue_add_buf_gfp(struct virtqueue *_vq, gfp_t gfp) { struct vring_virtqueue *vq = to_vvq(_vq); - unsigned int i, avail, head, uninitialized_var(prev); + unsigned int i, avail, uninitialized_var(prev); + int head; START_USE(vq); @@ -174,8 +175,8 @@ int virtqueue_add_buf_gfp(struct virtqueue *_vq, *...
2011 Nov 03
0
[PATCH 1/5] virtio: document functions better.
...r - * vq: the struct virtqueue we're talking about. - * Returns NULL or the "data" token handed to add_buf - * virtqueue_get_vring_size: return the size of the virtqueue's vring - * vq: the struct virtqueue containing the vring of interest. - * Returns the size of the vring. + * virtqueue_add_buf_gfp - expose buffer to other end + * @vq: the struct virtqueue we're talking about. + * @sg: the description of the buffer(s). + * @out_num: the number of sg readable by other side + * @in_num: the number of sg which are writable (after readable ones) + * @data: the token identifying the buffer. +...
2011 Nov 03
0
[PATCH 1/5] virtio: document functions better.
...r - * vq: the struct virtqueue we're talking about. - * Returns NULL or the "data" token handed to add_buf - * virtqueue_get_vring_size: return the size of the virtqueue's vring - * vq: the struct virtqueue containing the vring of interest. - * Returns the size of the vring. + * virtqueue_add_buf_gfp - expose buffer to other end + * @vq: the struct virtqueue we're talking about. + * @sg: the description of the buffer(s). + * @out_num: the number of sg readable by other side + * @in_num: the number of sg which are writable (after readable ones) + * @data: the token identifying the buffer. +...
2011 Nov 03
1
[PATCH 1 of 5] virtio: document functions better
...r - * vq: the struct virtqueue we're talking about. - * Returns NULL or the "data" token handed to add_buf - * virtqueue_get_vring_size: return the size of the virtqueue's vring - * vq: the struct virtqueue containing the vring of interest. - * Returns the size of the vring. + * virtqueue_add_buf_gfp - expose buffer to other end + * @vq: the struct virtqueue we're talking about. + * @sg: the description of the buffer(s). + * @out_num: the number of sg readable by other side + * @in_num: the number of sg which are writable (after readable ones) + * @data: the token identifying the buffer. +...
2011 Nov 03
1
[PATCH 1 of 5] virtio: document functions better
...r - * vq: the struct virtqueue we're talking about. - * Returns NULL or the "data" token handed to add_buf - * virtqueue_get_vring_size: return the size of the virtqueue's vring - * vq: the struct virtqueue containing the vring of interest. - * Returns the size of the vring. + * virtqueue_add_buf_gfp - expose buffer to other end + * @vq: the struct virtqueue we're talking about. + * @sg: the description of the buffer(s). + * @out_num: the number of sg readable by other side + * @in_num: the number of sg which are writable (after readable ones) + * @data: the token identifying the buffer. +...
2011 Sep 07
3
[RFC v2 0/2] virtio: Support releasing lock during kick
This patch allows virtio-blk to release its block queue lock while kicking the host. This improves scalability on SMP guests who would otherwise spin on the lock while another vCPU is kicking the host. This approach can be used for other virtio devices too. It simply splits the virtqueue_kick() operation into a prepare step which requires that the lock be held and the actual notify step which
2011 Sep 07
3
[RFC v2 0/2] virtio: Support releasing lock during kick
This patch allows virtio-blk to release its block queue lock while kicking the host. This improves scalability on SMP guests who would otherwise spin on the lock while another vCPU is kicking the host. This approach can be used for other virtio devices too. It simply splits the virtqueue_kick() operation into a prepare step which requires that the lock be held and the actual notify step which
2011 Nov 29
1
[PATCH] virtio-ring: Use threshold for switching to indirect descriptors
.....5e0ce15 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -82,6 +82,7 @@ struct vring_virtqueue /* Host supports indirect buffers */ bool indirect; + unsigned int indirect_threshold; /* Host publishes avail event idx */ bool event; @@ -176,8 +177,9 @@ int virtqueue_add_buf_gfp(struct virtqueue *_vq, BUG_ON(data == NULL); /* If the host supports indirect descriptor tables, and we have multiple - * buffers, then go indirect. FIXME: tune this threshold */ - if (vq->indirect && (out + in) > 1 && vq->num_free) { + * buffers, then go indirect....
2011 Nov 29
1
[PATCH] virtio-ring: Use threshold for switching to indirect descriptors
.....5e0ce15 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -82,6 +82,7 @@ struct vring_virtqueue /* Host supports indirect buffers */ bool indirect; + unsigned int indirect_threshold; /* Host publishes avail event idx */ bool event; @@ -176,8 +177,9 @@ int virtqueue_add_buf_gfp(struct virtqueue *_vq, BUG_ON(data == NULL); /* If the host supports indirect descriptor tables, and we have multiple - * buffers, then go indirect. FIXME: tune this threshold */ - if (vq->indirect && (out + in) > 1 && vq->num_free) { + * buffers, then go indirect....
2012 Jan 04
4
[RFC PATCH v1 0/2] virtio_net: Better low memory handling.
The following series applies to net-next. The following series changes the low memory paths in virtio_net to allow the driver to contribute to reclaim when memory is tight. It attempts to rectify some performance problems we've seen where the network performance drops significantly when memory is low. The working theory is that while the driver contributes to memory pressure when throughput
2012 Jan 04
4
[RFC PATCH v1 0/2] virtio_net: Better low memory handling.
The following series applies to net-next. The following series changes the low memory paths in virtio_net to allow the driver to contribute to reclaim when memory is tight. It attempts to rectify some performance problems we've seen where the network performance drops significantly when memory is low. The working theory is that while the driver contributes to memory pressure when throughput
2010 Sep 29
1
[RFC PATCH] virtio: (Partially) enable suspend/resume support
...amp;vp_dev->vdev, VIRTIO_CONFIG_S_DRIVER_OK); + return 0; } #endif diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 1475ed6..3eb91d1 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -237,6 +237,14 @@ add_head: } EXPORT_SYMBOL_GPL(virtqueue_add_buf_gfp); +u16 virtqueue_get_avail_idx(struct virtqueue *_vq) +{ + struct vring_virtqueue *vq = to_vvq(_vq); + + return vq->vring.avail->idx; +} +EXPORT_SYMBOL_GPL(virtqueue_get_avail_idx); + void virtqueue_kick(struct virtqueue *_vq) { struct vring_virtqueue *vq = to_vvq(_vq); diff --git a/inc...
2010 Sep 29
1
[RFC PATCH] virtio: (Partially) enable suspend/resume support
...amp;vp_dev->vdev, VIRTIO_CONFIG_S_DRIVER_OK); + return 0; } #endif diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 1475ed6..3eb91d1 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -237,6 +237,14 @@ add_head: } EXPORT_SYMBOL_GPL(virtqueue_add_buf_gfp); +u16 virtqueue_get_avail_idx(struct virtqueue *_vq) +{ + struct vring_virtqueue *vq = to_vvq(_vq); + + return vq->vring.avail->idx; +} +EXPORT_SYMBOL_GPL(virtqueue_get_avail_idx); + void virtqueue_kick(struct virtqueue *_vq) { struct vring_virtqueue *vq = to_vvq(_vq); diff --git a/inc...
2012 Jan 10
3
[PATCH v2 0/3] virtio_net: Better low memory handling.
The following series applies to net-next. The following series changes the low memory paths in virtio_net to not disable NAPI while waiting in the allocator in the slow path. It attempts to rectify some performance problems we've seen where the network performance drops significantly when memory is low. The working theory is that the disabling of NAPI while allocations are occuring in the
2012 Jan 10
3
[PATCH v2 0/3] virtio_net: Better low memory handling.
The following series applies to net-next. The following series changes the low memory paths in virtio_net to not disable NAPI while waiting in the allocator in the slow path. It attempts to rectify some performance problems we've seen where the network performance drops significantly when memory is low. The working theory is that the disabling of NAPI while allocations are occuring in the
2011 Apr 23
1
[RFC PATCH TRIVIAL] Reading the virtio code...
...s.com> --- drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index b0043fb..2b69441 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -173,7 +173,7 @@ int virtqueue_add_buf_gfp(struct virtqueue *_vq, /* If the host supports indirect descriptor tables, and we have multiple * buffers, then go indirect. FIXME: tune this threshold */ - if (vq->indirect && (out + in) > 1 && vq->num_free) { + if (vq->indirect && (out + in) > 2 &...
2011 Apr 23
1
[RFC PATCH TRIVIAL] Reading the virtio code...
...s.com> --- drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index b0043fb..2b69441 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -173,7 +173,7 @@ int virtqueue_add_buf_gfp(struct virtqueue *_vq, /* If the host supports indirect descriptor tables, and we have multiple * buffers, then go indirect. FIXME: tune this threshold */ - if (vq->indirect && (out + in) > 1 && vq->num_free) { + if (vq->indirect && (out + in) > 2 &...