Re: [Xen-devel] [PATCH v5 1/9] xen: introduce DOMDYING_locked state

2014-12-18 Thread Jan Beulich
>>> On 11.12.14 at 14:45,  wrote:
> New dying state is requred to indicate that a particular domain
> is dying but cleanup procedure wasn't started. This state can be
> set from outside of domain_kill().

Without any user of the new state (yet), please be more verbose
here to explain what the intended use is (also allowing to
understand the naming choice).

Jan


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


[Xen-devel] [PATCH v5 1/9] xen: introduce DOMDYING_locked state

2014-12-11 Thread Vitaly Kuznetsov
New dying state is requred to indicate that a particular domain
is dying but cleanup procedure wasn't started. This state can be
set from outside of domain_kill().

Signed-off-by: Vitaly Kuznetsov 
---
 xen/common/domain.c | 1 +
 xen/include/xen/sched.h | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/xen/common/domain.c b/xen/common/domain.c
index 4a62c1d..c13a7cf 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -603,6 +603,7 @@ int domain_kill(struct domain *d)
 switch ( d->is_dying )
 {
 case DOMDYING_alive:
+case DOMDYING_locked:
 domain_pause(d);
 d->is_dying = DOMDYING_dying;
 spin_barrier(&d->domain_lock);
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 46fc6e3..a42d0b8 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -369,7 +369,8 @@ struct domain
 /* Is this guest being debugged by dom0? */
 bool_t   debugger_attached;
 /* Is this guest dying (i.e., a zombie)? */
-enum { DOMDYING_alive, DOMDYING_dying, DOMDYING_dead } is_dying;
+enum { DOMDYING_alive, DOMDYING_locked, DOMDYING_dying, DOMDYING_dead }
+is_dying;
 /* Domain is paused by controller software? */
 int  controller_pause_count;
 /* Domain's VCPUs are pinned 1:1 to physical CPUs? */
-- 
1.9.3


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