From: David Vrabel <david.vrabel@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: <xen-devel@lists.xen.org>, <netdev@vger.kernel.org>,
<ian.campbell@citrix.com>, <konrad.wilk@oracle.com>
Subject: Re: [Xen-devel] [PATCH net-next 1/2] xen-netback: split event channels feature support
Date: Tue, 21 May 2013 14:34:19 +0100 [thread overview]
Message-ID: <519B77DB.3040901@citrix.com> (raw)
In-Reply-To: <1369090931-27306-2-git-send-email-wei.liu2@citrix.com>
On 21/05/13 00:02, Wei Liu wrote:
> Netback and netfront only use one event channel to do TX / RX notification,
> which may cause unnecessary wake-up of processing routines. This patch adds a
> new feature called feature-split-event-channels to netback, enabling it to
> handle TX and RX events separately.
>
> Netback will use tx_irq to notify guest for TX completion, rx_irq for RX
> notification.
>
> If frontend doesn't support this feature, tx_irq is equal to rx_irq.
[...]
> --- a/drivers/net/xen-netback/interface.c
> +++ b/drivers/net/xen-netback/interface.c
> @@ -69,12 +69,35 @@ static irqreturn_t xenvif_interrupt(int irq, void *dev_id)
>
> xen_netbk_schedule_xenvif(vif);
>
> + return IRQ_HANDLED;
> +}
> +
> +static irqreturn_t xenvif_rx_interrupt(int irq, void *dev_id)
> +{
> + struct xenvif *vif = dev_id;
> +
> + if (vif->netbk == NULL)
> + return IRQ_NONE;
I know the original code had this but this looks suspect to me. Event
channels are never shared so it does not make sense to ever return IRQ_NONE.
Suggest making this return IRQ_HANDLED instead (and similarly in
xenvif_tx_interrupt()) and...
> +static irqreturn_t xenvif_interrupt(int irq, void *dev_id)
> +{
> + struct xenvif *vif = dev_id;
> +
> + if (vif->netbk == NULL)
> + return IRQ_NONE;
... then you can remove this test.
> --- a/drivers/net/xen-netback/xenbus.c
> +++ b/drivers/net/xen-netback/xenbus.c
> @@ -114,6 +114,15 @@ static int netback_probe(struct xenbus_device *dev,
> goto abort_transaction;
> }
>
> + /* Split event channels support */
> + err = xenbus_printf(xbt, dev->nodename,
> + "feature-split-event-channels",
> + "%u", 1);
> + if (err) {
> + message = "writing feature-split-event-channels";
> + goto abort_transaction;
> + }
> +
Event channels are currently a limited resource. Do we want to have a
knob to disable this feature?
David
next prev parent reply other threads:[~2013-05-21 13:34 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-20 23:02 [PATCH net-next 0/2] Xen network: split event channels support Wei Liu
2013-05-20 23:02 ` [PATCH net-next 1/2] xen-netback: split event channels feature support Wei Liu
2013-05-21 13:34 ` David Vrabel
2013-05-21 13:34 ` David Vrabel [this message]
2013-05-21 14:33 ` Wei Liu
2013-05-21 14:33 ` [Xen-devel] " Wei Liu
2013-05-20 23:02 ` Wei Liu
2013-05-20 23:02 ` [PATCH net-next 2/2] xen-netfront: " Wei Liu
2013-05-20 23:02 ` Wei Liu
2013-05-21 13:39 ` David Vrabel
2013-05-21 13:39 ` [Xen-devel] " David Vrabel
2013-05-21 13:41 ` Wei Liu
2013-05-21 13:41 ` [Xen-devel] " Wei Liu
2013-05-21 16:28 ` Konrad Rzeszutek Wilk
2013-05-21 16:28 ` [Xen-devel] " Konrad Rzeszutek Wilk
2013-05-21 17:07 ` Wei Liu
2013-05-21 17:07 ` Wei Liu
2013-05-22 15:52 ` [Xen-devel] " David Vrabel
2013-05-22 15:52 ` David Vrabel
2013-05-21 6:27 ` [PATCH net-next 0/2] Xen network: split event channels support David Miller
2013-05-21 8:00 ` Wei Liu
2013-05-21 8:13 ` David Miller
2013-05-21 8:13 ` David Miller
2013-05-21 8:17 ` Ian Campbell
2013-05-21 8:17 ` Ian Campbell
2013-05-21 8:34 ` Wei Liu
2013-05-21 8:34 ` Wei Liu
2013-05-21 8:00 ` Wei Liu
2013-05-21 6:27 ` David Miller
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=519B77DB.3040901@citrix.com \
--to=david.vrabel@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=wei.liu2@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 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.