[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Can Xen sleep or wake up a thread?



On Wed, 2013-10-09 at 12:15 +0100, George Dunlap wrote:
> On Tue, Oct 8, 2013 at 4:11 PM, Xinxin Jin <xinxinjin89@xxxxxxxxx> wrote:
> > Hi everyone,
> >
> > I found in Xen, when synchronization between multiple threads is needed, Xen
> > always uses busy wait or simple spin lock. In linux, the kernel can block a
> > waiting thread and schedule other threads for execution. Why does Xen do not
> > have this mechanism? I guess it is because the performance issue? A lot of
> > appreciation for your answer !!
> 
> Linux keeps per-thread kernel stacks, so it can call schedule() and
> block in the middle of kernel code.  Xen does not keep per-vcpu
> hypervisor stacks, so in general it cannot block in the middle of
> hypervisor code.

And since it does not deal with e.g. I/O which can take a long time
there is typically no need for the hypervisor to block anyway.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.