Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jan 2008 16:06:44 GMT
From:      Scott Long <scottl@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 133554 for review
Message-ID:  <200801181606.m0IG6ixE077260@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133554

Change 133554 by scottl@scottl-ix on 2008/01/18 16:05:48

	Apply an even bigger hammer to get xenstore messages to work
	during early boot.  Also note that the previous checkin added
	basic xenhub and xenbus newbus devices.

Affected files ...

.. //depot/projects/xen31-xenbus/sys/xen/xenbus/xenbus_probe.c#3 edit
.. //depot/projects/xen31-xenbus/sys/xen/xenbus/xenbus_xs.c#2 edit

Differences ...

==== //depot/projects/xen31-xenbus/sys/xen/xenbus/xenbus_probe.c#3 (text+ko) ====


==== //depot/projects/xen31-xenbus/sys/xen/xenbus/xenbus_xs.c#2 (text+ko) ====

@@ -146,22 +146,22 @@
 		char *body;
 		int i;
 			 
-		if (scheduler_running == 0) {
+		
+		spin_lock(&xs_state.reply_lock);
+
+		while (list_empty(&xs_state.reply_list)) {
+			spin_unlock(&xs_state.reply_lock);
+			if (scheduler_running == 0) {
 				/*
 				 * Give other domain time to run :-/
 				 */
-				for (i = 0; i < 10000; i++)
-						HYPERVISOR_yield();
+				for (i = 0; i < 1000000; i++)
+					HYPERVISOR_yield();
 				xs_process_msg();
-		}
-		
-		spin_lock(&xs_state.reply_lock);
-
-		while (list_empty(&xs_state.reply_list)) {
-				spin_unlock(&xs_state.reply_lock);
-				wait_event_interruptible(&xs_state.reply_waitq,
-										 !list_empty(&xs_state.reply_list));
-				spin_lock(&xs_state.reply_lock);
+			}
+			wait_event_interruptible(&xs_state.reply_waitq,
+			    !list_empty(&xs_state.reply_list));
+			spin_lock(&xs_state.reply_lock);
 		}
 
 		msg = TAILQ_FIRST(&xs_state.reply_list);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801181606.m0IG6ixE077260>