#include <linux/spinlock.h>
#include <linux/kthread.h>
#include <linux/list.h>
+#include <linux/delay.h>
#include <xen/balloon.h>
#include <asm/hypervisor.h>
#include "common.h"
dispatch_rw_block_io(blkif, &req, pending_req);
break;
default:
+ /* A good sign something is wrong: sleep for a while to
+ * avoid excessive CPU consumption by a bad guest. */
+ mdelay(1);
DPRINTK("error: unknown block io operation [%d]\n",
req.operation);
make_response(blkif, req.id, req.operation,
free_req(pending_req);
break;
}
+
+ /* Yield point for this unbounded loop. */
+ cond_resched();
}
+
return more_to_do;
}