search for: num_freed_pages

Displaying 20 results from an estimated 144 matches for "num_freed_pages".

2016 May 20
6
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...ize) { + page = balloon_pfn_to_page(pfn); + if (!virtio_has_feature(vb->vdev, + VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) + adjust_managed_page_count(page, 1); + put_page(page); + } + } +} + +static unsigned long leak_balloon_bitmap(struct virtio_balloon *vb, size_t num) +{ + unsigned long num_freed_pages = num; + struct page *page; + struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; + + if (balloon_page_bitmap_init(vb) < 0) + return num_freed_pages; + + mutex_lock(&vb->balloon_lock); + for (vb->num_pfns = 0; vb->num_pfns < num; + vb->num_pfns += VIRTIO_BALL...
2016 May 20
6
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...ize) { + page = balloon_pfn_to_page(pfn); + if (!virtio_has_feature(vb->vdev, + VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) + adjust_managed_page_count(page, 1); + put_page(page); + } + } +} + +static unsigned long leak_balloon_bitmap(struct virtio_balloon *vb, size_t num) +{ + unsigned long num_freed_pages = num; + struct page *page; + struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; + + if (balloon_page_bitmap_init(vb) < 0) + return num_freed_pages; + + mutex_lock(&vb->balloon_lock); + for (vb->num_pfns = 0; vb->num_pfns < num; + vb->num_pfns += VIRTIO_BALL...
2014 Oct 08
2
[PATCH 2/2] virtio_balloon: free some memory from baloon on OOM
...e pages in the balloon. + * If virtio balloon manages to release some memory, it will make the system + * return and retry the allocation that forced the OOM killer to run. + */ +static int virtballoon_oom_notify(struct notifier_block *self, + unsigned long dummy, void *parm) +{ + unsigned int num_freed_pages; + unsigned long *freed = (unsigned long *)parm; + struct virtio_balloon *vb = container_of((struct notifier_block *)self, + struct virtio_balloon, nb); + + num_freed_pages = leak_balloon(vb, oom_vballoon_pages); + update_balloon_size(vb); + *freed += num_freed_pages; + + return NOTIFY_OK; +}...
2014 Oct 08
2
[PATCH 2/2] virtio_balloon: free some memory from baloon on OOM
...e pages in the balloon. + * If virtio balloon manages to release some memory, it will make the system + * return and retry the allocation that forced the OOM killer to run. + */ +static int virtballoon_oom_notify(struct notifier_block *self, + unsigned long dummy, void *parm) +{ + unsigned int num_freed_pages; + unsigned long *freed = (unsigned long *)parm; + struct virtio_balloon *vb = container_of((struct notifier_block *)self, + struct virtio_balloon, nb); + + num_freed_pages = leak_balloon(vb, oom_vballoon_pages); + update_balloon_size(vb); + *freed += num_freed_pages; + + return NOTIFY_OK; +}...
2016 May 24
4
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) > > + adjust_managed_page_count(page, 1); > > + put_page(page); > > + } > > + } > > +} > > + > > +static unsigned long leak_balloon_bitmap(struct virtio_balloon *vb, > > +size_t num) { > > + unsigned long num_freed_pages = num; > > + struct page *page; > > + struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; > > + > > + if (balloon_page_bitmap_init(vb) < 0) > > + return num_freed_pages; > > + > > + mutex_lock(&vb->balloon_lock); > > + for (vb-&...
2016 May 24
4
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) > > + adjust_managed_page_count(page, 1); > > + put_page(page); > > + } > > + } > > +} > > + > > +static unsigned long leak_balloon_bitmap(struct virtio_balloon *vb, > > +size_t num) { > > + unsigned long num_freed_pages = num; > > + struct page *page; > > + struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; > > + > > + if (balloon_page_bitmap_init(vb) < 0) > > + return num_freed_pages; > > + > > + mutex_lock(&vb->balloon_lock); > > + for (vb-&...
2016 May 20
0
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...(!virtio_has_feature(vb->vdev, > + VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) > + adjust_managed_page_count(page, 1); > + put_page(page); > + } > + } > +} > + > +static unsigned long leak_balloon_bitmap(struct virtio_balloon *vb, size_t num) > +{ > + unsigned long num_freed_pages = num; > + struct page *page; > + struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; > + > + if (balloon_page_bitmap_init(vb) < 0) > + return num_freed_pages; > + > + mutex_lock(&vb->balloon_lock); > + for (vb->num_pfns = 0; vb->num_pfns < nu...
2014 Oct 08
3
[PATCH 0/2] shrink virtio baloon on OOM in guest
Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enough time to react on fast changing memory load. As a result OS runs out of memory and invokes OOM-killer. The balancing of
2014 Oct 08
3
[PATCH 0/2] shrink virtio baloon on OOM in guest
Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enough time to react on fast changing memory load. As a result OS runs out of memory and invokes OOM-killer. The balancing of
2016 May 24
0
[PATCH RFC kernel] balloon: speed up inflating/deflating process
...> + adjust_managed_page_count(page, 1); > > > + put_page(page); > > > + } > > > + } > > > +} > > > + > > > +static unsigned long leak_balloon_bitmap(struct virtio_balloon *vb, > > > +size_t num) { > > > + unsigned long num_freed_pages = num; > > > + struct page *page; > > > + struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; > > > + > > > + if (balloon_page_bitmap_init(vb) < 0) > > > + return num_freed_pages; > > > + > > > + mutex_lock(&vb->b...
2017 Oct 22
2
[PATCH v1 2/3] virtio-balloon: deflate up to oom_pages on OOM
...0600); > MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); > > #ifdef CONFIG_BALLOON_COMPACTION > @@ -359,16 +359,20 @@ static int virtballoon_oom_notify(struct notifier_block *self, > { > struct virtio_balloon *vb; > unsigned long *freed; > - unsigned num_freed_pages; > + unsigned int npages = oom_pages; > > vb = container_of(self, struct virtio_balloon, nb); > if (!virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) > return NOTIFY_OK; > > freed = parm; > - num_freed_pages = leak_balloon(vb, oom_pages); > +...
2017 Oct 22
2
[PATCH v1 2/3] virtio-balloon: deflate up to oom_pages on OOM
...0600); > MODULE_PARM_DESC(oom_pages, "pages to free on OOM"); > > #ifdef CONFIG_BALLOON_COMPACTION > @@ -359,16 +359,20 @@ static int virtballoon_oom_notify(struct notifier_block *self, > { > struct virtio_balloon *vb; > unsigned long *freed; > - unsigned num_freed_pages; > + unsigned int npages = oom_pages; > > vb = container_of(self, struct virtio_balloon, nb); > if (!virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) > return NOTIFY_OK; > > freed = parm; > - num_freed_pages = leak_balloon(vb, oom_pages); > +...
2016 Oct 25
1
[RESEND PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...tio_balloon *vb, > } > } > > -static unsigned leak_balloon(struct virtio_balloon *vb, size_t num) > +static unsigned int leak_balloon(struct virtio_balloon *vb, size_t num, > + bool use_bmap) this is just a feature bit - why not get it internally? > { > - unsigned num_freed_pages; > + unsigned int num_freed_pages; > struct page *page; > struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; > LIST_HEAD(pages); > > - /* We can only do one array worth at a time. */ > - num = min(num, ARRAY_SIZE(vb->pfns)); > + if (use_bmap) > +...
2016 Oct 25
1
[RESEND PATCH v3 kernel 4/7] virtio-balloon: speed up inflate/deflate process
...tio_balloon *vb, > } > } > > -static unsigned leak_balloon(struct virtio_balloon *vb, size_t num) > +static unsigned int leak_balloon(struct virtio_balloon *vb, size_t num, > + bool use_bmap) this is just a feature bit - why not get it internally? > { > - unsigned num_freed_pages; > + unsigned int num_freed_pages; > struct page *page; > struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; > LIST_HEAD(pages); > > - /* We can only do one array worth at a time. */ > - num = min(num, ARRAY_SIZE(vb->pfns)); > + if (use_bmap) > +...
2014 Oct 15
2
[PATCH v2 0/2] shrink virtio baloon on OOM in guest
Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enough time to react on fast changing memory load. As a result OS runs out of memory and invokes OOM-killer. The balancing of
2014 Oct 15
2
[PATCH v2 0/2] shrink virtio baloon on OOM in guest
Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enough time to react on fast changing memory load. As a result OS runs out of memory and invokes OOM-killer. The balancing of
2014 Oct 15
4
[PATCH v3 0/2] shrink virtio baloon on OOM in guest
Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enough time to react on fast changing memory load. As a result OS runs out of memory and invokes OOM-killer. The balancing of
2014 Oct 15
4
[PATCH v3 0/2] shrink virtio baloon on OOM in guest
Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enough time to react on fast changing memory load. As a result OS runs out of memory and invokes OOM-killer. The balancing of
2017 Oct 10
0
[PATCH] virtio: avoid possible OOM lockup at virtballoon_oom_notify()
...loon.c > @@ -192,7 +192,7 @@ static void release_pages_balloon(struct virtio_balloon *vb, > } > } > > -static unsigned leak_balloon(struct virtio_balloon *vb, size_t num) > +static unsigned leak_balloon(struct virtio_balloon *vb, size_t num, bool wait) > { > unsigned num_freed_pages; > struct page *page; > @@ -202,7 +202,13 @@ static unsigned leak_balloon(struct virtio_balloon *vb, size_t num) > /* We can only do one array worth at a time. */ > num = min(num, ARRAY_SIZE(vb->pfns)); > > - mutex_lock(&vb->balloon_lock); > + if (wait) > +...
2017 Oct 12
0
[PATCH] virtio: avoid possible OOM lockup at virtballoon_oom_notify()
...c > @@ -192,7 +192,7 @@ static void release_pages_balloon(struct virtio_balloon *vb, > } > } > > -static unsigned leak_balloon(struct virtio_balloon *vb, size_t num) > +static unsigned leak_balloon(struct virtio_balloon *vb, size_t num, bool wait) > { > unsigned num_freed_pages; > struct page *page; > @@ -202,7 +202,13 @@ static unsigned leak_balloon(struct virtio_balloon *vb, size_t num) > /* We can only do one array worth at a time. */ > num = min(num, ARRAY_SIZE(vb->pfns)); > > - mutex_lock(&vb->balloon_lock); > + if (wait) &g...