Displaying 9 results from an estimated 9 matches for "virtqueue_indirect_desc_table_add".
2017 Jun 20
2
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
On Fri, Jun 09, 2017 at 06:41:41PM +0800, Wei Wang wrote:
> - if (!virtqueue_indirect_desc_table_add(vq, desc, num)) {
> + if (!virtqueue_indirect_desc_table_add(vq, desc, *num)) {
> virtqueue_kick(vq);
> - wait_event(vb->acked, virtqueue_get_buf(vq, &len));
> - vb->balloon_page_chunk.chunk_num = 0;
> + if (busy_wait)
> + while (!virtqueue_get_buf(vq, &len)...
2017 Jun 20
2
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
On Fri, Jun 09, 2017 at 06:41:41PM +0800, Wei Wang wrote:
> - if (!virtqueue_indirect_desc_table_add(vq, desc, num)) {
> + if (!virtqueue_indirect_desc_table_add(vq, desc, *num)) {
> virtqueue_kick(vq);
> - wait_event(vb->acked, virtqueue_get_buf(vq, &len));
> - vb->balloon_page_chunk.chunk_num = 0;
> + if (busy_wait)
> + while (!virtqueue_get_buf(vq, &len)...
2017 Jul 12
0
[virtio-dev] Re: [PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
...On 06/21/2017 08:28 PM, Michael S. Tsirkin wrote:
>>> On Wed, Jun 21, 2017 at 11:28:00AM +0800, Wei Wang wrote:
>>>> On 06/21/2017 12:18 AM, Michael S. Tsirkin wrote:
>>>>> On Fri, Jun 09, 2017 at 06:41:41PM +0800, Wei Wang wrote:
>>>>>> - if (!virtqueue_indirect_desc_table_add(vq, desc, num)) {
>>>>>> + if (!virtqueue_indirect_desc_table_add(vq, desc, *num)) {
>>>>>> virtqueue_kick(vq);
>>>>>> - wait_event(vb->acked, virtqueue_get_buf(vq, &len));
>>>>>> - vb->balloon_page_chunk.chun...
2017 Jun 09
0
[PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...ge_chunk.page_bmap[i], 0,
+ VIRTIO_BALLOON_PAGE_BMAP_SIZE);
+}
+
+static void send_page_chunks(struct virtio_balloon *vb, struct virtqueue *vq)
+{
+ unsigned int len, num;
+ struct vring_desc *desc = vb->balloon_page_chunk.desc_table;
+
+ num = vb->balloon_page_chunk.chunk_num;
+ if (!virtqueue_indirect_desc_table_add(vq, desc, num)) {
+ virtqueue_kick(vq);
+ wait_event(vb->acked, virtqueue_get_buf(vq, &len));
+ vb->balloon_page_chunk.chunk_num = 0;
+ }
+}
+
+/* Add a chunk to the buffer. */
+static void add_one_chunk(struct virtio_balloon *vb, struct virtqueue *vq,
+ u64 base_addr, u32 size)
+{...
2017 Jun 09
11
[PATCH v11 0/6] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new
features:
1) fast ballooning: transfer ballooned pages between the guest and host in
chunks, instead of one by one; and
2) cmdq: a new virtqueue to send commands between the device and driver.
Currently, it supports commands to report memory stats (replace the old statq
mechanism) and report guest unused pages.
Liang Li
2017 Jun 09
11
[PATCH v11 0/6] Virtio-balloon Enhancement
This patch series enhances the existing virtio-balloon with the following new
features:
1) fast ballooning: transfer ballooned pages between the guest and host in
chunks, instead of one by one; and
2) cmdq: a new virtqueue to send commands between the device and driver.
Currently, it supports commands to report memory stats (replace the old statq
mechanism) and report guest unused pages.
Liang Li
2017 Jun 13
5
[PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...LLOON_PAGE_BMAP_SIZE);
> +}
> +
> +static void send_page_chunks(struct virtio_balloon *vb, struct virtqueue *vq)
> +{
> + unsigned int len, num;
> + struct vring_desc *desc = vb->balloon_page_chunk.desc_table;
> +
> + num = vb->balloon_page_chunk.chunk_num;
> + if (!virtqueue_indirect_desc_table_add(vq, desc, num)) {
> + virtqueue_kick(vq);
> + wait_event(vb->acked, virtqueue_get_buf(vq, &len));
> + vb->balloon_page_chunk.chunk_num = 0;
> + }
> +}
> +
> +/* Add a chunk to the buffer. */
> +static void add_one_chunk(struct virtio_balloon *vb, struct virtqueu...
2017 Jun 13
5
[PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...LLOON_PAGE_BMAP_SIZE);
> +}
> +
> +static void send_page_chunks(struct virtio_balloon *vb, struct virtqueue *vq)
> +{
> + unsigned int len, num;
> + struct vring_desc *desc = vb->balloon_page_chunk.desc_table;
> +
> + num = vb->balloon_page_chunk.chunk_num;
> + if (!virtqueue_indirect_desc_table_add(vq, desc, num)) {
> + virtqueue_kick(vq);
> + wait_event(vb->acked, virtqueue_get_buf(vq, &len));
> + vb->balloon_page_chunk.chunk_num = 0;
> + }
> +}
> +
> +/* Add a chunk to the buffer. */
> +static void add_one_chunk(struct virtio_balloon *vb, struct virtqueu...
2017 Jun 09
0
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
...is used for the cmdq_hdr, so chunks will be
+ * added from the second desc.
+ */
+ reset_num = 1;
+ break;
+ default:
+ dev_warn(&vb->vdev->dev, "%s: unknown page chunk type %d\n",
+ __func__, type);
+ return;
+ }
- num = vb->balloon_page_chunk.chunk_num;
- if (!virtqueue_indirect_desc_table_add(vq, desc, num)) {
+ if (!virtqueue_indirect_desc_table_add(vq, desc, *num)) {
virtqueue_kick(vq);
- wait_event(vb->acked, virtqueue_get_buf(vq, &len));
- vb->balloon_page_chunk.chunk_num = 0;
+ if (busy_wait)
+ while (!virtqueue_get_buf(vq, &len) &&
+ !virtque...