Re: [PATCH] virtio_balloon: Convert "vballon" kthread into a workqueue

2014-10-14 Thread Rusty Russell
Petr Mladek writes: > Workqueues have clean and rich API for all basic operations. The code is > usually > easier and better readable. It can be easily tuned for the given purpose. OK, sure. > -static void fill_balloon(struct virtio_balloon *vb, size_t num) > +static void fill_balloon(struct vi

Re: [PATCH] virtio_balloon: Convert "vballon" kthread into a workqueue

2014-09-28 Thread Tejun Heo
On Thu, Sep 25, 2014 at 06:20:41PM +0200, Petr Mladek wrote: ... > 1st create_freezable_workqueue("vballoon_wq"); All create_*workqueue() interfaces are deprecated. Please don't create new usages. They map to alloc_*workqueue() anyway. > 2nd alloc_workqueue("vballoon_wq", WQ_FREEZABLE |

[PATCH] virtio_balloon: Convert "vballon" kthread into a workqueue

2014-09-25 Thread Petr Mladek
Workqueues have clean and rich API for all basic operations. The code is usually easier and better readable. It can be easily tuned for the given purpose. In many cases, it allows to avoid an extra kernel thread. It helps to stop the growing number of them. Also there will be less thread-specific