* Can Xen sleep or wake up a thread?
@ 2013-10-08 15:11 Xinxin Jin
2013-10-08 16:38 ` Dario Faggioli
2013-10-09 11:15 ` George Dunlap
0 siblings, 2 replies; 4+ messages in thread
From: Xinxin Jin @ 2013-10-08 15:11 UTC (permalink / raw)
To: Xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 360 bytes --]
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 !!
Xinxin
[-- Attachment #1.2: Type: text/html, Size: 787 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can Xen sleep or wake up a thread?
2013-10-08 15:11 Can Xen sleep or wake up a thread? Xinxin Jin
@ 2013-10-08 16:38 ` Dario Faggioli
2013-10-09 11:15 ` George Dunlap
1 sibling, 0 replies; 4+ messages in thread
From: Dario Faggioli @ 2013-10-08 16:38 UTC (permalink / raw)
To: Xinxin Jin; +Cc: Xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1179 bytes --]
On mar, 2013-10-08 at 08:11 -0700, Xinxin Jin wrote:
> Hi everyone,
>
>
> I found in Xen, when synchronization between multiple threads is
> needed, Xen always uses busy wait or simple spin lock.
>
Mmm... What exactly is a 'thread' here? Are you talking about Xen
internals? If yes, I don't think there's much multithreading involved
there...
> In linux, the kernel can block a waiting thread and schedule other
> threads for execution. Why does Xen do not have this mechanism?
>
Well, Linux, as a general purpose kernel, does indeed schedule a lot of
different stuff, yes, but I still don't see where you think Xen
could/should do something similar...
> I guess it is because the performance issue? A lot of appreciation for
> your answer !!
>
Perhaps you can:
- show some example of what you mean
- describe what is the issue that you are seeing/trying to solve
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can Xen sleep or wake up a thread?
2013-10-08 15:11 Can Xen sleep or wake up a thread? Xinxin Jin
2013-10-08 16:38 ` Dario Faggioli
@ 2013-10-09 11:15 ` George Dunlap
2013-10-09 11:24 ` Ian Campbell
1 sibling, 1 reply; 4+ messages in thread
From: George Dunlap @ 2013-10-09 11:15 UTC (permalink / raw)
To: Xinxin Jin; +Cc: Xen-devel
On Tue, Oct 8, 2013 at 4:11 PM, Xinxin Jin <xinxinjin89@gmail.com> 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.
-George
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can Xen sleep or wake up a thread?
2013-10-09 11:15 ` George Dunlap
@ 2013-10-09 11:24 ` Ian Campbell
0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2013-10-09 11:24 UTC (permalink / raw)
To: George Dunlap; +Cc: Xinxin Jin, Xen-devel
On Wed, 2013-10-09 at 12:15 +0100, George Dunlap wrote:
> On Tue, Oct 8, 2013 at 4:11 PM, Xinxin Jin <xinxinjin89@gmail.com> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-09 11:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-08 15:11 Can Xen sleep or wake up a thread? Xinxin Jin
2013-10-08 16:38 ` Dario Faggioli
2013-10-09 11:15 ` George Dunlap
2013-10-09 11:24 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.