search for: get_unused_pages

Displaying 20 results from an estimated 21 matches for "get_unused_pages".

2016 Nov 30
0
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
...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--) { + pos = 0; + ret = get_unused_pages(vb->resp_data, + vb->resp_buf_size / sizeof(unsigned long), + order, &pos); + if (ret == -ENOSPC) { + void *new_resp_data; + + new_resp_data = kmalloc(2 * vb->resp_buf_size, + GFP_KERNEL); + if (new_resp_data) { + kfree(vb->resp_data); + vb->resp_data = ne...
2016 Oct 26
4
[RESEND PATCH v3 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
> On 10/20/2016 11:24 PM, Liang Li wrote: > > Dave Hansen suggested a new scheme to encode the data structure, > > because of additional complexity, it's not implemented in v3. > > So, what do you want done with this patch set? Do you want it applied as-is > so that we can introduce a new host/guest ABI that we must support until > the end of time? Then, we go
2016 Oct 26
4
[RESEND PATCH v3 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
> On 10/20/2016 11:24 PM, Liang Li wrote: > > Dave Hansen suggested a new scheme to encode the data structure, > > because of additional complexity, it's not implemented in v3. > > So, what do you want done with this patch set? Do you want it applied as-is > so that we can introduce a new host/guest ABI that we must support until > the end of time? Then, we go
2016 Dec 05
1
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
On 12/04/2016 05:13 AM, Li, Liang Z wrote: >> 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
2016 Dec 05
1
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
On 12/04/2016 05:13 AM, Li, Liang Z wrote: >> 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
2016 Nov 04
2
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
..._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_pfn = get_max_pfn(); > + > + while (ret) { > + clear_page_bitmap(vb); > + ret = get_unused_pages(pfn, pfn + pfn_limit, vb->page_bitmap, > + PFNS_PER_BMAP, vb->nr_page_bmap); This changed the underlying data structure without changing the way that the structure is populated. This algorithm picks a "PFNS_PER_BMAP * vb->nr_page_bmap"-sized set of pfns, allocates a bitma...
2016 Nov 04
2
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
..._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_pfn = get_max_pfn(); > + > + while (ret) { > + clear_page_bitmap(vb); > + ret = get_unused_pages(pfn, pfn + pfn_limit, vb->page_bitmap, > + PFNS_PER_BMAP, vb->nr_page_bmap); This changed the underlying data structure without changing the way that the structure is populated. This algorithm picks a "PFNS_PER_BMAP * vb->nr_page_bmap"-sized set of pfns, allocates a bitma...
2016 Nov 30
2
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
...tched my head for a bit on this one. Why are you walking over orders, *then* zones. I *think* you're doing it because you can efficiently fill the bitmaps at a given order for all zones, then move to a new bitmap. But, it would be interesting to document this. > + pos = 0; > + ret = get_unused_pages(vb->resp_data, > + vb->resp_buf_size / sizeof(unsigned long), > + order, &pos); FWIW, get_unsued_pages() is a pretty bad name. "get" usually implies bumping reference counts or consuming something. You're just "recording" or "marking" them....
2016 Nov 30
2
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
...tched my head for a bit on this one. Why are you walking over orders, *then* zones. I *think* you're doing it because you can efficiently fill the bitmaps at a given order for all zones, then move to a new bitmap. But, it would be interesting to document this. > + pos = 0; > + ret = get_unused_pages(vb->resp_data, > + vb->resp_buf_size / sizeof(unsigned long), > + order, &pos); FWIW, get_unsued_pages() is a pretty bad name. "get" usually implies bumping reference counts or consuming something. You're just "recording" or "marking" them....
2016 Nov 02
8
[PATCH kernel v4 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 Nov 02
8
[PATCH kernel v4 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 Nov 30
8
[PATCH kernel v5 0/5] 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 Nov 30
8
[PATCH kernel v5 0/5] 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 26
0
[RESEND PATCH v3 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration
...ings will be much more > simple. Yes, using pfn lists is more efficient than using bitmaps for sparse bitmaps. Yes, there will be cases where it is preferable to just use pfn lists vs. any kind of bitmap. But, what does it matter? At least with your current scheme where we go out and collect get_unused_pages(), we do the allocation up front. The space efficiency doesn't matter at all for small sizes since we do the constant-size allocation *anyway*. I'm also pretty sure you can pack the pfn and page order into a single 64-bit word and have no bitmap for a given record. That would make it pac...
2016 Dec 04
0
[PATCH kernel v5 5/5] virtio-balloon: tell host vm's unused page info
...l the > bitmaps at a given order for all zones, then move to a new bitmap. But, it > would be interesting to document this. > Yes, use the order is somewhat strange, but it's helpful to keep the API simple. Do you think it's acceptable? > > + pos = 0; > > + ret = get_unused_pages(vb->resp_data, > > + vb->resp_buf_size / sizeof(unsigned long), > > + order, &pos); > > FWIW, get_unsued_pages() is a pretty bad name. "get" usually implies > bumping reference counts or consuming something. You're just "recording" &gt...
2016 Nov 07
0
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
...ap == 1) > > + extend_page_bitmap(vb); > > + > > + pfn_limit = PFNS_PER_BMAP * vb->nr_page_bmap; > > + mutex_lock(&vb->balloon_lock); > > + last_pfn = get_max_pfn(); > > + > > + while (ret) { > > + clear_page_bitmap(vb); > > + ret = get_unused_pages(pfn, pfn + pfn_limit, vb- > >page_bitmap, > > + PFNS_PER_BMAP, vb->nr_page_bmap); > > This changed the underlying data structure without changing the way that > the structure is populated. > > This algorithm picks a "PFNS_PER_BMAP * vb->nr_page_bmap"-...
2016 Aug 08
14
[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 Aug 08
14
[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 Nov 02
0
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
...tio_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_pfn = get_max_pfn(); + + while (ret) { + clear_page_bitmap(vb); + ret = get_unused_pages(pfn, pfn + pfn_limit, vb->page_bitmap, + PFNS_PER_BMAP, vb->nr_page_bmap); + if (ret < 0) + break; + hdr->cmd = BALLOON_GET_UNUSED_PAGES; + hdr->id = req_id; + bmap_len = BALLOON_BMAP_SIZE * vb->nr_page_bmap; + + if (!ret) { + hdr->flag = BALLOON_FLAG_DONE; + nr_p...
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%.