search for: wq_work

Displaying 18 results from an estimated 18 matches for "wq_work".

Did you mean: tx_work
2014 Nov 12
3
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
...vq, *deflate_vq, *stats_vq; - /* Where the ballooning thread waits for config to change. */ - wait_queue_head_t config_change; - - /* The thread servicing the balloon. */ - struct task_struct *thread; + /* The workqueue servicing the balloon. */ + struct workqueue_struct *wq; + struct work_struct wq_work; /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -128,12 +125,13 @@ static void set_page_pfns(u32 pfns[], struct page *page) static void fill_balloon(struct virtio_balloon *vb, size_t num) { struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; +...
2014 Nov 12
3
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
...vq, *deflate_vq, *stats_vq; - /* Where the ballooning thread waits for config to change. */ - wait_queue_head_t config_change; - - /* The thread servicing the balloon. */ - struct task_struct *thread; + /* The workqueue servicing the balloon. */ + struct workqueue_struct *wq; + struct work_struct wq_work; /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -128,12 +125,13 @@ static void set_page_pfns(u32 pfns[], struct page *page) static void fill_balloon(struct virtio_balloon *vb, size_t num) { struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; +...
2014 Sep 25
2
[PATCH] virtio_balloon: Convert "vballon" kthread into a workqueue
...vq, *deflate_vq, *stats_vq; - /* Where the ballooning thread waits for config to change. */ - wait_queue_head_t config_change; - - /* The thread servicing the balloon. */ - struct task_struct *thread; + /* The workqueue servicing the balloon. */ + struct workqueue_struct *wq; + struct work_struct wq_work; /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -125,12 +122,15 @@ static void set_page_pfns(u32 pfns[], struct page *page) pfns[i] = page_to_balloon_pfn(page) + i; } -static void fill_balloon(struct virtio_balloon *vb, size_t num) +static void fill_bal...
2014 Sep 25
2
[PATCH] virtio_balloon: Convert "vballon" kthread into a workqueue
...vq, *deflate_vq, *stats_vq; - /* Where the ballooning thread waits for config to change. */ - wait_queue_head_t config_change; - - /* The thread servicing the balloon. */ - struct task_struct *thread; + /* The workqueue servicing the balloon. */ + struct workqueue_struct *wq; + struct work_struct wq_work; /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -125,12 +122,15 @@ static void set_page_pfns(u32 pfns[], struct page *page) pfns[i] = page_to_balloon_pfn(page) + i; } -static void fill_balloon(struct virtio_balloon *vb, size_t num) +static void fill_bal...
2016 Jan 01
2
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
...> - /* Where the ballooning thread waits for config to change. */ > - wait_queue_head_t config_change; > - > - /* The thread servicing the balloon. */ > - struct task_struct *thread; > + /* The balloon servicing is delegated to a freezable workqueue. */ > + struct work_struct wq_work; > > /* Waiting for host to ack the pages we released. */ > wait_queue_head_t acked; > @@ -255,14 +251,15 @@ static void update_balloon_stats(struct virtio_balloon *vb) > * with a single buffer. From that point forward, all conversations consist of > * a hypervisor requ...
2016 Jan 01
2
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
...> - /* Where the ballooning thread waits for config to change. */ > - wait_queue_head_t config_change; > - > - /* The thread servicing the balloon. */ > - struct task_struct *thread; > + /* The balloon servicing is delegated to a freezable workqueue. */ > + struct work_struct wq_work; > > /* Waiting for host to ack the pages we released. */ > wait_queue_head_t acked; > @@ -255,14 +251,15 @@ static void update_balloon_stats(struct virtio_balloon *vb) > * with a single buffer. From that point forward, all conversations consist of > * a hypervisor requ...
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
2015 Dec 04
0
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
...nflate_vq, *deflate_vq, *stats_vq; - /* Where the ballooning thread waits for config to change. */ - wait_queue_head_t config_change; - - /* The thread servicing the balloon. */ - struct task_struct *thread; + /* The balloon servicing is delegated to a freezable workqueue. */ + struct work_struct wq_work; /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -255,14 +251,15 @@ static void update_balloon_stats(struct virtio_balloon *vb) * with a single buffer. From that point forward, all conversations consist of * a hypervisor request (a call to this function)...
2014 Nov 12
0
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
...Where the ballooning thread waits for config to change. */ > - wait_queue_head_t config_change; > - > - /* The thread servicing the balloon. */ > - struct task_struct *thread; > + /* The workqueue servicing the balloon. */ > + struct workqueue_struct *wq; > + struct work_struct wq_work; We could use system_freezable_wq instead. I do agree a dedicated wq is better since this can get blocked for a long time while allocating memory. However, please add a comment to this effect. > > /* Waiting for host to ack the pages we released. */ > wait_queue_head_t acked; >...
2014 Nov 20
2
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...nflate_vq, *deflate_vq, *stats_vq; - /* Where the ballooning thread waits for config to change. */ - wait_queue_head_t config_change; - - /* The thread servicing the balloon. */ - struct task_struct *thread; + /* The balloon servicing is delegated to a freezable workqueue. */ + struct work_struct wq_work; /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -128,12 +124,13 @@ static void set_page_pfns(u32 pfns[], struct page *page) static void fill_balloon(struct virtio_balloon *vb, size_t num) { struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; +...
2014 Nov 20
2
[PATCH v3] virtio_balloon: Convert "vballoon" kthread into a workqueue
...nflate_vq, *deflate_vq, *stats_vq; - /* Where the ballooning thread waits for config to change. */ - wait_queue_head_t config_change; - - /* The thread servicing the balloon. */ - struct task_struct *thread; + /* The balloon servicing is delegated to a freezable workqueue. */ + struct work_struct wq_work; /* Waiting for host to ack the pages we released. */ wait_queue_head_t acked; @@ -128,12 +124,13 @@ static void set_page_pfns(u32 pfns[], struct page *page) static void fill_balloon(struct virtio_balloon *vb, size_t num) { struct balloon_dev_info *vb_dev_info = &vb->vb_dev_info; +...
2016 Jan 02
3
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
...3,7 +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); > > > > OK but since job requeues itself, cancelling like this might not be enough. > > As long as there's no further external queueing, cancel_work_sync() is > guaranteed to kill a self-requeueing work item. > > Thanks. I didn't realise this. Thanks! Unfor...
2016 Jan 02
3
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
...3,7 +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); > > > > OK but since job requeues itself, cancelling like this might not be enough. > > As long as there's no further external queueing, cancel_work_sync() is > guaranteed to kill a self-requeueing work item. > > Thanks. I didn't realise this. Thanks! Unfor...
2014 Nov 14
1
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
Hello, Michael, Petr. On Wed, Nov 12, 2014 at 03:32:04PM +0200, Michael S. Tsirkin wrote: > > + /* The workqueue servicing the balloon. */ > > + struct workqueue_struct *wq; > > + struct work_struct wq_work; > > We could use system_freezable_wq instead. > I do agree a dedicated wq is better since this can get blocked > for a long time while allocating memory. > However, please add a comment to this effect. system_freezable_wq should be fine. Workqueues by default have a pretty high m...
2014 Nov 14
1
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
Hello, Michael, Petr. On Wed, Nov 12, 2014 at 03:32:04PM +0200, Michael S. Tsirkin wrote: > > + /* The workqueue servicing the balloon. */ > > + struct workqueue_struct *wq; > > + struct work_struct wq_work; > > We could use system_freezable_wq instead. > I do agree a dedicated wq is better since this can get blocked > for a long time while allocating memory. > However, please add a comment to this effect. system_freezable_wq should be fine. Workqueues by default have a pretty high m...
2016 Jan 02
0
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
...y fine. > > @@ -563,7 +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); > > OK but since job requeues itself, cancelling like this might not be enough. As long as there's no further external queueing, cancel_work_sync() is guaranteed to kill a self-requeueing work item. Thanks. -- tejun
2016 Jan 05
0
[PATCH v4 2/2] virtio_balloon: Use a workqueue instead of "vballoon" kthread
...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); > > > > > > OK but since job requeues itself, cancelling like this might not be enough. > > > > As long as there's no further external queueing, cancel_work_sync() is > > guaranteed to kill a self-requeueing work item. > > > > Thanks. > &...