search for: bmap_hdr

Displaying 20 results from an estimated 36 matches for "bmap_hdr".

2016 Jul 27
4
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
...06:23 PM, Liang Li wrote: > + vb->pfn_limit = VIRTIO_BALLOON_PFNS_LIMIT; > + vb->pfn_limit = min(vb->pfn_limit, get_max_pfn()); > + vb->bmap_len = ALIGN(vb->pfn_limit, BITS_PER_LONG) / > + BITS_PER_BYTE + 2 * sizeof(unsigned long); > + hdr_len = sizeof(struct balloon_bmap_hdr); > + vb->bmap_hdr = kzalloc(hdr_len + vb->bmap_len, GFP_KERNEL); This ends up doing a 1MB kmalloc() right? That seems a _bit_ big. How big was the pfn buffer before?
2016 Jul 27
4
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
...06:23 PM, Liang Li wrote: > + vb->pfn_limit = VIRTIO_BALLOON_PFNS_LIMIT; > + vb->pfn_limit = min(vb->pfn_limit, get_max_pfn()); > + vb->bmap_len = ALIGN(vb->pfn_limit, BITS_PER_LONG) / > + BITS_PER_BYTE + 2 * sizeof(unsigned long); > + hdr_len = sizeof(struct balloon_bmap_hdr); > + vb->bmap_hdr = kzalloc(hdr_len + vb->bmap_len, GFP_KERNEL); This ends up doing a 1MB kmalloc() right? That seems a _bit_ big. How big was the pfn buffer before?
2016 Jul 27
0
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...ts(struct virtio_balloon *vb) pages_to_bytes(available)); } +static void update_free_pages_stats(struct virtio_balloon *vb, + unsigned long req_id) +{ + struct scatterlist sg_in, sg_out; + unsigned long pfn = 0, bmap_len, max_pfn; + struct virtqueue *vq = vb->misc_vq; + struct balloon_bmap_hdr *hdr = vb->bmap_hdr; + int ret = 1; + + max_pfn = get_max_pfn(); + mutex_lock(&vb->balloon_lock); + while (pfn < max_pfn) { + memset(vb->page_bitmap, 0, vb->bmap_len); + ret = get_free_pages(pfn, pfn + vb->pfn_limit, + vb->page_bitmap, vb->bmap_len * BITS_PER_BYTE);...
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
2016 Jul 27
2
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
..._device *vdev; > struct virtqueue *inflate_vq, *deflate_vq, *stats_vq; > @@ -62,6 +80,15 @@ struct virtio_balloon { > > /* Number of balloon pages we've told the Host we're not using. */ > unsigned int num_pages; > + /* Pointer of the bitmap header. */ > + void *bmap_hdr; > + /* Bitmap and length used to tell the host the pages */ > + unsigned long *page_bitmap; > + unsigned long bmap_len; > + /* Pfn limit */ > + unsigned long pfn_limit; > + /* Used to record the processed pfn range */ > + unsigned long min_pfn, max_pfn, start_pfn, end_pfn; &gt...
2016 Jul 27
2
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
..._device *vdev; > struct virtqueue *inflate_vq, *deflate_vq, *stats_vq; > @@ -62,6 +80,15 @@ struct virtio_balloon { > > /* Number of balloon pages we've told the Host we're not using. */ > unsigned int num_pages; > + /* Pointer of the bitmap header. */ > + void *bmap_hdr; > + /* Bitmap and length used to tell the host the pages */ > + unsigned long *page_bitmap; > + unsigned long bmap_len; > + /* Pfn limit */ > + unsigned long pfn_limit; > + /* Used to record the processed pfn range */ > + unsigned long min_pfn, max_pfn, start_pfn, end_pfn; &gt...
2016 Jul 27
2
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...)); > } > > +static void update_free_pages_stats(struct virtio_balloon *vb, why _stats? > + unsigned long req_id) > +{ > + struct scatterlist sg_in, sg_out; > + unsigned long pfn = 0, bmap_len, max_pfn; > + struct virtqueue *vq = vb->misc_vq; > + struct balloon_bmap_hdr *hdr = vb->bmap_hdr; > + int ret = 1; > + > + max_pfn = get_max_pfn(); > + mutex_lock(&vb->balloon_lock); > + while (pfn < max_pfn) { > + memset(vb->page_bitmap, 0, vb->bmap_len); > + ret = get_free_pages(pfn, pfn + vb->pfn_limit, > + vb->page_bi...
2016 Jul 27
2
[PATCH v2 repost 7/7] virtio-balloon: tell host vm's free page info
...)); > } > > +static void update_free_pages_stats(struct virtio_balloon *vb, why _stats? > + unsigned long req_id) > +{ > + struct scatterlist sg_in, sg_out; > + unsigned long pfn = 0, bmap_len, max_pfn; > + struct virtqueue *vq = vb->misc_vq; > + struct balloon_bmap_hdr *hdr = vb->bmap_hdr; > + int ret = 1; > + > + max_pfn = get_max_pfn(); > + mutex_lock(&vb->balloon_lock); > + while (pfn < max_pfn) { > + memset(vb->page_bitmap, 0, vb->bmap_len); > + ret = get_free_pages(pfn, pfn + vb->pfn_limit, > + vb->page_bi...
2016 Aug 08
0
[PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...param(oom_pages, int, S_IRUSR | S_IWUSR); MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); @@ -67,6 +71,13 @@ struct virtio_balloon { /* Number of balloon pages we've told the Host we're not using. */ unsigned int num_pages; + /* Pointer of the bitmap header. */ + void *bmap_hdr; + /* Bitmap and bitmap count used to tell the host the pages */ + unsigned long *page_bitmap[BALLOON_BMAP_COUNT]; + unsigned int nr_page_bmap; + /* Used to record the processed pfn range */ + unsigned long min_pfn, max_pfn, start_pfn, end_pfn; /* * The pages we've told the Host we're...
2016 Oct 21
0
[RESEND PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...param(oom_pages, int, S_IRUSR | S_IWUSR); MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); @@ -67,6 +71,13 @@ struct virtio_balloon { /* Number of balloon pages we've told the Host we're not using. */ unsigned int num_pages; + /* Pointer of the bitmap header. */ + void *bmap_hdr; + /* Bitmap and bitmap count used to tell the host the pages */ + unsigned long *page_bitmap[BALLOON_BMAP_COUNT]; + unsigned int nr_page_bmap; + /* Used to record the processed pfn range */ + unsigned long min_pfn, max_pfn, start_pfn, end_pfn; /* * The pages we've told the Host we're...
2016 Jul 27
0
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
...ct virtio_balloon { struct virtio_device *vdev; struct virtqueue *inflate_vq, *deflate_vq, *stats_vq; @@ -62,6 +80,15 @@ struct virtio_balloon { /* Number of balloon pages we've told the Host we're not using. */ unsigned int num_pages; + /* Pointer of the bitmap header. */ + void *bmap_hdr; + /* Bitmap and length used to tell the host the pages */ + unsigned long *page_bitmap; + unsigned long bmap_len; + /* Pfn limit */ + unsigned long pfn_limit; + /* Used to record the processed pfn range */ + unsigned long min_pfn, max_pfn, start_pfn, end_pfn; /* * The pages we've told the...
2016 Jul 28
2
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
...pfn_limit = VIRTIO_BALLOON_PFNS_LIMIT; > > > + vb->pfn_limit = min(vb->pfn_limit, get_max_pfn()); > > > + vb->bmap_len = ALIGN(vb->pfn_limit, BITS_PER_LONG) / > > > + BITS_PER_BYTE + 2 * sizeof(unsigned long); > > > + hdr_len = sizeof(struct balloon_bmap_hdr); > > > + vb->bmap_hdr = kzalloc(hdr_len + vb->bmap_len, GFP_KERNEL); > > > > This ends up doing a 1MB kmalloc() right? That seems a _bit_ big. > > How big was the pfn buffer before? > > > Yes I would limit this to 1G memory in a go, will result in a 32K...
2016 Jul 28
2
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
...pfn_limit = VIRTIO_BALLOON_PFNS_LIMIT; > > > + vb->pfn_limit = min(vb->pfn_limit, get_max_pfn()); > > > + vb->bmap_len = ALIGN(vb->pfn_limit, BITS_PER_LONG) / > > > + BITS_PER_BYTE + 2 * sizeof(unsigned long); > > > + hdr_len = sizeof(struct balloon_bmap_hdr); > > > + vb->bmap_hdr = kzalloc(hdr_len + vb->bmap_len, GFP_KERNEL); > > > > This ends up doing a 1MB kmalloc() right? That seems a _bit_ big. > > How big was the pfn buffer before? > > > Yes I would limit this to 1G memory in a go, will result in a 32K...
2016 Jul 27
1
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
..._device *vdev; > struct virtqueue *inflate_vq, *deflate_vq, *stats_vq; > @@ -62,6 +80,15 @@ struct virtio_balloon { > > /* Number of balloon pages we've told the Host we're not using. */ > unsigned int num_pages; > + /* Pointer of the bitmap header. */ > + void *bmap_hdr; > + /* Bitmap and length used to tell the host the pages */ > + unsigned long *page_bitmap; > + unsigned long bmap_len; > + /* Pfn limit */ > + unsigned long pfn_limit; > + /* Used to record the processed pfn range */ > + unsigned long min_pfn, max_pfn, start_pfn, end_pfn; &gt...
2016 Jul 27
1
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
..._device *vdev; > struct virtqueue *inflate_vq, *deflate_vq, *stats_vq; > @@ -62,6 +80,15 @@ struct virtio_balloon { > > /* Number of balloon pages we've told the Host we're not using. */ > unsigned int num_pages; > + /* Pointer of the bitmap header. */ > + void *bmap_hdr; > + /* Bitmap and length used to tell the host the pages */ > + unsigned long *page_bitmap; > + unsigned long bmap_len; > + /* Pfn limit */ > + unsigned long pfn_limit; > + /* Used to record the processed pfn range */ > + unsigned long min_pfn, max_pfn, start_pfn, end_pfn; &gt...
2016 Oct 25
1
[RESEND PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...WUSR); > MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); > @@ -67,6 +71,13 @@ struct virtio_balloon { > > /* Number of balloon pages we've told the Host we're not using. */ > unsigned int num_pages; > + /* Pointer of the bitmap header. */ > + void *bmap_hdr; > + /* Bitmap and bitmap count used to tell the host the pages */ > + unsigned long *page_bitmap[BALLOON_BMAP_COUNT]; > + unsigned int nr_page_bmap; > + /* Used to record the processed pfn range */ > + unsigned long min_pfn, max_pfn, start_pfn, end_pfn; > /* > * The pages...
2016 Oct 25
1
[RESEND PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...WUSR); > MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); > @@ -67,6 +71,13 @@ struct virtio_balloon { > > /* Number of balloon pages we've told the Host we're not using. */ > unsigned int num_pages; > + /* Pointer of the bitmap header. */ > + void *bmap_hdr; > + /* Bitmap and bitmap count used to tell the host the pages */ > + unsigned long *page_bitmap[BALLOON_BMAP_COUNT]; > + unsigned int nr_page_bmap; > + /* Used to record the processed pfn range */ > + unsigned long min_pfn, max_pfn, start_pfn, end_pfn; > /* > * The pages...
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%.