From: "Michael Chan" <mchan@broadcom.com>
To: "Jarek Poplawski" <jarkao2@gmail.com>
Cc: "Eric Dumazet" <eric.dumazet@gmail.com>,
"David Miller" <davem@davemloft.net>,
"kaber@trash.net" <kaber@trash.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Jeff Kirsher" <jeffrey.t.kirsher@intel.com>,
"Peter P Waskiewicz Jr" <peter.p.waskiewicz.jr@intel.com>
Subject: Re: [PATCH v4] net: Introduce realloc_netdev_mq()
Date: Mon, 18 Jan 2010 10:29:48 -0800 [thread overview]
Message-ID: <1263839388.9026.10.camel@HP1> (raw)
In-Reply-To: <20100117225703.GB3161@del.dom.local>
On Sun, 2010-01-17 at 14:57 -0800, Jarek Poplawski wrote:
> On Sun, Jan 17, 2010 at 08:56:28AM -0800, Michael Chan wrote:
> > Jarek Poplawski wrote
> > > On Sat, Jan 16, 2010 at 02:50:48PM -0800, Michael Chan wrote:
> > > > The problem with the patch below is that
> > > > dev->real_num_tx_queues can still be reduced during bnx2_open().
> > > >
> > >
> > > I'm not sure I get your point, but there should be no problem with
> > > changing dev->real_num_tx_queues during ->open(). The main intention
> > > of realloc_netdev_mq() is to give drivers some official way to change
> > > dev->num_tx_queues until register_netdev() with the main aim: not to
> > > treat obviously non-mq chips as mq according to netif_is_multiqueue().
> > > Additional gain is memory saved in the case fixed by the patch below
> > > (which btw. waits for some refinement/verification).
> >
> > Yes, the patch achieves what you describe. dev->num_tx_queues will
> > be set more accurately during ->probe based on chip type. In ->open(),
> > the dev->real_num_tx_queues will still be possibly reduced depending
> > on the number of CPU cores and whether we can enable and allocate the
> > MSI-X vectors.
>
> I wondered, and Peter seemed to confirm, some check whether we can use
> MSI-X could be done during ->probe as well?
>
> ...
> > > > > + if (!((bp->flags & BNX2_FLAG_MSIX_CAP) ||
> > > > > + (bp->flags & BNX2_FLAG_MSI_CAP)) || disable_msi)
> > > > > + realloc_netdev_mq(dev, 1);
> > > > > +
> >
> > I think we can refine this a little:
> >
> > if (!(bp->flags & BNX2_FLAG_MSIX_CAP) || disable_msi)
> > realloc_netdev_mq(dev, 1);
> >
>
> Hmm... Probably I should use different words. I mentioned above the
> main intention of realloc_netdev_mq() was to fix mq-ness for non-mq
> chips, and this patch demonstrates this. But, there is no reason not
> to fix/optimize more btw. So, I hoped the refinement could also
> include some preliminary MSI-X test etc. Anyway, since I can't even
> test it, I would be glad if you could author something based on this
> stub (unless you think it's enough for now - then I'll send it as is,
> no problem).
>
It's an improvement over existing code to unconditionally allocate max
tx queues. To make further improvements, we'll have to experiment with
calling pci_enable_msix() so early during ->probe(). I will look into
it. Thanks.
next prev parent reply other threads:[~2010-01-18 18:40 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-08 7:18 [RFC] multiqueue changes Eric Dumazet
2009-10-08 9:03 ` Jarek Poplawski
2009-10-08 12:00 ` Jarek Poplawski
2009-10-08 12:13 ` Eric Dumazet
2009-10-08 12:53 ` Jarek Poplawski
2009-10-09 7:58 ` David Miller
2009-10-28 17:27 ` Patrick McHardy
2009-10-28 21:23 ` Jarek Poplawski
2009-10-29 16:37 ` Patrick McHardy
2009-10-29 21:15 ` Jarek Poplawski
2009-10-29 22:12 ` Patrick McHardy
2009-10-30 10:00 ` Jarek Poplawski
2009-10-31 17:25 ` Michael Chan
2009-11-01 13:20 ` Jarek Poplawski
2009-11-02 11:35 ` David Miller
2009-11-02 12:30 ` Jarek Poplawski
2009-11-02 12:39 ` David Miller
2009-11-02 13:02 ` Jarek Poplawski
2009-11-02 13:03 ` Eric Dumazet
2009-11-02 13:09 ` Jarek Poplawski
2009-12-03 14:10 ` [PATCH] net: Introduce realloc_netdev_mq() Jarek Poplawski
2009-12-03 14:39 ` [PATCH v2] " Jarek Poplawski
2009-12-03 15:17 ` Eric Dumazet
2009-12-03 16:36 ` Jarek Poplawski
2009-12-03 16:54 ` Jarek Poplawski
2009-12-03 17:05 ` Eric Dumazet
2009-12-03 19:04 ` [PATCH v3] " Jarek Poplawski
2009-12-03 20:29 ` [PATCH v4] " Jarek Poplawski
2009-12-03 21:29 ` Eric Dumazet
2009-12-03 21:31 ` David Miller
2009-12-03 21:32 ` Eric Dumazet
2009-12-03 21:51 ` Eric Dumazet
2009-12-03 22:47 ` Jarek Poplawski
2009-12-03 23:04 ` Eric Dumazet
2009-12-04 7:48 ` Jarek Poplawski
2009-12-04 10:51 ` Peter P Waskiewicz Jr
2009-12-04 11:41 ` Jarek Poplawski
2009-12-04 13:01 ` Jarek Poplawski
2009-12-04 13:49 ` Jarek Poplawski
2010-01-16 22:50 ` Michael Chan
2010-01-17 0:36 ` Jarek Poplawski
2010-01-17 16:56 ` Michael Chan
2010-01-17 22:57 ` Jarek Poplawski
2010-01-18 18:29 ` Michael Chan [this message]
2010-01-18 19:41 ` Jarek Poplawski
2009-10-09 8:51 ` [RFC] multiqueue changes Jarek Poplawski
2009-10-09 9:40 ` Jarek Poplawski
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=1263839388.9026.10.camel@HP1 \
--to=mchan@broadcom.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jarkao2@gmail.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.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).