WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [BROKEN PATCH] Work around pvops lost event channel bug

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [BROKEN PATCH] Work around pvops lost event channel bug
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 12 Oct 2010 15:35:51 +0100
Delivery-date: Tue, 12 Oct 2010 07:46:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Our automated tests are failing to push because, with some
probability, a lost event channel event makes xenconsoled, and the
domU get stuck.

We think this is going to be fixed by
  
http://xenbits.xen.org/gitweb?p=people/ianc/linux-2.6.git;a=commit;h=5d30cb2a85912ffb5f6556d55472c26801eef2ea
  http://lists.xensource.com/archives/html/xen-devel/2010-10/msg00370.html

But here is a workaround (against xen-4.0-testing) that in my tests
seemed to make dom0 xenconsoled unwedge.

Ian.

diff -r c32e9163328d tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Mon Oct 04 12:53:03 2010 +0100
+++ b/tools/console/daemon/io.c Tue Oct 12 15:28:36 2010 +0100
@@ -891,8 +891,9 @@ static void handle_ring_read(struct doma
        if (dom->is_dead)
                return;
 
-       if ((port = xc_evtchn_pending(dom->xce_handle)) == -1)
-               return;
+//     if ((port = xc_evtchn_pending(dom->xce_handle)) == -1)
+//             return;
+       port = dom->local_port;
 
        dom->event_count++;
 
@@ -975,6 +976,7 @@ void handle_io(void)
 {
        fd_set readfds, writefds;
        int ret;
+       static struct timeval abs_max_timeout = { 10, 0 };
 
        if (log_hv) {
                xc_handle = xc_interface_open();
@@ -1076,7 +1078,7 @@ void handle_io(void)
                }
 
                ret = select(max_fd + 1, &readfds, &writefds, 0,
-                            next_timeout ? &timeout : NULL);
+                            next_timeout ? &timeout : &abs_max_timeout);
 
                if (log_reload) {
                        handle_log_reload();
@@ -1105,9 +1107,7 @@ void handle_io(void)
                for (d = dom_head; d; d = n) {
                        n = d->next;
                        if (d->event_count < RATE_LIMIT_ALLOWANCE) {
-                               if (d->xce_handle != -1 &&
-                                   FD_ISSET(xc_evtchn_fd(d->xce_handle),
-                                            &readfds))
+                               if (d->xce_handle != -1)
                                        handle_ring_read(d);
                        }
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [BROKEN PATCH] Work around pvops lost event channel bug, Ian Jackson <=