From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>, Tim Deegan <tim@xen.org>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH v3] xen/common: Properly reference count DOMCTL_{, un}pausedomain hypercalls
Date: Wed, 2 Jul 2014 17:10:11 +0100 [thread overview]
Message-ID: <53B42EE3.2010308@citrix.com> (raw)
In-Reply-To: <53B44A21020000780001FB88@mail.emea.novell.com>
On 02/07/14 17:06, Jan Beulich wrote:
>>>> On 02.07.14 at 17:41, <andrew.cooper3@citrix.com> wrote:
>> On 02/07/14 16:29, Jan Beulich wrote:
>>>>>> On 02.07.14 at 17:03, <andrew.cooper3@citrix.com> wrote:
>>>> --- a/xen/include/xen/sched.h
>>>> +++ b/xen/include/xen/sched.h
>>>> @@ -366,7 +366,7 @@ struct domain
>>>> /* 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;
>>>> + atomic_t controller_pause_count;
>>>> /* Domain's VCPUs are pinned 1:1 to physical CPUs? */
>>>> bool_t is_pinned;
>>>>
>>> Now why did you leave this be an atomic_t, sitting between two
>>> bool_t-s?
>> It is not sitting between two bool_t's. It is sitting next to an enum
>> which has the same natural width and alignment.
> Oh, right, the first one is being replaced.
>
> But you didn't say why it need to be an atomic_t, while in v1 it was a
> plain scalar.
>
> Jan
>
v1 was a plain scalar because of the spinlock. v2 was an atomic_t
because of atomic_{inc,dec}_bounded()
But given the hand rolled loops with cmpxchg(), this can indeed be a
plan scalar.
v4 on its way.
~Andrew
prev parent reply other threads:[~2014-07-02 16:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-02 15:03 [PATCH v3] xen/common: Properly reference count DOMCTL_{, un}pausedomain hypercalls Andrew Cooper
2014-07-02 15:29 ` Jan Beulich
2014-07-02 15:41 ` Andrew Cooper
2014-07-02 16:06 ` Jan Beulich
2014-07-02 16:10 ` Andrew Cooper [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53B42EE3.2010308@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.