From: Keir Fraser <keir@xen.org>
To: Jan Beulich <JBeulich@suse.com>, Olaf Hering <olaf@aepfle.de>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH 2 of 3] RFC: mem_event: use wait queue when ring is full
Date: Wed, 23 Nov 2011 09:01:19 +0000 [thread overview]
Message-ID: <CAF266DF.3489F%keir@xen.org> (raw)
In-Reply-To: <4ECCC1970200007800062875@nat28.tlf.novell.com>
On 23/11/2011 08:49, "Jan Beulich" <JBeulich@suse.com> wrote:
>>>> On 22.11.11 at 22:13, Olaf Hering <olaf@aepfle.de> wrote:
>> --- a/xen/include/xen/sched.h
>> +++ b/xen/include/xen/sched.h
>> @@ -14,6 +14,7 @@
>> #include <xen/nodemask.h>
>> #include <xen/radix-tree.h>
>> #include <xen/multicall.h>
>> +#include <xen/wait.h>
>> #include <public/xen.h>
>> #include <public/domctl.h>
>> #include <public/sysctl.h>
>> @@ -192,6 +193,10 @@ struct mem_event_domain
>> mem_event_front_ring_t front_ring;
>> /* event channel port (vcpu0 only) */
>> int xen_port;
>> + /* mem_event bit for vcpu->pause_flags */
>> + int mem_event_bit;
>
> Perhaps pause_bit would be a better name here? Or at least, as for
> the first patch, the mem_ prefix should go away (or really the
> mem_event_ one, but that would just leave "bit", which is how I got
> to the above proposal).
Yes, mem_event_bit is a lazy name here. Doesn't really describe what the bit
is actually for. It's obviously mem_event related because of the struct it
is a member of.
>> + /* list of vcpus waiting for room in the ring */
>> + struct waitqueue_head wq;
>> };
>>
>> struct mem_event_per_domain
>> @@ -615,9 +620,12 @@ static inline struct domain *next_domain
>> /* VCPU affinity has changed: migrating to a new CPU. */
>> #define _VPF_migrating 3
>> #define VPF_migrating (1UL<<_VPF_migrating)
>> - /* VCPU is blocked on memory-event ring. */
>> -#define _VPF_mem_event 4
>> -#define VPF_mem_event (1UL<<_VPF_mem_event)
>> + /* VCPU is blocked on mem_paging ring. */
>> +#define _VPF_me_mem_paging 4
>> +#define VPF_me_mem_paging (1UL<<_VPF_me_mem_paging)
>> + /* VCPU is blocked on mem_access ring. */
>> +#define _VPF_me_mem_access 5
>> +#define VPF_me_mem_access (1UL<<_VPF_me_mem_access)
>
> Same here - the mem_ seems superfluous.
Mem_event-related flags in a more general grouping do require a mem_ prefix
imo. The names need to stand on their own and still be descriptive.
-- Keir
> Jan
>
>>
>> static inline int vcpu_runnable(struct vcpu *v)
>> {
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2011-11-23 9:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 21:13 [PATCH 0 of 3] RFC: wait queue usage Olaf Hering
2011-11-22 21:13 ` [PATCH 1 of 3] mem_event: move mem_event_domain out of struct domain Olaf Hering
2011-11-23 8:41 ` Jan Beulich
2011-11-22 21:13 ` [PATCH 2 of 3] RFC: mem_event: use wait queue when ring is full Olaf Hering
2011-11-23 8:49 ` Jan Beulich
2011-11-23 9:01 ` Keir Fraser [this message]
2011-11-23 9:44 ` Jan Beulich
2011-11-23 9:49 ` Keir Fraser
2011-11-22 21:13 ` [PATCH 3 of 3] RFC: xenpaging: use waitqueue in ept_get Olaf Hering
2011-11-23 8:54 ` Jan Beulich
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=CAF266DF.3489F%keir@xen.org \
--to=keir@xen.org \
--cc=JBeulich@suse.com \
--cc=olaf@aepfle.de \
--cc=xen-devel@lists.xensource.com \
/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.