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

Re: [Xen-devel] [PATCH] xen/common: Properly reference count DOMCTL_{, un}pausedomain hypercalls



>>> On 01.07.14 at 21:57, <andrew.cooper3@xxxxxxxxxx> wrote:
> --- a/xen/include/xen/sched.h
> +++ b/xen/include/xen/sched.h
> @@ -365,8 +365,6 @@ struct domain
>      bool_t           debugger_attached;
>      /* Is this guest dying (i.e., a zombie)? */
>      enum { DOMDYING_alive, DOMDYING_dying, DOMDYING_dead } is_dying;
> -    /* Domain is paused by controller software? */
> -    bool_t           is_paused_by_controller;
>      /* Domain's VCPUs are pinned 1:1 to physical CPUs? */
>      bool_t           is_pinned;
>  
> @@ -389,6 +387,10 @@ struct domain
>  
>      atomic_t         pause_count;
>  
> +    /* Domain is paused by controller software? */
> +    spinlock_t       toolstack_pause_lock;
> +    unsigned int     toolstack_pause_count;

I think I like "controller" better than "toolstack" here, and I even
wonder whether the old name, just stripped of the "is_", couldn't
remain.

And I also like Don's cmpxchg suggestion, avoiding the need for a
lock - we're doing this kind of lock avoidance in various other places
already anyway.

Jan


_______________________________________________
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®.