search for: balloon_flag_cont

Displaying 20 results from an estimated 28 matches for "balloon_flag_cont".

2016 Jul 27
2
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...ER_BYTE; > + if (!ret) { > + hdr->flag = cpu_to_virtio16(vb->vdev, > + BALLOON_FLAG_DONE); > + if (pfn + vb->pfn_limit > max_pfn) > + bmap_len = (max_pfn - pfn) / BITS_PER_BYTE; > + } else > + hdr->flag = cpu_to_virtio16(vb->vdev, > + BALLOON_FLAG_CONT); > + hdr->bmap_len = cpu_to_virtio64(vb->vdev, bmap_len); > + sg_init_one(&sg_out, hdr, > + sizeof(struct balloon_bmap_hdr) + bmap_len); Wait a second. This adds the same buffer multiple times in a loop. We will overwrite the buffer without waiting for hypervisor to proces...
2016 Jul 27
2
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...ER_BYTE; > + if (!ret) { > + hdr->flag = cpu_to_virtio16(vb->vdev, > + BALLOON_FLAG_DONE); > + if (pfn + vb->pfn_limit > max_pfn) > + bmap_len = (max_pfn - pfn) / BITS_PER_BYTE; > + } else > + hdr->flag = cpu_to_virtio16(vb->vdev, > + BALLOON_FLAG_CONT); > + hdr->bmap_len = cpu_to_virtio64(vb->vdev, bmap_len); > + sg_init_one(&sg_out, hdr, > + sizeof(struct balloon_bmap_hdr) + bmap_len); Wait a second. This adds the same buffer multiple times in a loop. We will overwrite the buffer without waiting for hypervisor to proces...
2017 Mar 16
0
[PATCH kernel v8 4/4] virtio-balloon: VIRTIO_BALLOON_F_HOST_REQ_VQ
...unsigned long req_id, unsigned int pos, + bool done) +{ + struct virtio_balloon_resp_hdr *hdr = vb->resp_hdr; + struct virtqueue *vq = vb->host_req_vq; + + vb->resp_pos = pos; + hdr->cmd = BALLOON_GET_UNUSED_PAGES; + hdr->id = cpu_to_le16(req_id); + if (!done) + hdr->flag = BALLOON_FLAG_CONT; + else + hdr->flag = BALLOON_FLAG_DONE; + + if (pos > 0 || done) + send_resp_data(vb, vq, true); + +} + +static void send_unused_pages(struct virtio_balloon *vb, + unsigned long req_id) +{ + struct scatterlist sg_in; + unsigned int pos = 0; + struct virtqueue *vq = vb->host_req_...
2016 Jul 28
0
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...hdr->flag = cpu_to_virtio16(vb->vdev, > > + > BALLOON_FLAG_DONE); > > + if (pfn + vb->pfn_limit > max_pfn) > > + bmap_len = (max_pfn - pfn) / > BITS_PER_BYTE; > > + } else > > + hdr->flag = cpu_to_virtio16(vb->vdev, > > + > BALLOON_FLAG_CONT); > > + hdr->bmap_len = cpu_to_virtio64(vb->vdev, bmap_len); > > + sg_init_one(&sg_out, hdr, > > + sizeof(struct balloon_bmap_hdr) + bmap_len); > > Wait a second. This adds the same buffer multiple times in a loop. > We will overwrite the buffer without wa...
2016 Oct 21
0
[RESEND PATCH v3 kernel 6/7] virtio-balloon: define feature bit and head for misc virt queue
...PFN in the balloon interface. */ #define VIRTIO_BALLOON_PFN_SHIFT 12 @@ -101,4 +102,25 @@ struct balloon_bmap_hdr { __virtio64 bmap_len; }; +enum balloon_req_id { + /* Get unused pages information */ + BALLOON_GET_UNUSED_PAGES, +}; + +enum balloon_flag { + /* Have more data for a request */ + BALLOON_FLAG_CONT, + /* No more data for a request */ + BALLOON_FLAG_DONE, +}; + +struct balloon_req_hdr { + /* Used to distinguish different request */ + __virtio16 cmd; + /* Reserved */ + __virtio16 reserved[3]; + /* Request parameter */ + __virtio64 param; +}; + #endif /* _LINUX_VIRTIO_BALLOON_H */ -- 1.8.3.1
2017 Mar 03
0
[PATCH v7 kernel 4/5] virtio-balloon: define flags and head for host request vq
...VIRTIO_BALLOON_PFN_SHIFT 12 @@ -94,4 +95,25 @@ struct virtio_balloon_resp_hdr { __le32 data_len; /* Payload len in bytes */ }; +enum virtio_balloon_req_id { + /* Get unused page information */ + BALLOON_GET_UNUSED_PAGES, +}; + +enum virtio_balloon_flag { + /* Have more data for a request */ + BALLOON_FLAG_CONT, + /* No more data for a request */ + BALLOON_FLAG_DONE, +}; + +struct virtio_balloon_req_hdr { + /* Used to distinguish different requests */ + __le16 cmd; + /* Reserved */ + __le16 reserved[3]; + /* Request parameter */ + __le64 param; +}; + #endif /* _LINUX_VIRTIO_BALLOON_H */ -- 2.7.4
2016 Jul 27
0
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...+ bmap_len = vb->pfn_limit / BITS_PER_BYTE; + if (!ret) { + hdr->flag = cpu_to_virtio16(vb->vdev, + BALLOON_FLAG_DONE); + if (pfn + vb->pfn_limit > max_pfn) + bmap_len = (max_pfn - pfn) / BITS_PER_BYTE; + } else + hdr->flag = cpu_to_virtio16(vb->vdev, + BALLOON_FLAG_CONT); + hdr->bmap_len = cpu_to_virtio64(vb->vdev, bmap_len); + sg_init_one(&sg_out, hdr, + sizeof(struct balloon_bmap_hdr) + bmap_len); + + virtqueue_add_outbuf(vq, &sg_out, 1, vb, GFP_KERNEL); + virtqueue_kick(vq); + pfn += vb->pfn_limit; + } + + sg_init_one(&sg_in, &v...
2016 Nov 02
0
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
...ap_len = BALLOON_BMAP_SIZE * vb->nr_page_bmap; + + if (!ret) { + hdr->flag = BALLOON_FLAG_DONE; + nr_pfn = last_pfn - pfn; + used_nr_bmap = nr_pfn / PFNS_PER_BMAP; + if (nr_pfn % PFNS_PER_BMAP) + used_nr_bmap++; + bmap_len = nr_pfn / BITS_PER_BYTE; + } else { + hdr->flag = BALLOON_FLAG_CONT; + used_nr_bmap = vb->nr_page_bmap; + } + for (i = 0; i < used_nr_bmap; i++) { + unsigned int bmap_size = BALLOON_BMAP_SIZE; + + if (i + 1 == used_nr_bmap) + bmap_size = bmap_len - BALLOON_BMAP_SIZE * i; + set_bulk_pages(vb, vq, pfn + i * PFNS_PER_BMAP, + vb->page_bitmap[i...
2017 Mar 16
8
[PATCH kernel v8 0/4] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch series implements two optimizations: 1) transfer pages in chuncks between the guest and host; 2) transfer the guest unused pages to the host so that they can be skipped to migrate in live migration. Please read each patch commit log for details. Changes: v7->v8: 1) Use only one chunk format, instead of two. 2) re-write the virtio-balloon implementation patch. 3) commit changes 4)
2017 Mar 16
8
[PATCH kernel v8 0/4] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch series implements two optimizations: 1) transfer pages in chuncks between the guest and host; 2) transfer the guest unused pages to the host so that they can be skipped to migrate in live migration. Please read each patch commit log for details. Changes: v7->v8: 1) Use only one chunk format, instead of two. 2) re-write the virtio-balloon implementation patch. 3) commit changes 4)
2016 Nov 30
0
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
...tinue; + } else + dev_warn(&vb->vdev->dev, + "%s: omit some %d order pages\n", + __func__, order); + } + + if (pos > 0) { + vb->resp_pos = pos; + hdr->cmd = BALLOON_GET_UNUSED_PAGES; + hdr->id = req_id; + if (order > 0) + hdr->flag = BALLOON_FLAG_CONT; + else + hdr->flag = BALLOON_FLAG_DONE; + + send_resp_data(vb, vq, true); + } + } + + mutex_unlock(&vb->balloon_lock); + sg_init_one(&sg_in, &vb->req_hdr, sizeof(vb->req_hdr)); + virtqueue_add_inbuf(vq, &sg_in, 1, &vb->req_hdr, GFP_KERNEL); + virtqueue_ki...
2017 Mar 03
0
[PATCH v7 kernel 5/5] This patch contains two parts:
..._balloon *vb, + unsigned long req_id, unsigned int pos, bool done) +{ + struct virtio_balloon_resp_hdr *hdr = &vb->resp_hdr; + struct virtqueue *vq = vb->host_req_vq; + + vb->resp_pos = pos; + hdr->cmd = BALLOON_GET_UNUSED_PAGES; + hdr->id = req_id; + if (!done) + hdr->flag = BALLOON_FLAG_CONT; + else + hdr->flag = BALLOON_FLAG_DONE; + + if (pos > 0 || done) + send_resp_data(vb, vq, true); + +} + +static void send_unused_pages(struct virtio_balloon *vb, + unsigned long req_id) +{ + struct scatterlist sg_in; + unsigned int pos = 0; + struct virtqueue *vq = vb->host_req_vq; +...
2016 Oct 21
16
[RESEND PATCH v3 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch set contains two parts of changes to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use bitmap to send the page information to host instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by about 85%.
2016 Oct 21
16
[RESEND PATCH v3 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch set contains two parts of changes to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use bitmap to send the page information to host instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by about 85%.
2016 Jun 29
11
[PATCH v2 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch set contains two parts of changes to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use bitmap to send the page information to host instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by about 85%.
2016 Jun 29
11
[PATCH v2 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch set contains two parts of changes to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use bitmap to send the page information to host instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by about 85%.
2017 Mar 03
10
[PATCH v7 kernel 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration
Take over this work from Liang. This patch series implements two optimizations: 1) transfer pages in chuncks between the guest and host; 1) transfer the guest unused pages to the host so that they can be skipped to migrate in live migration. Please check patch 0003 for more details about optimization 1). For an idle guest with 8GB RAM, optimization 2) can help shorten the total live migration
2017 Mar 03
10
[PATCH v7 kernel 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration
Take over this work from Liang. This patch series implements two optimizations: 1) transfer pages in chuncks between the guest and host; 1) transfer the guest unused pages to the host so that they can be skipped to migrate in live migration. Please check patch 0003 for more details about optimization 1). For an idle guest with 8GB RAM, optimization 2) can help shorten the total live migration
2016 Jul 27
14
[PATCH v2 repost 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
This patchset is for kernel and contains two parts of change to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use bitmap to send the page information to host instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by
2016 Jul 27
14
[PATCH v2 repost 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
This patchset is for kernel and contains two parts of change to the virtio-balloon. One is the change for speeding up the inflating & deflating process, the main idea of this optimization is to use bitmap to send the page information to host instead of the PFNs, to reduce the overhead of virtio data transmission, address translation and madvise(). This can help to improve the performance by