netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	netdev@vger.kernel.org
Cc: mst@redhat.com, Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net-next RFC 3/4] vhost: interrupt coalescing support
Date: Mon, 6 Mar 2017 17:28:07 +0800	[thread overview]
Message-ID: <51a3fba2-a789-7bcf-946d-577220865709@redhat.com> (raw)
In-Reply-To: <20170303143909.80001-4-willemdebruijn.kernel@gmail.com>



On 2017年03月03日 22:39, Willem de Bruijn wrote:
> +void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq);
> +static enum hrtimer_restart vhost_coalesce_timer(struct hrtimer *timer)
> +{
> +	struct vhost_virtqueue *vq =
> +		container_of(timer, struct vhost_virtqueue, ctimer);
> +
> +	if (mutex_trylock(&vq->mutex)) {
> +		vq->coalesce_frames = vq->max_coalesce_frames;
> +		vhost_signal(vq->dev, vq);
> +		mutex_unlock(&vq->mutex);
> +	}
> +
> +	/* TODO: restart if lock failed and not held by handle_tx */
> +	return HRTIMER_NORESTART;
> +}
> +

Then we may lose an interrupt forever if no new tx request? I believe we 
need e.g vhost_poll_queue() here.

Thanks

  reply	other threads:[~2017-03-06  9:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03 14:39 [PATCH net-next RFC 0/4] virtio-net tx napi Willem de Bruijn
2017-03-03 14:39 ` [PATCH net-next RFC 1/4] virtio-net: napi helper functions Willem de Bruijn
2017-03-03 14:39 ` [PATCH net-next RFC 2/4] virtio-net: transmit napi Willem de Bruijn
2017-03-06  9:21   ` Jason Wang
2017-03-06 17:50     ` Willem de Bruijn
2017-03-06 18:55       ` David Miller
2017-03-06 19:33         ` Michael S. Tsirkin
2017-03-06 19:43           ` Willem de Bruijn
2017-03-03 14:39 ` [PATCH net-next RFC 3/4] vhost: interrupt coalescing support Willem de Bruijn
2017-03-06  9:28   ` Jason Wang [this message]
2017-03-06 17:31     ` Willem de Bruijn
2017-03-08  3:25       ` Jason Wang
2017-03-03 14:39 ` [PATCH net-next RFC 4/4] virtio-net: clean tx descriptors from rx napi Willem de Bruijn
2017-03-06  9:34   ` Jason Wang
2017-03-06 17:43     ` Willem de Bruijn
2017-03-06 18:04       ` Willem de Bruijn
2017-03-06 19:44 ` [PATCH net-next RFC 0/4] virtio-net tx napi Michael S. Tsirkin

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=51a3fba2-a789-7bcf-946d-577220865709@redhat.com \
    --to=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=willemb@google.com \
    --cc=willemdebruijn.kernel@gmail.com \
    /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).