From: Jason Wang <jasowang@redhat.com>
To: Vitaly Mayatskikh <v.mayatskih@gmail.com>,
"Michael S . Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] vhost: add per-vq worker thread
Date: Mon, 5 Nov 2018 10:53:42 +0800 [thread overview]
Message-ID: <fe79c7fd-1e9f-dab8-3c65-8151181c922c@redhat.com> (raw)
In-Reply-To: <20181102160710.3741-2-v.mayatskih@gmail.com>
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
next prev parent reply other threads:[~2018-11-05 2:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 16:07 [PATCH 0/1] vhost: parallel virtqueue handling Vitaly Mayatskikh
2018-11-02 16:07 ` [PATCH 1/1] vhost: add per-vq worker thread Vitaly Mayatskikh
2018-11-05 2:53 ` Jason Wang [this message]
2018-11-05 3:28 ` Vitaly Mayatskih
2018-11-06 2:48 ` Jason Wang
2018-11-06 2:59 ` Vitaly Mayatskih
2018-11-05 2:51 ` [PATCH 0/1] vhost: parallel virtqueue handling Jason Wang
2018-11-05 3:40 ` Vitaly Mayatskih
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe79c7fd-1e9f-dab8-3c65-8151181c922c@redhat.com \
--to=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=v.mayatskih@gmail.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).