search for: virtio_balloon_max_page_chunk

Displaying 12 results from an estimated 12 matches for "virtio_balloon_max_page_chunk".

2017 Jun 15
0
[virtio-dev] Re: [PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...>> +/* >> + * QEMU virtio implementation requires the desc table size less than >> + * VIRTQUEUE_MAX_SIZE, so minus 1 here. > I think it doesn't, the issue is probably that you add a header > as a separate s/g. In any case see below. > >> + */ >> +#define VIRTIO_BALLOON_MAX_PAGE_CHUNKS (VIRTQUEUE_MAX_SIZE - 1) > This is wrong, virtio spec says s/g size should not exceed VQ size. > If you want to support huge VQ sizes, you can add a fallback to > smaller sizes until it fits in 1 page. Probably no need for huge VQ size, 1024 queue size should be enough. And we can have 1...
2017 Jun 13
5
[PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...rements from the data structure. > +/* > + * QEMU virtio implementation requires the desc table size less than > + * VIRTQUEUE_MAX_SIZE, so minus 1 here. I think it doesn't, the issue is probably that you add a header as a separate s/g. In any case see below. > + */ > +#define VIRTIO_BALLOON_MAX_PAGE_CHUNKS (VIRTQUEUE_MAX_SIZE - 1) This is wrong, virtio spec says s/g size should not exceed VQ size. If you want to support huge VQ sizes, you can add a fallback to smaller sizes until it fits in 1 page. > + > +/* The struct to manage ballooned pages in chunks */ > +struct virtio_balloon_page_c...
2017 Jun 13
5
[PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...rements from the data structure. > +/* > + * QEMU virtio implementation requires the desc table size less than > + * VIRTQUEUE_MAX_SIZE, so minus 1 here. I think it doesn't, the issue is probably that you add a header as a separate s/g. In any case see below. > + */ > +#define VIRTIO_BALLOON_MAX_PAGE_CHUNKS (VIRTQUEUE_MAX_SIZE - 1) This is wrong, virtio spec says s/g size should not exceed VQ size. If you want to support huge VQ sizes, you can add a fallback to smaller sizes until it fits in 1 page. > + > +/* The struct to manage ballooned pages in chunks */ > +struct virtio_balloon_page_c...
2017 May 04
0
[PATCH v10 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...LT_PAGES; module_param(oom_pages, int, S_IRUSR | S_IWUSR); MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); @@ -51,6 +65,11 @@ MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); static struct vfsmount *balloon_mnt; #endif +/* Maximum number of page chunks */ +#define VIRTIO_BALLOON_MAX_PAGE_CHUNKS ((8 * PAGE_SIZE - \ + sizeof(struct virtio_balloon_page_chunk)) / \ + sizeof(struct virtio_balloon_page_chunk_entry)) + struct virtio_balloon { struct virtio_device *vdev; struct virtqueue *inflate_vq, *deflate_vq, *stats_vq; @@ -79,6 +98,12 @@ struct virtio_balloon { /* Synchronize acc...
2017 May 04
8
[PATCH v10 0/6] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch series implements the follow two things: 1) Optimization of balloon page transfer: instead of transferring balloon pages to host one by one, the new mechanism transfers them in chunks. 2) A mechanism to report info of guest unused pages: the pages have been unused at some time between when host sent command and when guest reported them. Host uses that by tracking memory changes and
2017 May 04
8
[PATCH v10 0/6] Extend virtio-balloon for fast (de)inflating & fast live migration
This patch series implements the follow two things: 1) Optimization of balloon page transfer: instead of transferring balloon pages to host one by one, the new mechanism transfers them in chunks. 2) A mechanism to report info of guest unused pages: the pages have been unused at some time between when host sent command and when guest reported them. Host uses that by tracking memory changes and
2017 May 05
1
[PATCH v10 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...int, S_IRUSR | S_IWUSR); > MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); > @@ -51,6 +65,11 @@ MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); > static struct vfsmount *balloon_mnt; > #endif > > +/* Maximum number of page chunks */ > +#define VIRTIO_BALLOON_MAX_PAGE_CHUNKS ((8 * PAGE_SIZE - \ > + sizeof(struct virtio_balloon_page_chunk)) / \ > + sizeof(struct virtio_balloon_page_chunk_entry)) > + > struct virtio_balloon { > struct virtio_device *vdev; > struct virtqueue *inflate_vq, *deflate_vq, *stats_vq; > @@ -79,6 +98,12 @@ struct vi...
2017 May 05
1
[PATCH v10 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...int, S_IRUSR | S_IWUSR); > MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); > @@ -51,6 +65,11 @@ MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); > static struct vfsmount *balloon_mnt; > #endif > > +/* Maximum number of page chunks */ > +#define VIRTIO_BALLOON_MAX_PAGE_CHUNKS ((8 * PAGE_SIZE - \ > + sizeof(struct virtio_balloon_page_chunk)) / \ > + sizeof(struct virtio_balloon_page_chunk_entry)) > + > struct virtio_balloon { > struct virtio_device *vdev; > struct virtqueue *inflate_vq, *deflate_vq, *stats_vq; > @@ -79,6 +98,12 @@ struct vi...
2017 Jun 09
0
[PATCH v11 3/6] virtio-balloon: VIRTIO_BALLOON_F_PAGE_CHUNKS
...y default. */ +#define VIRTIO_BALLOON_PAGE_BMAP_DEFAULT_NUM 1 +/* The maximum number of page_bmap that can be allocated. */ +#define VIRTIO_BALLOON_PAGE_BMAP_MAX_NUM 32 + +/* + * QEMU virtio implementation requires the desc table size less than + * VIRTQUEUE_MAX_SIZE, so minus 1 here. + */ +#define VIRTIO_BALLOON_MAX_PAGE_CHUNKS (VIRTQUEUE_MAX_SIZE - 1) + +/* The struct to manage ballooned pages in chunks */ +struct virtio_balloon_page_chunk { + /* Indirect desc table to hold chunks of balloon pages */ + struct vring_desc *desc_table; + /* Number of added chunks of balloon pages */ + unsigned int chunk_num; + /* Bitmap us...
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 09
0
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
...desc_table[*num]; + break; + default: + dev_warn(&vb->vdev->dev, "%s: chunk %d of unknown pages\n", + __func__, type); + return; + } desc->addr = cpu_to_virtio64(vb->vdev, base_addr); desc->len = cpu_to_virtio32(vb->vdev, size); *num += 1; if (*num == VIRTIO_BALLOON_MAX_PAGE_CHUNKS) - send_page_chunks(vb, vq); + send_page_chunks(vb, vq, type, false); } static void convert_bmap_to_chunks(struct virtio_balloon *vb, @@ -264,7 +329,8 @@ static void convert_bmap_to_chunks(struct virtio_balloon *vb, chunk_base_addr = (pfn_start + next_one) << VIRTIO_BALLOON_P...