Displaying 5 results from an estimated 5 matches for "vballoon_wq".
Did you mean:
balloon_wq
2014 Sep 25
2
[PATCH] virtio_balloon: Convert "vballon" kthread into a workqueue
...another work item
has to be scheduled from fill_balloon() and leak_balloon() when they do not
do all requested changes in a single call.
I think that performance is not the most critical thing in this case. Anyway,
I tried to create the workqueue two ways:
1st create_freezable_workqueue("vballoon_wq");
2nd alloc_workqueue("vballoon_wq", WQ_FREEZABLE | WQ_MEM_RECLAIM, 0);
And then I tried to modify 10 times the size of a virtual host by ballooning
between 20GB and 2GB. I got the following times:
-----------------------------------------------------
| | kthre...
2014 Sep 25
2
[PATCH] virtio_balloon: Convert "vballon" kthread into a workqueue
...another work item
has to be scheduled from fill_balloon() and leak_balloon() when they do not
do all requested changes in a single call.
I think that performance is not the most critical thing in this case. Anyway,
I tried to create the workqueue two ways:
1st create_freezable_workqueue("vballoon_wq");
2nd alloc_workqueue("vballoon_wq", WQ_FREEZABLE | WQ_MEM_RECLAIM, 0);
And then I tried to modify 10 times the size of a virtual host by ballooning
between 20GB and 2GB. I got the following times:
-----------------------------------------------------
| | kthre...
2014 Nov 12
3
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
...static int virtballoon_probe(struct virtio_device *vdev)
if (err)
goto out_free_vb;
- vb->thread = kthread_run(balloon, vb, "vballoon");
- if (IS_ERR(vb->thread)) {
- err = PTR_ERR(vb->thread);
+ INIT_WORK(&vb->wq_work, balloon);
+ vb->wq = alloc_workqueue("vballoon_wq", WQ_FREEZABLE, 0);
+ if (!vb->wq) {
+ err = -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(v...
2014 Nov 12
3
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
...static int virtballoon_probe(struct virtio_device *vdev)
if (err)
goto out_free_vb;
- vb->thread = kthread_run(balloon, vb, "vballoon");
- if (IS_ERR(vb->thread)) {
- err = PTR_ERR(vb->thread);
+ INIT_WORK(&vb->wq_work, balloon);
+ vb->wq = alloc_workqueue("vballoon_wq", WQ_FREEZABLE, 0);
+ if (!vb->wq) {
+ err = -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(v...
2014 Nov 12
0
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
...io_device *vdev)
> if (err)
> goto out_free_vb;
>
> - vb->thread = kthread_run(balloon, vb, "vballoon");
> - if (IS_ERR(vb->thread)) {
> - err = PTR_ERR(vb->thread);
> + INIT_WORK(&vb->wq_work, balloon);
> + vb->wq = alloc_workqueue("vballoon_wq", WQ_FREEZABLE, 0);
> + if (!vb->wq) {
> + err = -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);...