|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH (V9) 2/2] xen: Add V4V implementation
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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |