search for: balloon_page_pop

Displaying 20 results from an estimated 48 matches for "balloon_page_pop".

2017 Nov 07
0
[vhost:vhost 1/1] drivers/virtio/virtio_balloon.c:164:3: error: implicit declaration of function 'balloon_page_push'
...virtio/virtio_balloon.c:164:3: error: implicit declaration of function 'balloon_page_push' [-Werror=implicit-function-declaration] balloon_page_push(&pages, page); ^~~~~~~~~~~~~~~~~ >> drivers/virtio/virtio_balloon.c:174:17: error: implicit declaration of function 'balloon_page_pop' [-Werror=implicit-function-declaration] while ((page = balloon_page_pop(&pages))) { ^~~~~~~~~~~~~~~~ >> drivers/virtio/virtio_balloon.c:174:15: warning: assignment makes pointer from integer without a cast [-Wint-conversion] while ((page = balloon_page_p...
2017 Nov 07
0
[vhost:vhost 1/1] drivers/virtio/virtio_balloon.c:164:3: error: implicit declaration of function 'balloon_page_push'
...virtio/virtio_balloon.c:164:3: error: implicit declaration of function 'balloon_page_push' [-Werror=implicit-function-declaration] balloon_page_push(&pages, page); ^~~~~~~~~~~~~~~~~ >> drivers/virtio/virtio_balloon.c:174:17: error: implicit declaration of function 'balloon_page_pop' [-Werror=implicit-function-declaration] while ((page = balloon_page_pop(&pages))) { ^~~~~~~~~~~~~~~~ >> drivers/virtio/virtio_balloon.c:174:15: warning: assignment makes pointer from integer without a cast [-Wint-conversion] while ((page = balloon_page_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'?
...9;balloon_page_push'; did you mean 'balloon_page_putback'? [-Werror=implicit-function-declaration] balloon_page_push(&pages, page); ^~~~~~~~~~~~~~~~~ balloon_page_putback >> drivers//virtio/virtio_balloon.c:174:17: error: implicit declaration of function 'balloon_page_pop'; did you mean 'balloon_page_alloc'? [-Werror=implicit-function-declaration] while ((page = balloon_page_pop(&pages))) { ^~~~~~~~~~~~~~~~ balloon_page_alloc drivers//virtio/virtio_balloon.c:174:15: warning: assignment makes pointer fro...
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'?
...9;balloon_page_push'; did you mean 'balloon_page_putback'? [-Werror=implicit-function-declaration] balloon_page_push(&pages, page); ^~~~~~~~~~~~~~~~~ balloon_page_putback >> drivers//virtio/virtio_balloon.c:174:17: error: implicit declaration of function 'balloon_page_pop'; did you mean 'balloon_page_alloc'? [-Werror=implicit-function-declaration] while ((page = balloon_page_pop(&pages))) { ^~~~~~~~~~~~~~~~ balloon_page_alloc drivers//virtio/virtio_balloon.c:174:15: warning: assignment makes pointer fro...
2017 Nov 08
2
[PATCH v3] virtio_balloon: fix deadlock on OOM
...ev_info_ratelimited(&vb->vdev->dev, @@ -162,6 +163,19 @@ static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) msleep(200); break; } + + balloon_page_push(&pages, page); + } + + mutex_lock(&vb->balloon_lock); + + vb->num_pfns = 0; + + while ((page = balloon_page_pop(&pages))) { + balloon_page_enqueue(&vb->vb_dev_info, page); + + vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE; + set_page_pfns(vb, vb->pfns + vb->num_pfns, page); vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE; if (!virtio_has_feature(vb->vdev, diff --git a/incl...
2017 Nov 08
2
[PATCH v3] virtio_balloon: fix deadlock on OOM
...ev_info_ratelimited(&vb->vdev->dev, @@ -162,6 +163,19 @@ static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) msleep(200); break; } + + balloon_page_push(&pages, page); + } + + mutex_lock(&vb->balloon_lock); + + vb->num_pfns = 0; + + while ((page = balloon_page_pop(&pages))) { + balloon_page_enqueue(&vb->vb_dev_info, page); + + vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE; + set_page_pfns(vb, vb->pfns + vb->num_pfns, page); vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE; if (!virtio_has_feature(vb->vdev, diff --git a/incl...
2017 Oct 13
4
[PATCH] virtio_balloon: fix deadlock on OOM
...(struct virtio_balloon *vb, size_t num) msleep(200); break; } + + balloon_page_push(&pages, page); + } + + /* We can only do one array worth at a time. */ + num = min(num, ARRAY_SIZE(vb->pfns)); + + mutex_lock(&vb->balloon_lock); + + vb->num_pfns = 0; + + while ((page = balloon_page_pop(&pages))) { + balloon_page_enqueue(&vb->vb_dev_info, page); + + vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE; + set_page_pfns(vb, vb->pfns + vb->num_pfns, page); vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE; if (!virtio_has_feature(vb->vdev, diff --git a/incl...
2017 Oct 13
4
[PATCH] virtio_balloon: fix deadlock on OOM
...(struct virtio_balloon *vb, size_t num) msleep(200); break; } + + balloon_page_push(&pages, page); + } + + /* We can only do one array worth at a time. */ + num = min(num, ARRAY_SIZE(vb->pfns)); + + mutex_lock(&vb->balloon_lock); + + vb->num_pfns = 0; + + while ((page = balloon_page_pop(&pages))) { + balloon_page_enqueue(&vb->vb_dev_info, page); + + vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE; + set_page_pfns(vb, vb->pfns + vb->num_pfns, page); vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE; if (!virtio_has_feature(vb->vdev, diff --git a/incl...
2019 Jul 18
2
[PATCH v3 1/2] mm/balloon_compaction: avoid duplicate page removal
From: Wei Wang <wei.w.wang at intel.com> A #GP is reported in the guest when requesting balloon inflation via virtio-balloon. The reason is that the virtio-balloon driver has removed the page from its internal page list (via balloon_page_pop), but balloon_page_enqueue_one also calls "list_del" to do the removal. This is necessary when it's used from balloon_page_enqueue_list, but not from balloon_page_enqueue. Move list_del to balloon_page_enqueue, and update comments accordingly. Fixes: 418a3ab1e778 (mm/balloon_compac...
2019 Jul 18
2
[PATCH v4 1/2] mm/balloon_compaction: avoid duplicate page removal
From: Wei Wang <wei.w.wang at intel.com> A #GP is reported in the guest when requesting balloon inflation via virtio-balloon. The reason is that the virtio-balloon driver has removed the page from its internal page list (via balloon_page_pop), but balloon_page_enqueue_one also calls "list_del" to do the removal. This is necessary when it's used from balloon_page_enqueue_list, but not from balloon_page_enqueue. Move list_del to balloon_page_enqueue, and update comments accordingly. Fixes: 418a3ab1e778 (mm/balloon_compac...
2019 Jul 18
1
[PATCH v5 1/2] mm/balloon_compaction: avoid duplicate page removal
From: Wei Wang <wei.w.wang at intel.com> A #GP is reported in the guest when requesting balloon inflation via virtio-balloon. The reason is that the virtio-balloon driver has removed the page from its internal page list (via balloon_page_pop), but balloon_page_enqueue_one also calls "list_del" to do the removal. This is necessary when it's used from balloon_page_enqueue_list, but not from balloon_page_enqueue. Move list_del to balloon_page_enqueue, and update comments accordingly. Fixes: 418a3ab1e778 (mm/balloon_compac...
2019 Jul 18
1
[PATCH v3 2/2] balloon: fix up comments
...tion to properly enqueue a new allocated > + balloon > + * page before definitively removing the page from the guest system. > * > - * Drivers must not call balloon_page_enqueue on pages that have been > - * pushed to a list with balloon_page_push before removing them with > - * balloon_page_pop. To all pages on a list, use balloon_page_list_enqueue > - * instead. > - * > - * This function returns the page address for the recently enqueued page or > - * NULL in the case we fail to allocate a new page this turn. > + * Drivers must not call balloon_page_enqueue on pages that h...
2017 Nov 08
0
[PATCH v2] virtio_balloon: fix deadlock on OOM
...ev_info_ratelimited(&vb->vdev->dev, @@ -162,6 +163,19 @@ static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) msleep(200); break; } + + balloon_page_push(&pages, page); + } + + mutex_lock(&vb->balloon_lock); + + vb->num_pfns = 0; + + while ((page = balloon_page_pop(&pages))) { + balloon_page_enqueue(&vb->vb_dev_info, page); + + vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE; + set_page_pfns(vb, vb->pfns + vb->num_pfns, page); vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE; if (!virtio_has_feature(vb->vdev, diff --git a/incl...
2017 Nov 08
0
[PATCH v2] virtio_balloon: fix deadlock on OOM
...ev_info_ratelimited(&vb->vdev->dev, @@ -162,6 +163,19 @@ static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) msleep(200); break; } + + balloon_page_push(&pages, page); + } + + mutex_lock(&vb->balloon_lock); + + vb->num_pfns = 0; + + while ((page = balloon_page_pop(&pages))) { + balloon_page_enqueue(&vb->vb_dev_info, page); + + vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE; + set_page_pfns(vb, vb->pfns + vb->num_pfns, page); vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE; if (!virtio_has_feature(vb->vdev, diff --git a/incl...
2017 Nov 03
0
[PATCH v17 3/6] mm/balloon_compaction.c: split balloon page allocation and enqueue
...dev_info_ratelimited(&vb->vdev->dev, @@ -162,6 +163,18 @@ static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) msleep(200); break; } + + balloon_page_push(&pages, page); + } + + mutex_lock(&vb->balloon_lock); + + vb->num_pfns = 0; + while ((page = balloon_page_pop(&pages))) { + balloon_page_enqueue(&vb->vb_dev_info, page); + + vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE; + set_page_pfns(vb, vb->pfns + vb->num_pfns, page); vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE; if (!virtio_has_feature(vb->vdev, diff --git a/incl...
2017 Dec 01
0
Memory corruption in powerpc guests with virtio_balloon (was Re: [PATCH v3] virtio_balloon: fix deadlock on OOM)
...,19 @@ static unsigned fill_balloon(struct virtio_balloon *vb, size_t num) > msleep(200); > break; > } > + > + balloon_page_push(&pages, page); > + } > + > + mutex_lock(&vb->balloon_lock); > + > + vb->num_pfns = 0; > + > + while ((page = balloon_page_pop(&pages))) { > + balloon_page_enqueue(&vb->vb_dev_info, page); > + > + vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE; > + > set_page_pfns(vb, vb->pfns + vb->num_pfns, page); > vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE; > if (!virtio_has_fea...
2017 Dec 26
0
[PATCH v20 4/7] virtio-balloon: VIRTIO_BALLOON_F_SG
On 12/25/2017 10:51 PM, Tetsuo Handa wrote: > Wei Wang wrote: >>>>>> @@ -173,8 +292,15 @@ static unsigned fill_balloon(struct >>>>>> virtio_balloon *vb, size_t num) >>>>>> while ((page = balloon_page_pop(&pages))) { >>>>>> balloon_page_enqueue(&vb->vb_dev_info, page); >>>>>> + if (use_sg) { >>>>>> + if (xb_set_page(vb, page, &pfn_min, &pfn_max) < 0) { >>>>>> + __...
2017 Dec 01
1
Memory corruption in powerpc guests with virtio_balloon (was Re: [PATCH v3] virtio_balloon: fix deadlock on OOM)
...b, size_t num) > > msleep(200); > > break; > > } > > + > > + balloon_page_push(&pages, page); > > + } > > + > > + mutex_lock(&vb->balloon_lock); > > + > > + vb->num_pfns = 0; > > + > > + while ((page = balloon_page_pop(&pages))) { > > + balloon_page_enqueue(&vb->vb_dev_info, page); > > + > > + vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE; > > + > > set_page_pfns(vb, vb->pfns + vb->num_pfns, page); > > vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAG...
2017 Dec 01
1
Memory corruption in powerpc guests with virtio_balloon (was Re: [PATCH v3] virtio_balloon: fix deadlock on OOM)
...b, size_t num) > > msleep(200); > > break; > > } > > + > > + balloon_page_push(&pages, page); > > + } > > + > > + mutex_lock(&vb->balloon_lock); > > + > > + vb->num_pfns = 0; > > + > > + while ((page = balloon_page_pop(&pages))) { > > + balloon_page_enqueue(&vb->vb_dev_info, page); > > + > > + vb->num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE; > > + > > set_page_pfns(vb, vb->pfns + vb->num_pfns, page); > > vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAG...
2019 Jul 18
0
[PATCH v3 2/2] balloon: fix up comments
...+ * Drivers must call this function to properly enqueue a new allocated balloon + * page before definitively removing the page from the guest system. * - * Drivers must not call balloon_page_enqueue on pages that have been - * pushed to a list with balloon_page_push before removing them with - * balloon_page_pop. To all pages on a list, use balloon_page_list_enqueue - * instead. - * - * This function returns the page address for the recently enqueued page or - * NULL in the case we fail to allocate a new page this turn. + * Drivers must not call balloon_page_enqueue on pages that have been pushed to + * a...