All of lore.kernel.org
 help / color / mirror / Atom feed
* vcpu_pause
@ 2007-03-02 23:26 Ky Srinivasan
  2007-03-04 11:56 ` vcpu_pause Keir Fraser
  0 siblings, 1 reply; 4+ messages in thread
From: Ky Srinivasan @ 2007-03-02 23:26 UTC (permalink / raw)
  To: xen-devel

What are the expected entry conditions to call vcpu_pause. How do we guarantee two vcpus don't deadlock by calling pause on each other.

Regards,

K. Y

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: vcpu_pause
  2007-03-02 23:26 vcpu_pause Ky Srinivasan
@ 2007-03-04 11:56 ` Keir Fraser
  2007-03-04 23:02   ` vcpu_pause Ky Srinivasan
  0 siblings, 1 reply; 4+ messages in thread
From: Keir Fraser @ 2007-03-04 11:56 UTC (permalink / raw)
  To: Ky Srinivasan, xen-devel

Synchronous vcpu_pause() and domain_pause() are only used on paths
executable in dom0 context. Hence there is no loop in the graph of
domain-X-can-pause-domain-Y, and we'll need to maintain that asymmetry when
we disaggregate dom0. For now, a BUG_ON(current->domain != dom0) in
vcpu_sleep_sync() would probably make things clearer.

 -- Keir

On 2/3/07 23:26, "Ky Srinivasan" <ksrinivasan@novell.com> wrote:

> What are the expected entry conditions to call vcpu_pause. How do we guarantee
> two vcpus don't deadlock by calling pause on each other.
> 
> Regards,
> 
> K. Y
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: vcpu_pause
  2007-03-04 11:56 ` vcpu_pause Keir Fraser
@ 2007-03-04 23:02   ` Ky Srinivasan
  2007-03-05  8:09     ` vcpu_pause Keir Fraser
  0 siblings, 1 reply; 4+ messages in thread
From: Ky Srinivasan @ 2007-03-04 23:02 UTC (permalink / raw)
  To: Keir Fraser, xen-devel

Kier,

Sorry for not being precise in my earlier email. Within an arbitrary domain, I was wondering how we were preventing potential deadlocks between vcpus that were attempting to pause each other; perhaps a higher level serialization lock could solve this problem. I was looking at using vcpu_pause to get a stable state for a vcpu in a domu context. Is this not a sanctioned usage of vcpu_pause.


K. Y
>>> On Sun, Mar 4, 2007 at  6:56 AM, in message
<C2106469.337F%Keir.Fraser@cl.cam.ac.uk>, Keir Fraser
<Keir.Fraser@cl.cam.ac.uk> wrote: 
> Synchronous vcpu_pause() and domain_pause() are only used on paths
> executable in dom0 context. Hence there is no loop in the graph of
> domain- X- can- pause- domain- Y, and we'll need to maintain that asymmetry when
> we disaggregate dom0. For now, a BUG_ON(current- >domain != dom0) in
> vcpu_sleep_sync() would probably make things clearer.
> 
>  --  Keir
> 
> On 2/3/07 23:26, "Ky Srinivasan" <ksrinivasan@novell.com> wrote:
> 
>> What are the expected entry conditions to call vcpu_pause. How do we 
> guarantee
>> two vcpus don't deadlock by calling pause on each other.
>> 
>> Regards,
>> 
>> K. Y
>> 
>> 
>> 
>> _______________________________________________
>> Xen- devel mailing list
>> Xen- devel@lists.xensource.com
>> http://lists.xensource.com/xen- devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: vcpu_pause
  2007-03-04 23:02   ` vcpu_pause Ky Srinivasan
@ 2007-03-05  8:09     ` Keir Fraser
  0 siblings, 0 replies; 4+ messages in thread
From: Keir Fraser @ 2007-03-05  8:09 UTC (permalink / raw)
  To: Ky Srinivasan, xen-devel

On 4/3/07 23:02, "Ky Srinivasan" <ksrinivasan@novell.com> wrote:

> Sorry for not being precise in my earlier email. Within an arbitrary domain, I
> was wondering how we were preventing potential deadlocks between vcpus that
> were attempting to pause each other; perhaps a higher level serialization lock
> could solve this problem. I was looking at using vcpu_pause to get a stable
> state for a vcpu in a domu context. Is this not a sanctioned usage of
> vcpu_pause.

Oh, I see. Yes, there's a reason there's no getvcpucontext() that a domU can
run on itself: it wasn't clear to me how useful it would be, and it's a bit
of a pain to implement in a way that avoids deadlock possibilities. But if
there's a good reason for it then we can definitely work out a way to
support it safely.

 -- Keir

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-05  8:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-02 23:26 vcpu_pause Ky Srinivasan
2007-03-04 11:56 ` vcpu_pause Keir Fraser
2007-03-04 23:02   ` vcpu_pause Ky Srinivasan
2007-03-05  8:09     ` vcpu_pause Keir Fraser

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.