search for: extend_page_bitmap

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

2016 Nov 04
2
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
...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_pfn = get_max_pfn(); > + > + while (ret) { > + clear_page_bitmap(vb); > + ret = get_unused_pages(pfn, pfn + pfn_limit, vb->page_bitmap, > + PFNS_PER_BM...
2016 Nov 04
2
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
...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_pfn = get_max_pfn(); > + > + while (ret) { > + clear_page_bitmap(vb); > + ret = get_unused_pages(pfn, pfn + pfn_limit, vb->page_bitmap, > + PFNS_PER_BM...
2016 Nov 07
0
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
...rtqueue *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_pfn = get_max_pfn(); > > + > > + while (ret) { > > + clear_page_bitmap(vb); > > + ret = get_unused_pages(pfn, pfn + pfn_limit, v...
2016 Oct 25
1
[RESEND PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
.../ > wait_event(vb->acked, virtqueue_get_buf(vq, &len)); > @@ -138,13 +199,93 @@ static void set_page_pfns(struct virtio_balloon *vb, > page_to_balloon_pfn(page) + i); > } > > -static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) > +static void extend_page_bitmap(struct virtio_balloon *vb) > +{ > + int i; > + unsigned long bmap_len, bmap_count; > + > + bmap_len = ALIGN(get_max_pfn(), BITS_PER_LONG) / BITS_PER_BYTE; > + bmap_count = bmap_len / BALLOON_BMAP_SIZE; > + if (bmap_len % BALLOON_BMAP_SIZE) > + bmap_count++; > + if (bmap_...
2016 Oct 25
1
[RESEND PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
.../ > wait_event(vb->acked, virtqueue_get_buf(vq, &len)); > @@ -138,13 +199,93 @@ static void set_page_pfns(struct virtio_balloon *vb, > page_to_balloon_pfn(page) + i); > } > > -static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) > +static void extend_page_bitmap(struct virtio_balloon *vb) > +{ > + int i; > + unsigned long bmap_len, bmap_count; > + > + bmap_len = ALIGN(get_max_pfn(), BITS_PER_LONG) / BITS_PER_BYTE; > + bmap_count = bmap_len / BALLOON_BMAP_SIZE; > + if (bmap_len % BALLOON_BMAP_SIZE) > + bmap_count++; > + if (bmap_...
2016 Nov 07
3
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
...The bottom-level lists have tens of thousands of pages in them, even on my >> laptop. Only 1/256 of these pages will get consumed in a given pass. >> > Your description is not exactly. > A 32k bitmap is used only when there is few free memory left in the system and when > the extend_page_bitmap() failed to allocate more memory for the bitmap. Or dozens of > 32k split bitmap will be used, this version limit the bitmap count to 32, it means we can use > at most 32*32 kB for the bitmap, which can cover 128GB for RAM. We can increase the bitmap > count limit to a larger value if 32...
2016 Nov 07
3
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
...The bottom-level lists have tens of thousands of pages in them, even on my >> laptop. Only 1/256 of these pages will get consumed in a given pass. >> > Your description is not exactly. > A 32k bitmap is used only when there is few free memory left in the system and when > the extend_page_bitmap() failed to allocate more memory for the bitmap. Or dozens of > 32k split bitmap will be used, this version limit the bitmap count to 32, it means we can use > at most 32*32 kB for the bitmap, which can cover 128GB for RAM. We can increase the bitmap > count limit to a larger value if 32...
2017 Mar 10
0
[virtio-dev] Re: [PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...on *vb, >> + struct page *page) >> +{ >> + unsigned long balloon_pfn = page_to_balloon_pfn(page); >> + >> + vb->min_pfn = min(balloon_pfn, vb->min_pfn); >> + vb->max_pfn = max(balloon_pfn, vb->max_pfn); >> +} >> + >> +static void extend_page_bitmap(struct virtio_balloon *vb, >> + unsigned long nr_pfn) > > what exactly does this do? By default, only one page_bmap is allocated. When there are too many pfns to fit into one page_bmap, it tries to allocate more page_bmap using this extend_page_bmap() function. > >> +{ &gt...
2016 Aug 08
0
[PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...r, this completes via balloon_ack */ wait_event(vb->acked, virtqueue_get_buf(vq, &len)); @@ -138,13 +199,93 @@ static void set_page_pfns(struct virtio_balloon *vb, page_to_balloon_pfn(page) + i); } -static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) +static void extend_page_bitmap(struct virtio_balloon *vb) +{ + int i; + unsigned long bmap_len, bmap_count; + + bmap_len = ALIGN(get_max_pfn(), BITS_PER_LONG) / BITS_PER_BYTE; + bmap_count = bmap_len / BALLOON_BMAP_SIZE; + if (bmap_len % BALLOON_BMAP_SIZE) + bmap_count++; + if (bmap_count > BALLOON_BMAP_COUNT) + bmap_count...
2016 Oct 21
0
[RESEND PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...r, this completes via balloon_ack */ wait_event(vb->acked, virtqueue_get_buf(vq, &len)); @@ -138,13 +199,93 @@ static void set_page_pfns(struct virtio_balloon *vb, page_to_balloon_pfn(page) + i); } -static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) +static void extend_page_bitmap(struct virtio_balloon *vb) +{ + int i; + unsigned long bmap_len, bmap_count; + + bmap_len = ALIGN(get_max_pfn(), BITS_PER_LONG) / BITS_PER_BYTE; + bmap_count = bmap_len / BALLOON_BMAP_SIZE; + if (bmap_len % BALLOON_BMAP_SIZE) + bmap_count++; + if (bmap_count > BALLOON_BMAP_COUNT) + bmap_count...
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%.
2017 Mar 08
3
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...e_bmap_pfn_range(struct virtio_balloon *vb, > + struct page *page) > +{ > + unsigned long balloon_pfn = page_to_balloon_pfn(page); > + > + vb->min_pfn = min(balloon_pfn, vb->min_pfn); > + vb->max_pfn = max(balloon_pfn, vb->max_pfn); > +} > + > +static void extend_page_bitmap(struct virtio_balloon *vb, > + unsigned long nr_pfn) what exactly does this do? > +{ > + int i, bmap_count; > + unsigned long bmap_len; > + > + bmap_len = ALIGN(nr_pfn, BITS_PER_LONG) / BITS_PER_BYTE; > + bmap_len = ALIGN(bmap_len, PAGE_BMAP_SIZE); > + bmap_count = min...
2017 Mar 08
3
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...e_bmap_pfn_range(struct virtio_balloon *vb, > + struct page *page) > +{ > + unsigned long balloon_pfn = page_to_balloon_pfn(page); > + > + vb->min_pfn = min(balloon_pfn, vb->min_pfn); > + vb->max_pfn = max(balloon_pfn, vb->max_pfn); > +} > + > +static void extend_page_bitmap(struct virtio_balloon *vb, > + unsigned long nr_pfn) what exactly does this do? > +{ > + int i, bmap_count; > + unsigned long bmap_len; > + > + bmap_len = ALIGN(nr_pfn, BITS_PER_LONG) / BITS_PER_BYTE; > + bmap_len = ALIGN(bmap_len, PAGE_BMAP_SIZE); > + bmap_count = min...
2016 Dec 21
0
[PATCH v6 kernel 3/5] virtio-balloon: speed up inflate/deflate process
...t;max_pfn = 0; +} + +static inline void update_bmap_pfn_range(struct virtio_balloon *vb, + struct page *page) +{ + unsigned long balloon_pfn = page_to_balloon_pfn(page); + + vb->min_pfn = min(balloon_pfn, vb->min_pfn); + vb->max_pfn = max(balloon_pfn, vb->max_pfn); +} + +static void extend_page_bitmap(struct virtio_balloon *vb, + unsigned long nr_pfn) +{ + int i, bmap_count; + unsigned long bmap_len; + + bmap_len = ALIGN(nr_pfn, BITS_PER_LONG) / BITS_PER_BYTE; + bmap_len = ALIGN(bmap_len, BALLOON_BMAP_SIZE); + bmap_count = min((int)(bmap_len / BALLOON_BMAP_SIZE), + BALLOON_BMAP_COUNT); +...
2016 Nov 08
0
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
...ave tens of thousands of pages in them, even > >> on my laptop. Only 1/256 of these pages will get consumed in a given pass. > >> > > Your description is not exactly. > > A 32k bitmap is used only when there is few free memory left in the > > system and when the extend_page_bitmap() failed to allocate more > > memory for the bitmap. Or dozens of 32k split bitmap will be used, > > this version limit the bitmap count to 32, it means we can use at most > > 32*32 kB for the bitmap, which can cover 128GB for RAM. We can increase > the bitmap count limit to a...
2017 Mar 03
0
[PATCH v7 kernel 3/5] virtio-balloon: implementation of VIRTIO_BALLOON_F_CHUNK_TRANSFER
...t;max_pfn = 0; +} + +static inline void update_bmap_pfn_range(struct virtio_balloon *vb, + struct page *page) +{ + unsigned long balloon_pfn = page_to_balloon_pfn(page); + + vb->min_pfn = min(balloon_pfn, vb->min_pfn); + vb->max_pfn = max(balloon_pfn, vb->max_pfn); +} + +static void extend_page_bitmap(struct virtio_balloon *vb, + unsigned long nr_pfn) +{ + int i, bmap_count; + unsigned long bmap_len; + + bmap_len = ALIGN(nr_pfn, BITS_PER_LONG) / BITS_PER_BYTE; + bmap_len = ALIGN(bmap_len, PAGE_BMAP_SIZE); + bmap_count = min((int)(bmap_len / PAGE_BMAP_SIZE), + PAGE_BMAP_COUNT_MAX); + + for...
2016 Nov 02
0
[PATCH kernel v4 7/7] virtio-balloon: tell host vm's unused page info
...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_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)...
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%.