From: David Vrabel <david.vrabel@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, David Vrabel <david.vrabel@citrix.com>
Cc: Ross Lagerwall <ross.lagerwall@citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCHv1] evtchn: don't reuse ports that are still "busy"
Date: Tue, 1 Dec 2015 14:04:10 +0000 [thread overview]
Message-ID: <565DA8DA.4030503@citrix.com> (raw)
In-Reply-To: <565DA55002000078000BAB85@prv-mh.provo.novell.com>
On 01/12/15 12:49, Jan Beulich wrote:
>>>> On 30.11.15 at 18:59, <david.vrabel@citrix.com> wrote:
>> --- a/xen/common/event_channel.c
>> +++ b/xen/common/event_channel.c
>> @@ -170,7 +170,8 @@ static int get_free_port(struct domain *d)
>> {
>> if ( port > d->max_evtchn_port )
>> return -ENOSPC;
>> - if ( evtchn_from_port(d, port)->state == ECS_FREE )
>> + chn = evtchn_from_port(d, port);
>> + if ( chn->state == ECS_FREE && !evtchn_port_is_busy(d, chn) )
>
> Despite the reasonable arguments you give this looks very wrong:
> How can a free port still be busy? Could we have a new ECS_* and
> require guests to notify the hypervisor when they unlinked an
> already closed port (while "close" would transition busy ports into
> that new state)?
I would look at it as: The channel object is free, but the corresponding
ABI specific port object is busy. So it doesn't seem unreasonable to
check the state of both objects.
What you suggest (adding an additional call) would break all existing
guests that would not make the unlinked call, leaving the event channel
in a state where it cannot be reused.
David
next prev parent reply other threads:[~2015-12-01 14:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-30 17:59 [PATCHv1] evtchn: don't reuse ports that are still "busy" David Vrabel
2015-12-01 12:49 ` Jan Beulich
2015-12-01 14:04 ` David Vrabel [this message]
2015-12-01 14:33 ` 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=565DA8DA.4030503@citrix.com \
--to=david.vrabel@citrix.com \
--cc=JBeulich@suse.com \
--cc=ian.campbell@citrix.com \
--cc=ross.lagerwall@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 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.