search for: balloon_pfn

Displaying 20 results from an estimated 55 matches for "balloon_pfn".

2016 May 24
3
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...--------------------------------------------------------------------- > > ----------- > > +static void set_page_bitmap(struct virtio_balloon *vb, struct page > > +*page) { > > + unsigned int i; > > + unsigned long *bitmap = vb->page_bitmap; > > + unsigned long balloon_pfn = page_to_balloon_pfn(page); > > + > > + for (i = 0; i < VIRTIO_BALLOON_PAGES_PER_PAGE; i++) > > + set_bit(balloon_pfn + i, bitmap); > > BTW, there's a page size value in header so there is no longer need to set > multiple bits per page. Yes, you are right. &gt...
2016 May 24
3
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...--------------------------------------------------------------------- > > ----------- > > +static void set_page_bitmap(struct virtio_balloon *vb, struct page > > +*page) { > > + unsigned int i; > > + unsigned long *bitmap = vb->page_bitmap; > > + unsigned long balloon_pfn = page_to_balloon_pfn(page); > > + > > + for (i = 0; i < VIRTIO_BALLOON_PAGES_PER_PAGE; i++) > > + set_bit(balloon_pfn + i, bitmap); > > BTW, there's a page size value in header so there is no longer need to set > multiple bits per page. Yes, you are right. &gt...
2016 May 24
2
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...ge_bitmap() and will be used in the function tell_host(): --------------------------------------------------------------------------------- +static void set_page_bitmap(struct virtio_balloon *vb, struct page +*page) { + unsigned int i; + unsigned long *bitmap = vb->page_bitmap; + unsigned long balloon_pfn = page_to_balloon_pfn(page); + + for (i = 0; i < VIRTIO_BALLOON_PAGES_PER_PAGE; i++) + set_bit(balloon_pfn + i, bitmap); + if (balloon_pfn < vb->start_pfn) + vb->start_pfn = balloon_pfn; + if (balloon_pfn > vb->end_pfn) + vb->end_pfn = balloon_pfn; +} + unsigned long star...
2016 May 24
2
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...ge_bitmap() and will be used in the function tell_host(): --------------------------------------------------------------------------------- +static void set_page_bitmap(struct virtio_balloon *vb, struct page +*page) { + unsigned int i; + unsigned long *bitmap = vb->page_bitmap; + unsigned long balloon_pfn = page_to_balloon_pfn(page); + + for (i = 0; i < VIRTIO_BALLOON_PAGES_PER_PAGE; i++) + set_bit(balloon_pfn + i, bitmap); + if (balloon_pfn < vb->start_pfn) + vb->start_pfn = balloon_pfn; + if (balloon_pfn > vb->end_pfn) + vb->end_pfn = balloon_pfn; +} + unsigned long star...
2016 Oct 25
1
[RESEND PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...ed); > } > > +static inline void init_pfn_range(struct virtio_balloon *vb) > +{ > + vb->min_pfn = ULONG_MAX; > + vb->max_pfn = 0; > +} > + > +static inline void update_pfn_range(struct virtio_balloon *vb, > + struct page *page) > +{ > + unsigned long balloon_pfn = page_to_balloon_pfn(page); > + > + if (balloon_pfn < vb->min_pfn) > + vb->min_pfn = balloon_pfn; > + if (balloon_pfn > vb->max_pfn) > + vb->max_pfn = balloon_pfn; > +} > + rename to hint these are all bitmap related. > static void tell_host(struct v...
2016 Oct 25
1
[RESEND PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...ed); > } > > +static inline void init_pfn_range(struct virtio_balloon *vb) > +{ > + vb->min_pfn = ULONG_MAX; > + vb->max_pfn = 0; > +} > + > +static inline void update_pfn_range(struct virtio_balloon *vb, > + struct page *page) > +{ > + unsigned long balloon_pfn = page_to_balloon_pfn(page); > + > + if (balloon_pfn < vb->min_pfn) > + vb->min_pfn = balloon_pfn; > + if (balloon_pfn > vb->max_pfn) > + vb->max_pfn = balloon_pfn; > +} > + rename to hint these are all bitmap related. > static void tell_host(struct v...
2016 Aug 08
0
[PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...balloon_ack(struct virtqueue *vq) wake_up(&vb->acked); } +static inline void init_pfn_range(struct virtio_balloon *vb) +{ + vb->min_pfn = ULONG_MAX; + vb->max_pfn = 0; +} + +static inline void update_pfn_range(struct virtio_balloon *vb, + struct page *page) +{ + unsigned long balloon_pfn = page_to_balloon_pfn(page); + + if (balloon_pfn < vb->min_pfn) + vb->min_pfn = balloon_pfn; + if (balloon_pfn > vb->max_pfn) + vb->max_pfn = balloon_pfn; +} + static void tell_host(struct virtio_balloon *vb, struct virtqueue *vq) { - struct scatterlist sg; - unsigned int len;...
2016 Oct 21
0
[RESEND PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...balloon_ack(struct virtqueue *vq) wake_up(&vb->acked); } +static inline void init_pfn_range(struct virtio_balloon *vb) +{ + vb->min_pfn = ULONG_MAX; + vb->max_pfn = 0; +} + +static inline void update_pfn_range(struct virtio_balloon *vb, + struct page *page) +{ + unsigned long balloon_pfn = page_to_balloon_pfn(page); + + if (balloon_pfn < vb->min_pfn) + vb->min_pfn = balloon_pfn; + if (balloon_pfn > vb->max_pfn) + vb->max_pfn = balloon_pfn; +} + static void tell_host(struct virtio_balloon *vb, struct virtqueue *vq) { - struct scatterlist sg; - unsigned int len;...
2016 Jul 27
0
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
...-git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 8d649a2..2d18ff6 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -41,10 +41,28 @@ #define OOM_VBALLOON_DEFAULT_PAGES 256 #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80 +/* + * VIRTIO_BALLOON_PFNS_LIMIT is used to limit the size of page bitmap + * to prevent a very large page bitmap, there are two reasons for this: + * 1) to save memory. + * 2) allocate a large bitmap may fail. + * + * The actual limit of pfn is determined by: + * pfn_limit = min(max_pfn, VIRTIO_BALLOON_PFNS_LIMIT); + * + *...
2016 Jul 27
1
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
...ers/virtio/virtio_balloon.c > index 8d649a2..2d18ff6 100644 > --- a/drivers/virtio/virtio_balloon.c > +++ b/drivers/virtio/virtio_balloon.c > @@ -41,10 +41,28 @@ > #define OOM_VBALLOON_DEFAULT_PAGES 256 > #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80 > > +/* > + * VIRTIO_BALLOON_PFNS_LIMIT is used to limit the size of page bitmap > + * to prevent a very large page bitmap, there are two reasons for this: > + * 1) to save memory. > + * 2) allocate a large bitmap may fail. > + * > + * The actual limit of pfn is determined by: > + * pfn_limit = min(max_pfn, VIRTI...
2016 Jul 27
1
[PATCH v2 repost 4/7] virtio-balloon: speed up inflate/deflate process
...ers/virtio/virtio_balloon.c > index 8d649a2..2d18ff6 100644 > --- a/drivers/virtio/virtio_balloon.c > +++ b/drivers/virtio/virtio_balloon.c > @@ -41,10 +41,28 @@ > #define OOM_VBALLOON_DEFAULT_PAGES 256 > #define VIRTBALLOON_OOM_NOTIFY_PRIORITY 80 > > +/* > + * VIRTIO_BALLOON_PFNS_LIMIT is used to limit the size of page bitmap > + * to prevent a very large page bitmap, there are two reasons for this: > + * 1) to save memory. > + * 2) allocate a large bitmap may fail. > + * > + * The actual limit of pfn is determined by: > + * pfn_limit = min(max_pfn, VIRTI...
2016 May 24
0
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...--------------------------------------- > > > ----------- > > > +static void set_page_bitmap(struct virtio_balloon *vb, struct page > > > +*page) { > > > + unsigned int i; > > > + unsigned long *bitmap = vb->page_bitmap; > > > + unsigned long balloon_pfn = page_to_balloon_pfn(page); > > > + > > > + for (i = 0; i < VIRTIO_BALLOON_PAGES_PER_PAGE; i++) > > > + set_bit(balloon_pfn + i, bitmap); > > > > BTW, there's a page size value in header so there is no longer need to set > > multiple bits per p...
2016 May 25
1
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...gt; > ----------- > > > > +static void set_page_bitmap(struct virtio_balloon *vb, struct > > > > +page > > > > +*page) { > > > > + unsigned int i; > > > > + unsigned long *bitmap = vb->page_bitmap; > > > > + unsigned long balloon_pfn = page_to_balloon_pfn(page); > > > > + > > > > + for (i = 0; i < VIRTIO_BALLOON_PAGES_PER_PAGE; i++) > > > > + set_bit(balloon_pfn + i, bitmap); > > > > > > BTW, there's a page size value in header so there is no longer need > > &g...
2016 May 25
1
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...gt; > ----------- > > > > +static void set_page_bitmap(struct virtio_balloon *vb, struct > > > > +page > > > > +*page) { > > > > + unsigned int i; > > > > + unsigned long *bitmap = vb->page_bitmap; > > > > + unsigned long balloon_pfn = page_to_balloon_pfn(page); > > > > + > > > > + for (i = 0; i < VIRTIO_BALLOON_PAGES_PER_PAGE; i++) > > > > + set_bit(balloon_pfn + i, bitmap); > > > > > > BTW, there's a page size value in header so there is no longer need > > &g...
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 May 24
0
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...function tell_host(): > > --------------------------------------------------------------------------------- > +static void set_page_bitmap(struct virtio_balloon *vb, struct page > +*page) { > + unsigned int i; > + unsigned long *bitmap = vb->page_bitmap; > + unsigned long balloon_pfn = page_to_balloon_pfn(page); > + > + for (i = 0; i < VIRTIO_BALLOON_PAGES_PER_PAGE; i++) > + set_bit(balloon_pfn + i, bitmap); BTW, there's a page size value in header so there is no longer need to set multiple bits per page. > + if (balloon_pfn < vb->start_pfn) > +...
2017 Apr 13
3
[PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS
...*vq) > +static inline void init_page_bmap_range(struct virtio_balloon *vb) > +{ > + vb->pfn_min = ULONG_MAX; > + vb->pfn_max = 0; > +} > + > +static inline void update_page_bmap_range(struct virtio_balloon *vb, > + struct page *page) > +{ > + unsigned long balloon_pfn = page_to_balloon_pfn(page); > + > + vb->pfn_min = min(balloon_pfn, vb->pfn_min); > + vb->pfn_max = max(balloon_pfn, vb->pfn_max); > +} > + > +/* The page_bmap size is extended by adding more number of page_bmap */ did you mean Allocate more bitmaps to cover the giv...
2016 Dec 21
0
[PATCH v6 kernel 3/5] virtio-balloon: speed up inflate/deflate process
...balloon *vb, struct virtqueue *vq) +static inline void init_bmap_pfn_range(struct virtio_balloon *vb) { - struct scatterlist sg; + vb->min_pfn = ULONG_MAX; + vb->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(...
2017 Apr 13
3
[PATCH v9 2/5] virtio-balloon: VIRTIO_BALLOON_F_BALLOON_CHUNKS
...*vq) > +static inline void init_page_bmap_range(struct virtio_balloon *vb) > +{ > + vb->pfn_min = ULONG_MAX; > + vb->pfn_max = 0; > +} > + > +static inline void update_page_bmap_range(struct virtio_balloon *vb, > + struct page *page) > +{ > + unsigned long balloon_pfn = page_to_balloon_pfn(page); > + > + vb->pfn_min = min(balloon_pfn, vb->pfn_min); > + vb->pfn_max = max(balloon_pfn, vb->pfn_max); > +} > + > +/* The page_bmap size is extended by adding more number of page_bmap */ did you mean Allocate more bitmaps to cover the giv...