From: David Vrabel <david.vrabel@citrix.com>
To: Ross Philipson <ross.philipson@citrix.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH (V9) 2/2] xen: Add V4V implementation
Date: Mon, 10 Jun 2013 16:06:13 +0100 [thread overview]
Message-ID: <51B5EB65.4070703@citrix.com> (raw)
In-Reply-To: <1369770211-4509-3-git-send-email-ross.philipson@citrix.com>
On 28/05/13 20:43, Ross Philipson wrote:
> Setup of v4v domains a domain gets created and cleanup
> when a domain die. Wire up the v4v hypercall.
[...]
> +static void
> +v4v_pending_notify(struct domain *caller_d, struct hlist_head *to_notify)
> +{
> + struct hlist_node *node, *next;
> + struct v4v_pending_ent *pending_ent;
> +
> + ASSERT(rw_is_locked(&v4v_lock));
> +
> + hlist_for_each_entry_safe(pending_ent, node, next, to_notify, node)
> + {
> + hlist_del(&pending_ent->node);
> + v4v_signal_domid(pending_ent->id);
> + xfree(pending_ent);
> + }
> +
> +}
> +
> +static void
> +v4v_pending_find(struct domain *d, struct v4v_ring_info *ring_info,
> + uint32_t payload_space, struct hlist_head *to_notify)
> +{
> + struct hlist_node *node, *next;
> + struct v4v_pending_ent *ent;
> +
> + ASSERT(rw_is_locked(&d->v4v->lock));
> +
> + spin_lock(&ring_info->lock);
> + hlist_for_each_entry_safe(ent, node, next, &ring_info->pending, node)
> + {
> + if ( payload_space >= ent->len )
> + {
> + hlist_del(&ent->node);
> + hlist_add_head(&ent->node, to_notify);
> + }
> + }
> + spin_unlock(&ring_info->lock);
> +}
This "space in destination ring" notification does not seem like it
would scale very well for: a) many senders into the same ring; or b) a
single sender to many (full) rings.
In (a), all domains are notified, even though only one will win the race
and put a message on the ring. In (b) the guest must retry all pending
transmits as it doesn't know which destination ring now has space.
David
next prev parent reply other threads:[~2013-06-10 15:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 19:43 [PATCH (V9) 0/2] Add V4V to Xen Ross Philipson
2013-05-28 19:43 ` [PATCH (V9) 1/2] xen: events, exposes evtchn_alloc_unbound_domain Ross Philipson
2013-05-28 19:43 ` [PATCH (V9) 2/2] xen: Add V4V implementation Ross Philipson
2013-05-29 0:43 ` Matt Wilson
2013-05-29 19:28 ` Ross Philipson
2013-05-29 8:34 ` Jan Beulich
2013-05-29 19:26 ` Ross Philipson
2013-05-30 5:16 ` Jan Beulich
2013-05-29 9:56 ` Vincent Hanquez
2013-05-30 16:20 ` Tim Deegan
2013-06-04 18:01 ` Ross Philipson
2013-06-10 15:06 ` David Vrabel [this message]
2013-05-30 11:57 ` [PATCH (V9) 0/2] Add V4V to Xen Ian Campbell
2013-05-31 7:36 ` Vincent Hanquez
2013-05-31 7:50 ` Ian Campbell
2013-05-31 8:56 ` Vincent Hanquez
2013-05-31 9:01 ` Ian Campbell
2013-05-31 9:26 ` Vincent Hanquez
2013-05-31 16:29 ` Ross Philipson
2013-05-31 16:38 ` Ian Campbell
2013-05-30 12:07 ` Ian Campbell
2013-05-30 16:08 ` David Vrabel
2013-05-31 7:25 ` Vincent Hanquez
2013-05-31 10:21 ` David Vrabel
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=51B5EB65.4070703@citrix.com \
--to=david.vrabel@citrix.com \
--cc=ross.philipson@citrix.com \
--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 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).