Thread (17 messages) read the whole thread 17 messages, 4 authors, 2017-03-08

Re: [PATCH net-next RFC 3/4] vhost: interrupt coalescing support

From: Jason Wang <hidden>
Date: 2017-03-06 09:28:12


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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help