search for: num_allocated_pages

Displaying 20 results from an estimated 127 matches for "num_allocated_pages".

2016 May 20
6
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...alloon_pfn < vb->start_pfn) + vb->start_pfn = balloon_pfn; + if (balloon_pfn > vb->end_pfn) + vb->end_pfn = balloon_pfn; +} + +static unsigned fill_balloon_pfns(struct virtio_balloon *vb, size_t num) { struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; unsigned num_allocated_pages; @@ -174,7 +244,104 @@ static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) return num_allocated_pages; } -static void release_pages_balloon(struct virtio_balloon *vb) +static long fill_balloon_bitmap(struct virtio_balloon *vb, size_t num) +{ + struct balloon_dev_info *vb_dev_in...
2016 May 20
6
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...alloon_pfn < vb->start_pfn) + vb->start_pfn = balloon_pfn; + if (balloon_pfn > vb->end_pfn) + vb->end_pfn = balloon_pfn; +} + +static unsigned fill_balloon_pfns(struct virtio_balloon *vb, size_t num) { struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; unsigned num_allocated_pages; @@ -174,7 +244,104 @@ static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) return num_allocated_pages; } -static void release_pages_balloon(struct virtio_balloon *vb) +static long fill_balloon_bitmap(struct virtio_balloon *vb, size_t num) +{ + struct balloon_dev_info *vb_dev_in...
2016 May 24
4
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...n_pfn > vb->end_pfn) > > + vb->end_pfn = balloon_pfn; > > +} > > + > > +static unsigned fill_balloon_pfns(struct virtio_balloon *vb, size_t > > +num) > > { > > struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; > > unsigned num_allocated_pages; > > @@ -174,7 +244,104 @@ static unsigned fill_balloon(struct virtio_balloon > *vb, size_t num) > > return num_allocated_pages; > > } > > > > -static void release_pages_balloon(struct virtio_balloon *vb) > > +static long fill_balloon_bitmap(struct virtio_b...
2016 May 24
4
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...n_pfn > vb->end_pfn) > > + vb->end_pfn = balloon_pfn; > > +} > > + > > +static unsigned fill_balloon_pfns(struct virtio_balloon *vb, size_t > > +num) > > { > > struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; > > unsigned num_allocated_pages; > > @@ -174,7 +244,104 @@ static unsigned fill_balloon(struct virtio_balloon > *vb, size_t num) > > return num_allocated_pages; > > } > > > > -static void release_pages_balloon(struct virtio_balloon *vb) > > +static long fill_balloon_bitmap(struct virtio_b...
2016 May 20
0
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...>start_pfn = balloon_pfn; > + if (balloon_pfn > vb->end_pfn) > + vb->end_pfn = balloon_pfn; > +} > + > +static unsigned fill_balloon_pfns(struct virtio_balloon *vb, size_t num) > { > struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; > unsigned num_allocated_pages; > @@ -174,7 +244,104 @@ static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) > return num_allocated_pages; > } > > -static void release_pages_balloon(struct virtio_balloon *vb) > +static long fill_balloon_bitmap(struct virtio_balloon *vb, size_t num) > +{ &...
2016 Jan 01
1
[PATCH v4 1/2] virtio_balloon: Restore the entire balloon after the system freeze
...; pfns[i] = page_to_balloon_pfn(page) + i; > } > > -static void fill_balloon(struct virtio_balloon *vb, size_t num) > +static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) > { > struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; > + unsigned num_allocated_pages; > > /* We can only do one array worth at a time. */ > num = min(num, ARRAY_SIZE(vb->pfns)); > @@ -162,10 +163,13 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num) > adjust_managed_page_count(page, -1); > } > > + num_allocated_pages = vb-&gt...
2016 Jan 01
1
[PATCH v4 1/2] virtio_balloon: Restore the entire balloon after the system freeze
...; pfns[i] = page_to_balloon_pfn(page) + i; > } > > -static void fill_balloon(struct virtio_balloon *vb, size_t num) > +static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) > { > struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; > + unsigned num_allocated_pages; > > /* We can only do one array worth at a time. */ > num = min(num, ARRAY_SIZE(vb->pfns)); > @@ -162,10 +163,13 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num) > adjust_managed_page_count(page, -1); > } > > + num_allocated_pages = vb-&gt...
2016 May 24
0
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...; + vb->end_pfn = balloon_pfn; > > > +} > > > + > > > +static unsigned fill_balloon_pfns(struct virtio_balloon *vb, size_t > > > +num) > > > { > > > struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; > > > unsigned num_allocated_pages; > > > @@ -174,7 +244,104 @@ static unsigned fill_balloon(struct virtio_balloon > > *vb, size_t num) > > > return num_allocated_pages; > > > } > > > > > > -static void release_pages_balloon(struct virtio_balloon *vb) > > > +static long...
2017 Nov 03
2
[PATCH v17 4/6] virtio-balloon: VIRTIO_BALLOON_F_SG
...amp;& xb_set_page(vb, page, &pfn_min, &pfn_max) < 0) Isn't this leaking "page" ? > + break; > balloon_page_push(&pages, page); > } > > @@ -184,8 +307,12 @@ static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) > > num_allocated_pages = vb->num_pfns; > /* Did we get any? */ > - if (vb->num_pfns != 0) > - tell_host(vb, vb->inflate_vq); > + if (vb->num_pfns) { > + if (use_sg) > + tell_host_sgs(vb, vb->inflate_vq, pfn_min, pfn_max); Please describe why tell_host_sgs() can work without __GFP_D...
2017 Nov 03
2
[PATCH v17 4/6] virtio-balloon: VIRTIO_BALLOON_F_SG
...amp;& xb_set_page(vb, page, &pfn_min, &pfn_max) < 0) Isn't this leaking "page" ? > + break; > balloon_page_push(&pages, page); > } > > @@ -184,8 +307,12 @@ static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) > > num_allocated_pages = vb->num_pfns; > /* Did we get any? */ > - if (vb->num_pfns != 0) > - tell_host(vb, vb->inflate_vq); > + if (vb->num_pfns) { > + if (use_sg) > + tell_host_sgs(vb, vb->inflate_vq, pfn_min, pfn_max); Please describe why tell_host_sgs() can work without __GFP_D...
2015 Dec 04
0
[PATCH v4 1/2] virtio_balloon: Restore the entire balloon after the system freeze
..._pfns(u32 pfns[], struct page *page) pfns[i] = page_to_balloon_pfn(page) + i; } -static void fill_balloon(struct virtio_balloon *vb, size_t num) +static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) { struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; + unsigned num_allocated_pages; /* We can only do one array worth at a time. */ num = min(num, ARRAY_SIZE(vb->pfns)); @@ -162,10 +163,13 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num) adjust_managed_page_count(page, -1); } + num_allocated_pages = vb->num_pfns; /* Did we get any? */ if...
2017 Nov 07
0
[vhost:vhost 1/1] drivers/virtio/virtio_balloon.c:164:3: error: implicit declaration of function 'balloon_page_push'
...version] while ((page = balloon_page_pop(&pages))) { ^ cc1: some warnings being treated as errors vim +/balloon_page_push +164 drivers/virtio/virtio_balloon.c 143 144 static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) 145 { 146 unsigned num_allocated_pages; 147 unsigned num_pfns; 148 struct page *page; 149 LIST_HEAD(pages); 150 151 for (num_pfns = 0; num_pfns < num; 152 num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE) { 153 struct page *page = balloon_page_alloc(); 154 155 if (!page) { 156 dev_info_rateli...
2017 Nov 07
0
[vhost:vhost 1/1] drivers/virtio/virtio_balloon.c:164:3: error: implicit declaration of function 'balloon_page_push'
...version] while ((page = balloon_page_pop(&pages))) { ^ cc1: some warnings being treated as errors vim +/balloon_page_push +164 drivers/virtio/virtio_balloon.c 143 144 static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) 145 { 146 unsigned num_allocated_pages; 147 unsigned num_pfns; 148 struct page *page; 149 LIST_HEAD(pages); 150 151 for (num_pfns = 0; num_pfns < num; 152 num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE) { 153 struct page *page = balloon_page_alloc(); 154 155 if (!page) { 156 dev_info_rateli...
2017 Nov 14
0
[vhost:vhost 1/9] drivers//virtio/virtio_balloon.c:167:3: error: implicit declaration of function 'balloon_page_push'; did you mean 'balloon_page_putback'?
...t a cast [-Wint-conversion] while ((page = balloon_page_pop(&pages))) { ^ cc1: some warnings being treated as errors vim +167 drivers//virtio/virtio_balloon.c 143 144 static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) 145 { 146 unsigned num_allocated_pages; 147 unsigned num_pfns; 148 struct page *page; 149 LIST_HEAD(pages); 150 151 /* We can only do one array worth at a time. */ 152 num = min(num, ARRAY_SIZE(vb->pfns)); 153 154 for (num_pfns = 0; num_pfns < num; 155 num_pfns += VIRTIO_BALLOON_PAGES_PER_P...
2017 Nov 14
0
[vhost:vhost 1/9] drivers//virtio/virtio_balloon.c:167:3: error: implicit declaration of function 'balloon_page_push'; did you mean 'balloon_page_putback'?
...t a cast [-Wint-conversion] while ((page = balloon_page_pop(&pages))) { ^ cc1: some warnings being treated as errors vim +167 drivers//virtio/virtio_balloon.c 143 144 static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) 145 { 146 unsigned num_allocated_pages; 147 unsigned num_pfns; 148 struct page *page; 149 LIST_HEAD(pages); 150 151 /* We can only do one array worth at a time. */ 152 num = min(num, ARRAY_SIZE(vb->pfns)); 153 154 for (num_pfns = 0; num_pfns < num; 155 num_pfns += VIRTIO_BALLOON_PAGES_PER_P...
2017 Oct 22
2
[PATCH v1 1/3] virtio-balloon: replace the coarse-grained balloon_lock
...;pfns + vb->num_pfns, page); > - vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE; > + set_page_pfns(vb, pfns + num_pfns, page); > if (!virtio_has_feature(vb->vdev, > VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) > adjust_managed_page_count(page, -1); > } > > - num_allocated_pages = vb->num_pfns; > + mutex_lock(&vb->inflate_lock); > /* Did we get any? */ > - if (vb->num_pfns != 0) > - tell_host(vb, vb->inflate_vq); > - mutex_unlock(&vb->balloon_lock); > + if (num_pfns != 0) > + tell_host(vb, vb->inflate_vq, pfns, num_pfns);...
2017 Oct 22
2
[PATCH v1 1/3] virtio-balloon: replace the coarse-grained balloon_lock
...;pfns + vb->num_pfns, page); > - vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE; > + set_page_pfns(vb, pfns + num_pfns, page); > if (!virtio_has_feature(vb->vdev, > VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) > adjust_managed_page_count(page, -1); > } > > - num_allocated_pages = vb->num_pfns; > + mutex_lock(&vb->inflate_lock); > /* Did we get any? */ > - if (vb->num_pfns != 0) > - tell_host(vb, vb->inflate_vq); > - mutex_unlock(&vb->balloon_lock); > + if (num_pfns != 0) > + tell_host(vb, vb->inflate_vq, pfns, num_pfns);...
2015 Dec 04
4
[PATCH v4 0/2] virtio_balloon: Fix restore and convert to workqueue
It has been long since I have sent v3 of the balloon conversion from a kthread to a workqueue. I have gained some more experience with the APIs in the meantime. I hope that you would like the outcome. I have added one more patch that fixes a separate problem with restoring the balloon after the system freeze. I have found this when testing the conversion. Changes against v3: + rebased on
2015 Dec 04
4
[PATCH v4 0/2] virtio_balloon: Fix restore and convert to workqueue
It has been long since I have sent v3 of the balloon conversion from a kthread to a workqueue. I have gained some more experience with the APIs in the meantime. I hope that you would like the outcome. I have added one more patch that fixes a separate problem with restoring the balloon after the system freeze. I have found this when testing the conversion. Changes against v3: + rebased on
2016 Aug 08
0
[PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
..._pfn = balloon_pfn; + found = true; + } + if (found) { + vb->end_pfn = end_pfn; + tell_host(vb, vq); + } + } +} + +static unsigned int fill_balloon(struct virtio_balloon *vb, size_t num, + bool use_bmap) { struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; - unsigned num_allocated_pages; + unsigned int num_allocated_pages; - /* We can only do one array worth at a time. */ - num = min(num, ARRAY_SIZE(vb->pfns)); + if (use_bmap) + init_pfn_range(vb); + else + /* We can only do one array worth at a time. */ + num = min(num, ARRAY_SIZE(vb->pfns)); mutex_lock(&vb-&gt...