Re: [RFC PATCH v2 1/1] Workqueue based vhost workers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 13 Oct 2013 21:55:43 -0400
Bandan Das <bsd@xxxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux