search for: virtballoon_changed

Displaying 20 results from an estimated 198 matches for "virtballoon_changed".

2019 Jan 03
1
[PATCH v1 1/2] virtio-balloon: tweak config_changed implementation
On Thu, Jan 03, 2019 at 01:31:01PM +0800, Wei Wang wrote: > virtio-ccw has deadlock issues with reading config registers inside the > interrupt context, so we tweak the virtballoon_changed implementation > by moving the config read operations into the related workqueue contexts. > > Signed-off-by: Wei Wang <wei.w.wang at intel.com> > --- > drivers/virtio/virtio_balloon.c | 54 ++++++++++++++++++++--------------------- > 1 file changed, 26 insertions(+), 28 d...
2019 Jan 03
6
[PATCH v1 0/2] virtio-balloon: tweak config_changed
Since virtio-ccw doesn't work with accessing to the config registers inside an interrupt context, this patch series avoids that issue by moving the config register accesses to the related workqueue contexts. Wei Wang (2): virtio-balloon: tweak config_changed implementation virtio-balloon: improve update_balloon_size_func drivers/virtio/virtio_balloon.c | 59
2019 Jan 04
4
[PATCH v2 0/2] virtio-balloon: tweak config_changed
Since virtio-ccw doesn't work with accessing to the config space inside an interrupt context, this patch series avoids that issue by moving the config register accesses to the related workqueue contexts. v1->v2 ChangeLog: - add config_read_bitmap to indicate to the workqueue callbacks about the necessity of reading the related config fields. Wei Wang (2): virtio-balloon: tweak
2014 Nov 20
1
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...orkqueue with a pending work item on it. destroy_workqueue() will > > try to drain the target wq, warn if it doesn't finish in certain > > number of iterations and just keep trying indefinitely. > > I wonder if it is guaranteed that none would trigger > stats_request() or virtballoon_changed() when virtballoon_remove() is > being called. I guess so because the original code would fail > otherwise. The two functions access "vb->config_change" > and the structure is freed in virtballoon_remove() without > any protection. > > I am trying to confirm this by...
2014 Nov 20
1
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...orkqueue with a pending work item on it. destroy_workqueue() will > > try to drain the target wq, warn if it doesn't finish in certain > > number of iterations and just keep trying indefinitely. > > I wonder if it is guaranteed that none would trigger > stats_request() or virtballoon_changed() when virtballoon_remove() is > being called. I guess so because the original code would fail > otherwise. The two functions access "vb->config_change" > and the structure is freed in virtballoon_remove() without > any protection. > > I am trying to confirm this by...
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...register(&vb->pr_dev_info); >> if (err) >> - goto out_unregister_shrinker; >> + goto out_unregister_oom; >> } >> >> virtio_device_ready(vdev); >> @@ -1017,8 +1002,11 @@ static int virtballoon_probe(struct virtio_device *vdev) >> virtballoon_changed(vdev); >> return 0; >> >> +out_unregister_oom: >> + if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) >> + unregister_oom_notifier(&vb->oom_nb); >> out_unregister_shrinker: >> - if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_...
2020 Mar 10
2
[PATCH v2] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM
...register(&vb->pr_dev_info); >> if (err) >> - goto out_unregister_shrinker; >> + goto out_unregister_oom; >> } >> >> virtio_device_ready(vdev); >> @@ -1017,8 +1002,11 @@ static int virtballoon_probe(struct virtio_device *vdev) >> virtballoon_changed(vdev); >> return 0; >> >> +out_unregister_oom: >> + if (virtio_has_feature(vdev, VIRTIO_BALLOON_F_DEFLATE_ON_OOM)) >> + unregister_oom_notifier(&vb->oom_nb); >> out_unregister_shrinker: >> - if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_...
2017 Jun 13
1
[PATCH] virtio_balloon: disable VIOMMU support
...BALLOON_F_STATS_VQ, @@ -675,6 +681,7 @@ static struct virtio_driver virtio_balloon_driver = { .driver.name = KBUILD_MODNAME, .driver.owner = THIS_MODULE, .id_table = id_table, + .validate = virtballoon_validate, .probe = virtballoon_probe, .remove = virtballoon_remove, .config_changed = virtballoon_changed, -- MST
2019 Jan 03
0
[PATCH v1 1/2] virtio-balloon: tweak config_changed implementation
virtio-ccw has deadlock issues with reading config registers inside the interrupt context, so we tweak the virtballoon_changed implementation by moving the config read operations into the related workqueue contexts. Signed-off-by: Wei Wang <wei.w.wang at intel.com> --- drivers/virtio/virtio_balloon.c | 54 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/driv...
2019 Jan 03
1
[PATCH v1 1/2] virtio-balloon: tweak config_changed implementation
On Thu, 3 Jan 2019 13:31:01 +0800 Wei Wang <wei.w.wang at intel.com> wrote: > virtio-ccw has deadlock issues with reading config registers inside the s/config registers/the config space/ ? > interrupt context, so we tweak the virtballoon_changed implementation > by moving the config read operations into the related workqueue contexts. Also credit Christian with a Reported-by:? > > Signed-off-by: Wei Wang <wei.w.wang at intel.com> > --- > drivers/virtio/virtio_balloon.c | 54 ++++++++++++++++++++---------------------...
2017 Jun 13
1
[PATCH] virtio_balloon: disable VIOMMU support
...BALLOON_F_STATS_VQ, @@ -675,6 +681,7 @@ static struct virtio_driver virtio_balloon_driver = { .driver.name = KBUILD_MODNAME, .driver.owner = THIS_MODULE, .id_table = id_table, + .validate = virtballoon_validate, .probe = virtballoon_probe, .remove = virtballoon_remove, .config_changed = virtballoon_changed, -- MST
2018 Jun 15
0
[PATCH v33 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...ck_t stop_update_lock; bool stop_update; + struct virtio_balloon_free_page_hints *hints; + /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -326,17 +344,6 @@ static void stats_handle_request(struct virtio_balloon *vb) virtqueue_kick(vq); } -static void virtballoon_changed(struct virtio_device *vdev) -{ - struct virtio_balloon *vb = vdev->priv; - unsigned long flags; - - spin_lock_irqsave(&vb->stop_update_lock, flags); - if (!vb->stop_update) - queue_work(system_freezable_wq, &vb->update_balloon_size_work); - spin_unlock_irqrestore(&vb->st...
2019 Jan 04
0
[PATCH v2 1/2] virtio-balloon: tweak config_changed implementation
virtio-ccw has deadlock issues with reading the config space inside the interrupt context, so we tweak the virtballoon_changed implementation by moving the config read operations into the related workqueue contexts. The config_read_bitmap is used as a flag to the workqueue callbacks about the related config fields that need to be read. Reported-by: Christian Borntraeger <borntraeger at de.ibm.com> Signed-off-by: Wei...
2018 Jan 17
2
[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...nicate guest-initiated requests to the > hypervisor, > * the stats queue operates in reverse. The driver initializes the > virtqueue > @@ -316,17 +393,6 @@ static void stats_handle_request(struct virtio_balloon > *vb) > virtqueue_kick(vq); > } > > -static void virtballoon_changed(struct virtio_device *vdev) > -{ > - struct virtio_balloon *vb = vdev->priv; > - unsigned long flags; > - > - spin_lock_irqsave(&vb->stop_update_lock, flags); > - if (!vb->stop_update) > - queue_work(system_freezable_wq, &vb->update_balloon_size_work); >...
2018 Jan 17
2
[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...nicate guest-initiated requests to the > hypervisor, > * the stats queue operates in reverse. The driver initializes the > virtqueue > @@ -316,17 +393,6 @@ static void stats_handle_request(struct virtio_balloon > *vb) > virtqueue_kick(vq); > } > > -static void virtballoon_changed(struct virtio_device *vdev) > -{ > - struct virtio_balloon *vb = vdev->priv; > - unsigned long flags; > - > - spin_lock_irqsave(&vb->stop_update_lock, flags); > - if (!vb->stop_update) > - queue_work(system_freezable_wq, &vb->update_balloon_size_work); >...
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...+ uint32_t cmd_id_active; > + > /* Waiting for host to ack the pages we released. */ > wait_queue_head_t acked; > You want u32 types. > @@ -326,17 +353,6 @@ static void stats_handle_request(struct virtio_balloon *vb) > virtqueue_kick(vq); > } > > -static void virtballoon_changed(struct virtio_device *vdev) > -{ > - struct virtio_balloon *vb = vdev->priv; > - unsigned long flags; > - > - spin_lock_irqsave(&vb->stop_update_lock, flags); > - if (!vb->stop_update) > - queue_work(system_freezable_wq, &vb->update_balloon_size_work); >...
2018 Jun 26
2
[PATCH v34 2/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...+ uint32_t cmd_id_active; > + > /* Waiting for host to ack the pages we released. */ > wait_queue_head_t acked; > You want u32 types. > @@ -326,17 +353,6 @@ static void stats_handle_request(struct virtio_balloon *vb) > virtqueue_kick(vq); > } > > -static void virtballoon_changed(struct virtio_device *vdev) > -{ > - struct virtio_balloon *vb = vdev->priv; > - unsigned long flags; > - > - spin_lock_irqsave(&vb->stop_update_lock, flags); > - if (!vb->stop_update) > - queue_work(system_freezable_wq, &vb->update_balloon_size_work); >...
2018 Feb 07
2
[PATCH v26 2/2 RESEND] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...st */ + uint32_t cmd_id_received; + /* The cmd id that is in use */ + __virtio32 cmd_id_use; + /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -316,17 +334,6 @@ static void stats_handle_request(struct virtio_balloon *vb) virtqueue_kick(vq); } -static void virtballoon_changed(struct virtio_device *vdev) -{ - struct virtio_balloon *vb = vdev->priv; - unsigned long flags; - - spin_lock_irqsave(&vb->stop_update_lock, flags); - if (!vb->stop_update) - queue_work(system_freezable_wq, &vb->update_balloon_size_work); - spin_unlock_irqrestore(&vb->st...
2018 Feb 07
2
[PATCH v26 2/2 RESEND] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
...st */ + uint32_t cmd_id_received; + /* The cmd id that is in use */ + __virtio32 cmd_id_use; + /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -316,17 +334,6 @@ static void stats_handle_request(struct virtio_balloon *vb) virtqueue_kick(vq); } -static void virtballoon_changed(struct virtio_device *vdev) -{ - struct virtio_balloon *vb = vdev->priv; - unsigned long flags; - - spin_lock_irqsave(&vb->stop_update_lock, flags); - if (!vb->stop_update) - queue_work(system_freezable_wq, &vb->update_balloon_size_work); - spin_unlock_irqrestore(&vb->st...
2017 Nov 03
0
[PATCH v17 6/6] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...tqueue_kick(vq); +} + /* * Send balloon pages in sgs to host. The balloon pages are recorded in the * page xbitmap. Each bit in the bitmap corresponds to a page of PAGE_SIZE. @@ -495,9 +528,8 @@ static void stats_handle_request(struct virtio_balloon *vb) virtqueue_kick(vq); } -static void virtballoon_changed(struct virtio_device *vdev) +static void virtballoon_cmd_balloon_memory(struct virtio_balloon *vb) { - struct virtio_balloon *vb = vdev->priv; unsigned long flags; spin_lock_irqsave(&vb->stop_update_lock, flags); @@ -506,6 +538,50 @@ static void virtballoon_changed(struct virtio_de...