[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH 1/2] vm_event: sync domctl
On 23/12/2015 18:11, Tamas K Lengyel
wrote:
Pausing is strictly reference counted. (or rather, it is since c/s
3eb1c70 "properly reference count DOMCTL_{,un}pausedomain
hypercalls". Before then, it definitely was buggy.)
There is the domain pause count, and pause counts per vcpu. All
domain pause operations take both a domain pause reference, and a
vcpu pause reference on each vcpu. A vcpu is only eligible to be
scheduled if its pause reference count is zero. If two independent
tasks call vcpu_pause() on the same vcpu, it will remain paused
until both independent tasks have called vcpu_unpause().
Having said this, I can well believe that there might be issues with
the current uses of pausing.
The vital factor is that the entity which pauses a vcpu is also
responsible for unpausing it, and it must be resistant to
accidentally leaking its reference.
In this case, I believe that what you want to do is:
1) Identify condition requiring a sync
2) xc_domain_pause()
3) Process all of the pending vm_events
4) Synchronise the state
5) xc_domain_unpause()
All vcpus of the domain should stay descheduled between points 2 and
5. If this doesn't have the intended effect, then I suspect there
is a bug in the pause reference handing of the vm_event subsystem.
Is this clearer, or have I misunderstood the problem?
~Andrew
|
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|