On Sun, 13 Oct 2013 21:55:43 -0400
Bandan Das <[email protected]> wrote:

> +
> +     if (cmwq_worker) {
> +             ret = vhost_wq_init();
> +             if (ret) {
> +                     pr_info("Enabling wq based vhost workers failed! "
> +                              "Switching to device based worker instead\n");
> +                     cmwq_worker = 0;
> +             } else
> +               pr_info("Enabled workqueues based vhost workers\n");
> +     }

Why keep two mechanisms (and two potential code paths to maintain)
when the only way vhost_wq_init() can fail is if out of memory.
You may have needed the messages and this during development but for
the final version just do it one way.

If alloc_workqueue fails, then the net_init function should propogate
the error code and fail as well.


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to