search for: virtio_balloon_resp_hdr

Displaying 20 results from an estimated 46 matches for "virtio_balloon_resp_hdr".

2017 Mar 16
0
[PATCH kernel v8 2/4] virtio-balloon: VIRTIO_BALLOON_F_CHUNK_TRANSFER
...virtio_balloon { struct virtio_device *vdev; struct virtqueue *inflate_vq, *deflate_vq, *stats_vq; @@ -67,6 +79,31 @@ struct virtio_balloon { /* Number of balloon pages we've told the Host we're not using. */ unsigned int num_pages; + /* Pointer to the response header. */ + struct virtio_balloon_resp_hdr *resp_hdr; + /* Pointer to the start address of response data. */ + resp_data_t *resp_data; + /* Size of response data buffer. */ + unsigned int resp_buf_size; + /* Pointer offset of the response data. */ + unsigned int resp_pos; + /* Bitmap used to record pages */ + unsigned long *page_bmap[PAGE_B...
2017 Jan 18
1
[virtio-dev] Re: [PATCH v6 kernel 2/5] virtio-balloon: define new feature bit and head struct
...u32 num_pages; > > > > > @@ -82,4 +86,12 @@ struct virtio_balloon_stat { > > > > > __virtio64 val; > > > > > } __attribute__((packed)); > > > > > > > > > > +/* Response header structure */ > > > > > +struct virtio_balloon_resp_hdr { > > > > > + __le64 cmd : 8; /* Distinguish different requests type */ > > > > > + __le64 flag: 8; /* Mark status for a specific request type */ > > > > > + __le64 id : 16; /* Distinguish requests of a specific type */ > > > > > + __le64...
2017 Jan 18
1
[virtio-dev] Re: [PATCH v6 kernel 2/5] virtio-balloon: define new feature bit and head struct
...u32 num_pages; > > > > > @@ -82,4 +86,12 @@ struct virtio_balloon_stat { > > > > > __virtio64 val; > > > > > } __attribute__((packed)); > > > > > > > > > > +/* Response header structure */ > > > > > +struct virtio_balloon_resp_hdr { > > > > > + __le64 cmd : 8; /* Distinguish different requests type */ > > > > > + __le64 flag: 8; /* Mark status for a specific request type */ > > > > > + __le64 id : 16; /* Distinguish requests of a specific type */ > > > > > + __le64...
2017 Jan 12
2
[PATCH v6 kernel 2/5] virtio-balloon: define new feature bit and head struct
...ITS 12 > + > struct virtio_balloon_config { > /* Number of pages host wants Guest to give up. */ > __u32 num_pages; > @@ -82,4 +86,12 @@ struct virtio_balloon_stat { > __virtio64 val; > } __attribute__((packed)); > > +/* Response header structure */ > +struct virtio_balloon_resp_hdr { > + __le64 cmd : 8; /* Distinguish different requests type */ > + __le64 flag: 8; /* Mark status for a specific request type */ > + __le64 id : 16; /* Distinguish requests of a specific type */ > + __le64 data_len: 32; /* Length of the following data, in bytes */ This use of __le64 m...
2017 Jan 12
2
[PATCH v6 kernel 2/5] virtio-balloon: define new feature bit and head struct
...ITS 12 > + > struct virtio_balloon_config { > /* Number of pages host wants Guest to give up. */ > __u32 num_pages; > @@ -82,4 +86,12 @@ struct virtio_balloon_stat { > __virtio64 val; > } __attribute__((packed)); > > +/* Response header structure */ > +struct virtio_balloon_resp_hdr { > + __le64 cmd : 8; /* Distinguish different requests type */ > + __le64 flag: 8; /* Mark status for a specific request type */ > + __le64 id : 16; /* Distinguish requests of a specific type */ > + __le64 data_len: 32; /* Length of the following data, in bytes */ This use of __le64 m...
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
2
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
On 11/30/2016 12:43 AM, Liang Li wrote: > +static void send_unused_pages_info(struct virtio_balloon *vb, > + unsigned long req_id) > +{ > + struct scatterlist sg_in; > + unsigned long pos = 0; > + struct virtqueue *vq = vb->req_vq; > + struct virtio_balloon_resp_hdr *hdr = vb->resp_hdr; > + int ret, order; > + > + mutex_lock(&vb->balloon_lock); > + > + for (order = MAX_ORDER - 1; order >= 0; order--) { I scratched my head for a bit on this one. Why are you walking over orders, *then* zones. I *think* you're doing it because y...
2016 Nov 30
2
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
On 11/30/2016 12:43 AM, Liang Li wrote: > +static void send_unused_pages_info(struct virtio_balloon *vb, > + unsigned long req_id) > +{ > + struct scatterlist sg_in; > + unsigned long pos = 0; > + struct virtqueue *vq = vb->req_vq; > + struct virtio_balloon_resp_hdr *hdr = vb->resp_hdr; > + int ret, order; > + > + mutex_lock(&vb->balloon_lock); > + > + for (order = MAX_ORDER - 1; order >= 0; order--) { I scratched my head for a bit on this one. Why are you walking over orders, *then* zones. I *think* you're doing it because y...
2017 Apr 05
2
[PATCH kernel v8 2/4] virtio-balloon: VIRTIO_BALLOON_F_CHUNK_TRANSFER
...evice *vdev; > struct virtqueue *inflate_vq, *deflate_vq, *stats_vq; @@ -67,6 +79,31 > @@ struct virtio_balloon { > > /* Number of balloon pages we've told the Host we're not using. */ > unsigned int num_pages; > + /* Pointer to the response header. */ > + struct virtio_balloon_resp_hdr *resp_hdr; > + /* Pointer to the start address of response data. */ > + resp_data_t *resp_data; I think the implementation has an issue here - both the balloon pages and the unused pages use the same buffer ("resp_data" above) to store chunks. It would cause a race in this case: li...
2017 Apr 05
2
[PATCH kernel v8 2/4] virtio-balloon: VIRTIO_BALLOON_F_CHUNK_TRANSFER
...evice *vdev; > struct virtqueue *inflate_vq, *deflate_vq, *stats_vq; @@ -67,6 +79,31 > @@ struct virtio_balloon { > > /* Number of balloon pages we've told the Host we're not using. */ > unsigned int num_pages; > + /* Pointer to the response header. */ > + struct virtio_balloon_resp_hdr *resp_hdr; > + /* Pointer to the start address of response data. */ > + resp_data_t *resp_data; I think the implementation has an issue here - both the balloon pages and the unused pages use the same buffer ("resp_data" above) to store chunks. It would cause a race in this case: li...
2017 Jan 17
2
[virtio-dev] Re: [PATCH v6 kernel 2/5] virtio-balloon: define new feature bit and head struct
...of pages host wants Guest to give up. */ > > > __u32 num_pages; > > > @@ -82,4 +86,12 @@ struct virtio_balloon_stat { > > > __virtio64 val; > > > } __attribute__((packed)); > > > > > > +/* Response header structure */ > > > +struct virtio_balloon_resp_hdr { > > > + __le64 cmd : 8; /* Distinguish different requests type */ > > > + __le64 flag: 8; /* Mark status for a specific request type */ > > > + __le64 id : 16; /* Distinguish requests of a specific type */ > > > + __le64 data_len: 32; /* Length of the following...
2017 Jan 17
2
[virtio-dev] Re: [PATCH v6 kernel 2/5] virtio-balloon: define new feature bit and head struct
...of pages host wants Guest to give up. */ > > > __u32 num_pages; > > > @@ -82,4 +86,12 @@ struct virtio_balloon_stat { > > > __virtio64 val; > > > } __attribute__((packed)); > > > > > > +/* Response header structure */ > > > +struct virtio_balloon_resp_hdr { > > > + __le64 cmd : 8; /* Distinguish different requests type */ > > > + __le64 flag: 8; /* Mark status for a specific request type */ > > > + __le64 id : 16; /* Distinguish requests of a specific type */ > > > + __le64 data_len: 32; /* Length of the following...
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
2017 Mar 10
0
[virtio-dev] Re: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...irtqueue *inflate_vq, *deflate_vq, *stats_vq; >> @@ -67,6 +81,20 @@ struct virtio_balloon { >> >> /* Number of balloon pages we've told the Host we're not using. */ >> unsigned int num_pages; >> + /* Pointer to the response header. */ >> + struct virtio_balloon_resp_hdr resp_hdr; >> + /* Pointer to the start address of response data. */ >> + __le64 *resp_data; >> + /* Size of response data buffer. */ >> + unsigned int resp_buf_size; >> + /* Pointer offset of the response data. */ >> + unsigned int resp_pos; >> + /* Bitmap...
2016 Nov 02
0
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
...(struct virtio_balloon *vb) pages_to_bytes(available)); } +static void send_unused_pages_info(struct virtio_balloon *vb, + unsigned long req_id) +{ + struct scatterlist sg_in; + unsigned long pfn = 0, bmap_len, pfn_limit, last_pfn, nr_pfn; + struct virtqueue *vq = vb->req_vq; + struct virtio_balloon_resp_hdr *hdr = vb->resp_hdr; + int ret = 1, used_nr_bmap = 0, i; + + if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_PAGE_BITMAP) && + vb->nr_page_bmap == 1) + extend_page_bitmap(vb); + + pfn_limit = PFNS_PER_BMAP * vb->nr_page_bmap; + mutex_lock(&vb->balloon_lock); + last_pf...
2017 Mar 16
0
[PATCH kernel v8 4/4] virtio-balloon: VIRTIO_BALLOON_F_HOST_REQ_VQ
...not using are enqueued * at vb_dev_info->pages list. @@ -568,6 +570,81 @@ static void stats_handle_request(struct virtio_balloon *vb) virtqueue_kick(vq); } +static void __send_unused_pages(struct virtio_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 = cpu_to_le16(req_id); + if (!done) + hdr->flag = BALLOON_FLAG_CONT; + else + hdr->flag = BALLOON_FLAG_DONE; + + if (pos > 0 || done) +...
2017 Mar 08
3
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...vice *vdev; > struct virtqueue *inflate_vq, *deflate_vq, *stats_vq; > @@ -67,6 +81,20 @@ struct virtio_balloon { > > /* Number of balloon pages we've told the Host we're not using. */ > unsigned int num_pages; > + /* Pointer to the response header. */ > + struct virtio_balloon_resp_hdr resp_hdr; > + /* Pointer to the start address of response data. */ > + __le64 *resp_data; > + /* Size of response data buffer. */ > + unsigned int resp_buf_size; > + /* Pointer offset of the response data. */ > + unsigned int resp_pos; > + /* Bitmap used to save the pfns info *...
2017 Mar 08
3
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...vice *vdev; > struct virtqueue *inflate_vq, *deflate_vq, *stats_vq; > @@ -67,6 +81,20 @@ struct virtio_balloon { > > /* Number of balloon pages we've told the Host we're not using. */ > unsigned int num_pages; > + /* Pointer to the response header. */ > + struct virtio_balloon_resp_hdr resp_hdr; > + /* Pointer to the start address of response data. */ > + __le64 *resp_data; > + /* Size of response data buffer. */ > + unsigned int resp_buf_size; > + /* Pointer offset of the response data. */ > + unsigned int resp_pos; > + /* Bitmap used to save the pfns info *...