lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 5 Nov 2018 10:53:42 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Vitaly Mayatskikh <v.mayatskih@...il.com>,
        "Michael S . Tsirkin" <mst@...hat.com>
Cc:     kvm@...r.kernel.org, virtualization@...ts.linux-foundation.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] vhost: add per-vq worker thread


On 2018/11/3 上午12:07, Vitaly Mayatskikh wrote:
> +
> +static int vhost_vq_poll_start(struct vhost_virtqueue *vq)
> +{
> +	if (!vq->worker) {
> +		vq->worker = kthread_create(vhost_vq_worker, vq, "vhost-%d/%i",
> +					    vq->dev->pid, vq->index);
> +		if (IS_ERR(vq->worker)) {
> +			int ret = PTR_ERR(vq->worker);
> +
> +			pr_err("%s: can't create vq worker: %d\n", __func__,
> +			       ret);
> +			vq->worker = NULL;
> +			return ret;
> +		}
> +	}
> +	vhost_work_init(&vq->work, vhost_vq_poll_start_work);
> +	vhost_vq_work_queue(vq, &vq->work);
> +	return 0;
> +}
> +


I wonder whether or not it's better to allow the device to specific the 
worker here instead of forcing a per vq worker model. Then we can keep 
the behavior of exist implementation and do optimization on top?

Thanks


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ