search for: remove_common

Displaying 20 results from an estimated 289 matches for "remove_common".

2014 Nov 20
1
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...60,6 @@ static void virtballoon_remove(struct virtio_device *vdev) > > > > > > { > > > > > > struct virtio_balloon *vb = vdev->priv; > > > > > > > > > > > > - kthread_stop(vb->thread); > > > > > > remove_common(vb); > > > > > > kfree(vb); > > > > > > } > > > > > > > > > > Shouldn't the work item be flushed before removal is complete? > > Great catch! > > > > > In fact, flushing it won't help because it can...
2014 Nov 20
1
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...60,6 @@ static void virtballoon_remove(struct virtio_device *vdev) > > > > > > { > > > > > > struct virtio_balloon *vb = vdev->priv; > > > > > > > > > > > > - kthread_stop(vb->thread); > > > > > > remove_common(vb); > > > > > > kfree(vb); > > > > > > } > > > > > > > > > > Shouldn't the work item be flushed before removal is complete? > > Great catch! > > > > > In fact, flushing it won't help because it can...
2014 Aug 06
2
[PATCH] virtio-rng: complete have_data completion in removing device
On (Wed) 06 Aug 2014 [16:05:41], Amos Kong wrote: > On Wed, Aug 06, 2014 at 01:35:15AM +0800, Amos Kong wrote: > > When we try to hot-remove a busy virtio-rng device from QEMU monitor, > > the device can't be hot-removed. Because virtio-rng driver hangs at > > wait_for_completion_killable(). > > > > This patch fixed the hang by completing have_data completion
2014 Aug 06
2
[PATCH] virtio-rng: complete have_data completion in removing device
On (Wed) 06 Aug 2014 [16:05:41], Amos Kong wrote: > On Wed, Aug 06, 2014 at 01:35:15AM +0800, Amos Kong wrote: > > When we try to hot-remove a busy virtio-rng device from QEMU monitor, > > the device can't be hot-removed. Because virtio-rng driver hangs at > > wait_for_completion_killable(). > > > > This patch fixed the hang by completing have_data completion
2014 Nov 20
4
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...gt; > > ... > > > > @@ -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); > > > > } > > > > > > Shouldn't the work item be flushed before removal is complete? > > > > In fact, flushing it won't help because it can requeue itself, right? There's cancel_work_sync() to stop the s...
2014 Nov 20
4
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...gt; > > ... > > > > @@ -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); > > > > } > > > > > > Shouldn't the work item be flushed before removal is complete? > > > > In fact, flushing it won't help because it can requeue itself, right? There's cancel_work_sync() to stop the s...
2014 Sep 08
0
[PATCH] virtio-rng: complete have_data completion in removing device
...ing > wait_event_completion_killable(). > > Amit In my latest debugging, I found the hang is caused by unexpected reading when we started to remove the device. I have two draft fix, 1) is skip unexpected reading by checking a remove flag. 2) is unregistering device at the beginning of remove_common(). I think second patch is better if it won't cause new problem. The original patch (complete in remove_common()) is still necessary. Test results: hotplug issue disappeared (dd process will quit). diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index...
2015 Dec 04
4
[PATCH v4 0/2] virtio_balloon: Fix restore and convert to workqueue
...m freeze. I have found this when testing the conversion. Changes against v3: + rebased on 4.4-rc3 + call cancel_work_synch() when removing the balloon + do not queue the work from fill_balloon() and leak_balloon() because they are called also independently from the workqueue, e.g. remove_common(), virtballoon_oom_notify(). Re-queue the work from the work function when necessary. Changes against v2: + Use system_freezable_wq instead of an allocated one and move INIT_WORK() higher in virtballoon_probe(). + Fix typos in the commit message. Changes against v1: + More eleg...
2015 Dec 04
4
[PATCH v4 0/2] virtio_balloon: Fix restore and convert to workqueue
...m freeze. I have found this when testing the conversion. Changes against v3: + rebased on 4.4-rc3 + call cancel_work_synch() when removing the balloon + do not queue the work from fill_balloon() and leak_balloon() because they are called also independently from the workqueue, e.g. remove_common(), virtballoon_oom_notify(). Re-queue the work from the work function when necessary. Changes against v2: + Use system_freezable_wq instead of an allocated one and move INIT_WORK() higher in virtballoon_probe(). + Fix typos in the commit message. Changes against v1: + More eleg...
2016 Jan 01
1
[PATCH v4 1/2] virtio_balloon: Restore the entire balloon after the system freeze
On Fri, Dec 04, 2015 at 02:37:50PM +0100, Petr Mladek wrote: > fill_balloon() and leak_balloon() manipulate only a limited number > of pages in one call. This is the reason why remove_common() calls > leak_balloon() in a while cycle. > > remove_common() is called also when the system is being frozen. > But fill_balloon() is called only once when the system is being > restored. It means that most of the balloon stays leaked after > the system freeze and restore. Righ...
2016 Jan 01
1
[PATCH v4 1/2] virtio_balloon: Restore the entire balloon after the system freeze
On Fri, Dec 04, 2015 at 02:37:50PM +0100, Petr Mladek wrote: > fill_balloon() and leak_balloon() manipulate only a limited number > of pages in one call. This is the reason why remove_common() calls > leak_balloon() in a while cycle. > > remove_common() is called also when the system is being frozen. > But fill_balloon() is called only once when the system is being > restored. It means that most of the balloon stays leaked after > the system freeze and restore. Righ...
2014 Nov 20
2
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...e: > On Thu, Nov 20, 2014 at 05:03:17PM +0100, Petr Mladek wrote: > ... > > @@ -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); > > } > > Shouldn't the work item be flushed before removal is complete? In fact, flushing it won't help because it can requeue itself, right? > Thanks. > > -- > tejun
2014 Nov 20
2
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...e: > On Thu, Nov 20, 2014 at 05:03:17PM +0100, Petr Mladek wrote: > ... > > @@ -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); > > } > > Shouldn't the work item be flushed before removal is complete? In fact, flushing it won't help because it can requeue itself, right? > Thanks. > > -- > tejun
2012 May 28
6
[PATCH 0/5] virtio: rng: fixes
Hi Rusty, These are a few fixes for the virtio-rng driver. These were tested using the not-yet-upstream virtio-rng device patch to qemu: http://thread.gmane.org/gmane.comp.emulators.qemu/152668 Please apply. Amit Shah (5): virtio ids: fix comment for virtio-rng virtio: rng: allow tasks to be killed that are waiting for rng input virtio: rng: don't wait on host when module is going
2012 May 28
6
[PATCH 0/5] virtio: rng: fixes
Hi Rusty, These are a few fixes for the virtio-rng driver. These were tested using the not-yet-upstream virtio-rng device patch to qemu: http://thread.gmane.org/gmane.comp.emulators.qemu/152668 Please apply. Amit Shah (5): virtio ids: fix comment for virtio-rng virtio: rng: allow tasks to be killed that are waiting for rng input virtio: rng: don't wait on host when module is going
2014 Aug 12
3
[3.16 stable PATCH v2 1/2] virtio: rng: delay hwrng_register() till driver is ready
...r(&vi->hwrng); - if (err) { - vdev->config->del_vqs(vdev); - vi->vq = NULL; - kfree(vi); - ida_simple_remove(&rng_index_ida, index); - return err; - } - probe_done = true; return 0; } @@ -153,9 +145,11 @@ static int probe_common(struct virtio_device *vdev) static void remove_common(struct virtio_device *vdev) { struct virtrng_info *vi = vdev->priv; + vdev->config->reset(vdev); vi->busy = false; - hwrng_unregister(&vi->hwrng); + if (vi->hwrng_register_done) + hwrng_unregister(&vi->hwrng); vdev->config->del_vqs(vdev); ida_simple_re...
2014 Aug 12
3
[3.16 stable PATCH v2 1/2] virtio: rng: delay hwrng_register() till driver is ready
...r(&vi->hwrng); - if (err) { - vdev->config->del_vqs(vdev); - vi->vq = NULL; - kfree(vi); - ida_simple_remove(&rng_index_ida, index); - return err; - } - probe_done = true; return 0; } @@ -153,9 +145,11 @@ static int probe_common(struct virtio_device *vdev) static void remove_common(struct virtio_device *vdev) { struct virtrng_info *vi = vdev->priv; + vdev->config->reset(vdev); vi->busy = false; - hwrng_unregister(&vi->hwrng); + if (vi->hwrng_register_done) + hwrng_unregister(&vi->hwrng); vdev->config->del_vqs(vdev); ida_simple_re...
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
2014 Jul 21
3
[PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready
...amp;rng_index_ida, index); > - return err; > - } > - This needs to stay. register, and failure to do so, should occur in the probe routine. > probe_done = true; > return 0; > } > @@ -152,9 +144,11 @@ static int probe_common(struct virtio_device *vdev) > static void remove_common(struct virtio_device *vdev) > { > struct virtrng_info *vi = vdev->priv; > + > vdev->config->reset(vdev); > vi->busy = false; > - hwrng_unregister(&vi->hwrng); > + if (vi->hwrng_register_done) > + hwrng_unregister(&vi->hwrng); > vdev-...