PERFORCE change 133554 for review

Scott Long scottl at FreeBSD.org
Fri Jan 18 08:06:45 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=133554

Change 133554 by scottl at 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);


More information about the p4-projects mailing list