From: David Vrabel <david.vrabel@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
Keir Fraser <keir@xen.org>, Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCH 8/8] evtchn: add FIFO-based event channel hypercalls and port ops
Date: Fri, 23 Aug 2013 12:00:32 +0100 [thread overview]
Message-ID: <521740D0.2040904@citrix.com> (raw)
In-Reply-To: <521756B402000078000EDF7A@nat28.tlf.novell.com>
On 23/08/13 11:33, Jan Beulich wrote:
>>>> On 09.08.13 at 20:08, David Vrabel <david.vrabel@citrix.com> wrote:
>> +static void evtchn_fifo_bind_to_vcpu(struct domain *d, struct evtchn *evtchn,
>> + struct vcpu *v)
>> +{
>> + unsigned priority;
>> +
>> + /* Keep the same priority if possible, otherwise use the
>> + default. */
>> + if ( evtchn->queue )
>> + priority = evtchn->queue->priority;
>> + else
>> + priority = EVTCHN_FIFO_PRIORITY_DEFAULT;
>> +
>> + evtchn->queue = &v->evtchn_fifo->queue[priority];
>
> Why not simply
>
> if ( !evtchn->queue )
> evtchn->queue = &v->evtchn_fifo->queue[EVTCHN_FIFO_PRIORITY_DEFAULT];
>
> ?
event->queue might point to a queue on VCPU w, and we want it to point
to one (of the same priority) on VCPU v.
But as you said later on, maybe it would be better to just store the
priority in the struct evtchn. This would avoid the need to this
function/hook entirely.
>> +int evtchn_fifo_init_control(struct evtchn_init_control *init_control)
>> +{
[...]
>> +
>> + /* Must be 8-bytes aligned. */
>> + if ( offset & (8 - 1) )
>
> This would better use __alignof() to document where the requirement
> stems from.
There's no specific requirement for it to be 8 byte aligned at this time
(the ready word is only 32-bits), this is to make it more future proof
if the structure is extended later.
David
next prev parent reply other threads:[~2013-08-23 11:00 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-09 18:08 [RFC PATCH 0/8] Xen: FIFO-based event channel ABI David Vrabel
2013-08-09 18:08 ` [PATCH 1/8] debug: remove some event channel info from the 'i' and 'q' debug keys David Vrabel
2013-08-15 13:55 ` Jan Beulich
2013-08-09 18:08 ` [PATCH 2/8] evtchn: refactor low-level event channel port ops David Vrabel
2013-08-15 14:05 ` Jan Beulich
2013-09-06 14:25 ` David Vrabel
2013-09-06 14:55 ` Jan Beulich
2013-08-09 18:08 ` [PATCH 3/8] evtchn: add a hook to bind an event port to a VCPU David Vrabel
2013-08-09 18:08 ` [PATCH 4/8] evtchn: use a per-domain variable for the max number of event channels David Vrabel
2013-08-15 14:09 ` Jan Beulich
2013-08-09 18:08 ` [PATCH 5/8] evtchn: dynamically allocate d->evtchn David Vrabel
2013-08-15 14:10 ` Jan Beulich
2013-08-09 18:08 ` [PATCH 6/8] evtchn: alter internal object handling scheme David Vrabel
2013-08-15 14:21 ` Jan Beulich
2013-08-15 15:46 ` David Vrabel
2013-08-16 7:14 ` Jan Beulich
2013-08-16 16:55 ` Wei Liu
2013-08-09 18:08 ` [PATCH 7/8] evtchn: add FIFO-based event channel ABI David Vrabel
2013-08-15 14:25 ` Jan Beulich
2013-08-09 18:08 ` [PATCH 8/8] evtchn: add FIFO-based event channel hypercalls and port ops David Vrabel
2013-08-16 16:33 ` Wei Liu
2013-08-19 10:32 ` David Vrabel
2013-08-19 10:46 ` Wei Liu
2013-08-23 10:33 ` Jan Beulich
2013-08-23 11:00 ` David Vrabel [this message]
2013-08-12 13:06 ` [RFC PATCH 0/8] Xen: FIFO-based event channel ABI George Dunlap
2013-08-12 13:49 ` David Vrabel
2013-08-16 16:55 ` Wei Liu
-- strict thread matches above, loose matches on Subject: below --
2013-03-19 21:00 [PATCH RFC " David Vrabel
2013-03-19 21:00 ` [PATCH 8/8] evtchn: add FIFO-based event channel hypercalls and port ops David Vrabel
2013-03-20 10:47 ` Jan Beulich
2013-03-20 13:42 ` David Vrabel
2013-03-20 13:55 ` Jan Beulich
2013-03-20 14:23 ` Tim Deegan
2013-03-20 14:38 ` David Vrabel
2013-03-20 15:34 ` Tim Deegan
2013-03-20 15:54 ` David Vrabel
2013-03-20 16:15 ` Keir Fraser
2013-03-20 13:50 ` Wei Liu
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=521740D0.2040904@citrix.com \
--to=david.vrabel@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).