shithub: riscv

Download patch

ref: 500a91e7a3207c74b28dcd40aedd8e460fe41be0
parent: 3f230d717df96122eab58f49e8807833006f56a8
author: mischief <[email protected]>
date: Wed Jun 25 11:47:31 EDT 2014

xen: gotta go fast

use smaller timeouts for sleeps while waiting for xen ether and sd devices to come online. in practice they come up very quickly.

--- a/sys/src/9/xen/etherxen.c
+++ b/sys/src/9/xen/etherxen.c
@@ -356,7 +356,7 @@
 	xenstore_gets(dir, "state", buf, sizeof buf);
 	while (strtol(buf, 0, 0) != XenbusStateConnected) {
 		print("etherxen: waiting for vif %d to connect\n", ctlr->vifno);
-		tsleep(&up->sleep, return0, 0, 1000);
+		tsleep(&up->sleep, return0, 0, 50);
 		xenstore_gets(dir, "state", buf, sizeof buf);
 	}
 }
--- a/sys/src/9/xen/sdxen.c
+++ b/sys/src/9/xen/sdxen.c
@@ -111,7 +111,7 @@
 	xenstore_gets(dir, "state", buf, sizeof buf);
 	while (strtol(buf, 0, 0) != XenbusStateConnected) {
 		print("sdxen: waiting for vbd %d to connect\n", ctlr->devid);
-		tsleep(&up->sleep, return0, 0, 1000);
+		tsleep(&up->sleep, return0, 0, 50);
 		xenstore_gets(dir, "state", buf, sizeof buf);
 	}
 	xenstore_gets(dir, "sector-size", buf, sizeof buf);