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

From: Tejun Heo
Date: Sun Sep 28 2014 - 08:43:29 EST


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 | WQ_MEM_RECLAIM, 0);

Is WQ_MEM_RECLAIM necessary here? Does virtio_balloon depended upon
from memory allocation path?

...
> The 2nd way to create the workqueue has about the same results as kthread.
> This is why it is used in the patch.

You're testing WQ_UNBOUND vs. !WQ_UNBOUND and yes for most use cases,
!WQ_UNBOUND will be more efficient. The right thing to do in most
cases is using alloc_workqueue() w/ as minimum extra flags as
possible.

Thanks!

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/