netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	"David S . Miller" <davem@davemloft.net>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@st.com>
Subject: Re: [PATCH net-next v2 06/10] net: stmmac: Do not disable interrupts when cleaning TX
Date: Mon, 1 Jul 2019 08:23:03 -0400	[thread overview]
Message-ID: <CAF=yD-+55uqYawF9oUFVT5T_cyxso4s5r+vxFrcxBTXuieNVRA@mail.gmail.com> (raw)
In-Reply-To: <BN8PR12MB326638B0BA74DA762C89DF54D3F90@BN8PR12MB3266.namprd12.prod.outlook.com>

On Mon, Jul 1, 2019 at 6:15 AM Jose Abreu <Jose.Abreu@synopsys.com> wrote:
>
> From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
>
> > By the
> >
> >         if ((status & handle_rx) && (chan < priv->plat->rx_queues_to_use)) {
> >                 stmmac_disable_dma_irq(priv, priv->ioaddr, chan);
> >                 napi_schedule_irqoff(&ch->rx_napi);
> >         }
> >
> > branch directly above? If so, is it possible to have fewer rx than tx
> > queues and miss this?
>
> Yes, it is possible.

And that is not a problem?

>
> > this logic seems more complex than needed?
> >
> >         if (status)
> >                 status |= handle_rx | handle_tx;
> >
> >         if ((status & handle_rx) && (chan < priv->plat->rx_queues_to_use)) {
> >
> >         }
> >
> >         if ((status & handle_tx) && (chan < priv->plat->tx_queues_to_use)) {
> >
> >         }
> >
> > status & handle_rx implies status & handle_tx and vice versa.
>
> This is removed in patch 09/10.
>
> > > -       if (work_done < budget && napi_complete_done(napi, work_done))
> > > -               stmmac_enable_dma_irq(priv, priv->ioaddr, chan);
> > > +       if (work_done < budget)
> > > +               napi_complete_done(napi, work_done);
> >
> > It does seem odd that stmmac_napi_poll_rx and stmmac_napi_poll_tx both
> > call stmmac_enable_dma_irq(..) independent of the other. Shouldn't the
> > IRQ remain masked while either is active or scheduled? That is almost
> > what this patch does, though not exactly.
>
> After patch 09/10 the interrupts will only be disabled by RX NAPI and
> re-enabled by it again. I can do some tests on whether disabling
> interrupts independently gives more performance but I wouldn't expect so
> because the real bottleneck when I do iperf3 tests is the RX path ...

Sharing the IRQ sounds fine. My only concern was TX-only IRQs in case
more TX than RX queues are configured. If that is possible with this
driver.

  reply	other threads:[~2019-07-01 12:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28  7:29 [PATCH net-next v2 00/10] net: stmmac: 10GbE using XGMAC Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 01/10] net: stmmac: dwxgmac: Enable EDMA by default Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 02/10] net: stmmac: Do not try to enable PHY EEE if MAC does not support it Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 03/10] net: stmmac: Decrease default RX Watchdog value Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 04/10] net: stmmac: dwxgmac: Fix the undefined burst setting Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 05/10] net: stmmac: Add the missing speeds that XGMAC supports Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 06/10] net: stmmac: Do not disable interrupts when cleaning TX Jose Abreu
2019-06-28 19:08   ` Willem de Bruijn
2019-07-01 10:15     ` Jose Abreu
2019-07-01 12:23       ` Willem de Bruijn [this message]
2019-06-28  7:29 ` [PATCH net-next v2 07/10] net: stmmac: Enable support for > 32 Bits addressing in XGMAC Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 08/10] net: stmmac: Update RX Tail Pointer to last free entry Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 09/10] net: stmmac: Only disable interrupts if NAPI is scheduled Jose Abreu
2019-06-28  7:29 ` [PATCH net-next v2 10/10] net: stmmac: Update Kconfig entry Jose Abreu
2019-06-28 16:24 ` [PATCH net-next v2 00/10] net: stmmac: 10GbE using XGMAC David Miller
2019-07-01 10:19   ` Jose Abreu
2019-07-01 17:46     ` 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='CAF=yD-+55uqYawF9oUFVT5T_cyxso4s5r+vxFrcxBTXuieNVRA@mail.gmail.com' \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    /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).