search for: virtballoon_freeze

Displaying 20 results from an estimated 49 matches for "virtballoon_freeze".

2012 Apr 26
4
[PATCH 0/3] virtio: balloon: cleanups and a fix
Hello, The main fix is to update the host with the current balloon value on module removal after deflating the balloon. Without the fix, the host has the wrong idea of the ballooned memory in the guest. This is patch 2. Patches 1 and 3 are cleanups with no effective code change. Please apply, Amit Shah (3): virtio: balloon: drop restore_common() virtio: balloon: let host know of updated
2012 Apr 26
4
[PATCH 0/3] virtio: balloon: cleanups and a fix
Hello, The main fix is to update the host with the current balloon value on module removal after deflating the balloon. Without the fix, the host has the wrong idea of the ballooned memory in the guest. This is patch 2. Patches 1 and 3 are cleanups with no effective code change. Please apply, Amit Shah (3): virtio: balloon: drop restore_common() virtio: balloon: let host know of updated
2016 Jan 01
1
[PATCH v4 1/2] virtio_balloon: Restore the entire balloon after the system freeze
...id we get any? */ > if (vb->num_pfns != 0) > tell_host(vb, vb->inflate_vq); > mutex_unlock(&vb->balloon_lock); > + > + return num_allocated_pages; > } > > static void release_pages_balloon(struct virtio_balloon *vb) > @@ -581,6 +585,7 @@ static int virtballoon_freeze(struct virtio_device *vdev) > static int virtballoon_restore(struct virtio_device *vdev) > { > struct virtio_balloon *vb = vdev->priv; > + s64 diff; > int ret; > > ret = init_vqs(vdev->priv); > @@ -589,7 +594,9 @@ static int virtballoon_restore(struct virtio_...
2016 Jan 01
1
[PATCH v4 1/2] virtio_balloon: Restore the entire balloon after the system freeze
...id we get any? */ > if (vb->num_pfns != 0) > tell_host(vb, vb->inflate_vq); > mutex_unlock(&vb->balloon_lock); > + > + return num_allocated_pages; > } > > static void release_pages_balloon(struct virtio_balloon *vb) > @@ -581,6 +585,7 @@ static int virtballoon_freeze(struct virtio_device *vdev) > static int virtballoon_restore(struct virtio_device *vdev) > { > struct virtio_balloon *vb = vdev->priv; > + s64 diff; > int ret; > > ret = init_vqs(vdev->priv); > @@ -589,7 +594,9 @@ static int virtballoon_restore(struct virtio_...
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
2013 Sep 06
4
[PATCH 0/2] virtio: Replace CONFIG_PM with CONFIG_PM_SLEEP
This patchset replace CONFIG_PM with CONFIG_PM_SLEEP for all virtio drivers and virtio pci driver. With patch 1/2, two compile warnings are eliminated for virtio pci driver, and patch 2/2 is a clean up for all virtio drivers as suggested by Amit Shah. Aaron Lu (2): virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM virtio: pm: use CONFIG_PM_SLEEP instead of CONFIG_PM
2013 Sep 06
4
[PATCH 0/2] virtio: Replace CONFIG_PM with CONFIG_PM_SLEEP
This patchset replace CONFIG_PM with CONFIG_PM_SLEEP for all virtio drivers and virtio pci driver. With patch 1/2, two compile warnings are eliminated for virtio pci driver, and patch 2/2 is a clean up for all virtio drivers as suggested by Amit Shah. Aaron Lu (2): virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM virtio: pm: use CONFIG_PM_SLEEP instead of CONFIG_PM
2015 Dec 04
0
[PATCH v4 1/2] virtio_balloon: Restore the entire balloon after the system freeze
...num_allocated_pages = vb->num_pfns; /* Did we get any? */ if (vb->num_pfns != 0) tell_host(vb, vb->inflate_vq); mutex_unlock(&vb->balloon_lock); + + return num_allocated_pages; } static void release_pages_balloon(struct virtio_balloon *vb) @@ -581,6 +585,7 @@ static int virtballoon_freeze(struct virtio_device *vdev) static int virtballoon_restore(struct virtio_device *vdev) { struct virtio_balloon *vb = vdev->priv; + s64 diff; int ret; ret = init_vqs(vdev->priv); @@ -589,7 +594,9 @@ static int virtballoon_restore(struct virtio_device *vdev) virtio_device_ready(vd...
2012 Feb 29
1
[PATCH 1/1] virtio: balloon: leak / fill balloon across S4
...-git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 95aeedf..958e512 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -367,29 +367,45 @@ static void __devexit virtballoon_remove(struct virtio_device *vdev) #ifdef CONFIG_PM static int virtballoon_freeze(struct virtio_device *vdev) { + struct virtio_balloon *vb = vdev->priv; + /* * The kthread is already frozen by the PM core before this * function is called. */ + while (vb->num_pages) + leak_balloon(vb, vb->num_pages); + update_balloon_size(vb); + /* Ensure we don't g...
2012 Feb 29
1
[PATCH 1/1] virtio: balloon: leak / fill balloon across S4
...-git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 95aeedf..958e512 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c @@ -367,29 +367,45 @@ static void __devexit virtballoon_remove(struct virtio_device *vdev) #ifdef CONFIG_PM static int virtballoon_freeze(struct virtio_device *vdev) { + struct virtio_balloon *vb = vdev->priv; + /* * The kthread is already frozen by the PM core before this * function is called. */ + while (vb->num_pages) + leak_balloon(vb, vb->num_pages); + update_balloon_size(vb); + /* Ensure we don't g...
2014 Nov 12
3
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
...r = -ENOMEM; goto out_del_vqs; } @@ -476,7 +468,7 @@ static void virtballoon_remove(struct virtio_device *vdev) { struct virtio_balloon *vb = vdev->priv; - kthread_stop(vb->thread); + destroy_workqueue(vb->wq); remove_common(vb); kfree(vb); } @@ -487,7 +479,7 @@ static int virtballoon_freeze(struct virtio_device *vdev) struct virtio_balloon *vb = vdev->priv; /* - * The kthread is already frozen by the PM core before this + * The workqueue is already frozen by the PM core before this * function is called. */ -- 1.8.5.2
2014 Nov 12
3
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
...r = -ENOMEM; goto out_del_vqs; } @@ -476,7 +468,7 @@ static void virtballoon_remove(struct virtio_device *vdev) { struct virtio_balloon *vb = vdev->priv; - kthread_stop(vb->thread); + destroy_workqueue(vb->wq); remove_common(vb); kfree(vb); } @@ -487,7 +479,7 @@ static int virtballoon_freeze(struct virtio_device *vdev) struct virtio_balloon *vb = vdev->priv; /* - * The kthread is already frozen by the PM core before this + * The workqueue is already frozen by the PM core before this * function is called. */ -- 1.8.5.2
2015 Dec 04
0
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
...+534,7 @@ static void virtballoon_remove(struct virtio_device *vdev) struct virtio_balloon *vb = vdev->priv; unregister_oom_notifier(&vb->nb); - kthread_stop(vb->thread); + cancel_work_sync(&vb->wq_work); remove_common(vb); kfree(vb); } @@ -574,10 +545,9 @@ static int virtballoon_freeze(struct virtio_device *vdev) struct virtio_balloon *vb = vdev->priv; /* - * The kthread is already frozen by the PM core before this + * The workqueue is already frozen by the PM core before this * function is called. */ - remove_common(vb); return 0; } -- 1.8.5.6
2014 Nov 12
0
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
...76,7 +468,7 @@ static void virtballoon_remove(struct virtio_device *vdev) > { > struct virtio_balloon *vb = vdev->priv; > > - kthread_stop(vb->thread); > + destroy_workqueue(vb->wq); > remove_common(vb); > kfree(vb); > } > @@ -487,7 +479,7 @@ static int virtballoon_freeze(struct virtio_device *vdev) > struct virtio_balloon *vb = vdev->priv; > > /* > - * The kthread is already frozen by the PM core before this > + * The workqueue is already frozen by the PM core before this > * function is called. > */ > > -- > 1.8.5....
2016 Jan 01
2
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
...> unregister_oom_notifier(&vb->nb); > - kthread_stop(vb->thread); > + cancel_work_sync(&vb->wq_work); OK but since job requeues itself, cancelling like this might not be enough. > remove_common(vb); > kfree(vb); > } > @@ -574,10 +545,9 @@ static int virtballoon_freeze(struct virtio_device *vdev) > struct virtio_balloon *vb = vdev->priv; > > /* > - * The kthread is already frozen by the PM core before this > + * The workqueue is already frozen by the PM core before this > * function is called. > */ > - > remove_common...
2016 Jan 01
2
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
...> unregister_oom_notifier(&vb->nb); > - kthread_stop(vb->thread); > + cancel_work_sync(&vb->wq_work); OK but since job requeues itself, cancelling like this might not be enough. > remove_common(vb); > kfree(vb); > } > @@ -574,10 +545,9 @@ static int virtballoon_freeze(struct virtio_device *vdev) > struct virtio_balloon *vb = vdev->priv; > > /* > - * The kthread is already frozen by the PM core before this > + * The workqueue is already frozen by the PM core before this > * function is called. > */ > - > remove_common...
2014 Nov 20
2
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...: - vdev->config->del_vqs(vdev); out_free_vb: kfree(vb); out: @@ -476,7 +460,6 @@ static void virtballoon_remove(struct virtio_device *vdev) { struct virtio_balloon *vb = vdev->priv; - kthread_stop(vb->thread); remove_common(vb); kfree(vb); } @@ -487,7 +470,7 @@ static int virtballoon_freeze(struct virtio_device *vdev) struct virtio_balloon *vb = vdev->priv; /* - * The kthread is already frozen by the PM core before this + * The workqueue is already frozen by the PM core before this * function is called. */ -- 1.8.5.2
2014 Nov 20
2
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...: - vdev->config->del_vqs(vdev); out_free_vb: kfree(vb); out: @@ -476,7 +460,6 @@ static void virtballoon_remove(struct virtio_device *vdev) { struct virtio_balloon *vb = vdev->priv; - kthread_stop(vb->thread); remove_common(vb); kfree(vb); } @@ -487,7 +470,7 @@ static int virtballoon_freeze(struct virtio_device *vdev) struct virtio_balloon *vb = vdev->priv; /* - * The kthread is already frozen by the PM core before this + * The workqueue is already frozen by the PM core before this * function is called. */ -- 1.8.5.2
2012 Mar 29
5
[PATCH 0/5] virtio: S3 support, use PM API macro for init
Hello, Turns out S3 is not different from S4 for virtio devices: the device is assumed to be reset, so the host and guest state are to be assumed to be out of sync upon resume. We handle the S4 case with exactly the same scenario, so just point the suspend/resume routines to the freeze/restore ones. Once that is done, we also use the PM API's macro to initialise the sleep functions. A