[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/2] argo: correctly report pending message length
When a message is requeue'd in Xen's internal queue, the queue entry contains the length of the message so that Xen knows to send a VIRQ to the respective domain when enough space frees up in the ring. Due to a small bug, however, Xen doesn't populate the length of the msg if a given write fails, so this length is always reported as zero. This causes Xen to spurriously wake up a domain even when the ring doesn't have enough space. This patch makes sure that the msg len is properly reported by populating it in the event of a write failure. Signed-off-by: Nicholas Tsirakis <tsirakisn@xxxxxxxxxxxx> --- xen/common/argo.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/common/argo.c b/xen/common/argo.c index 2f874a570d..eb541829d6 100644 --- a/xen/common/argo.c +++ b/xen/common/argo.c @@ -2050,6 +2050,12 @@ sendv(struct domain *src_d, xen_argo_addr_t *src_addr, { int rc; + /* + * if ringbuf_insert fails, then len will never be populated. + * make sure to populate it here. + */ + iov_count(iovs, niov, &len); + argo_dprintk("argo_ringbuf_sendv failed, EAGAIN\n"); /* requeue to issue a notification when space is there */ rc = pending_requeue(dst_d, ring_info, src_id.domain_id, len); -- 2.17.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |