From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: jesper@krogh.cc, netdev@vger.kernel.org
Subject: Re: [RFC] niu: RX queues should rotate if budget exhausted
Date: Fri, 27 Mar 2009 00:58:28 -0700 (PDT) [thread overview]
Message-ID: <20090327.005828.173228960.davem@davemloft.net> (raw)
In-Reply-To: <20090327.005546.109440539.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Fri, 27 Mar 2009 00:55:46 -0700 (PDT)
> From: Eric Dumazet <dada1@cosmosbay.com>
> Date: Thu, 26 Mar 2009 19:26:20 +0100
>
> > I dont have NIU hardware but it seems this driver could suffer from
> > starvation of high numbered RX queues under flood. I suspect other
> > multiqueue drivers might have same problem.
> >
> > With a standard budget of 64, we can consume all credit when handling
> > first queue(s), and last queues might discard packets.
> >
> > Solve this by rotating the starting point, so that we garantee to scan at
> > least one new queue at each niu_poll_core() invocation, even under stress.
> >
> > Also, change logic calling niu_sync_rx_discard_stats() to take
> > into account the device qlen, not bounded by budget (which could be 0)
> >
> > Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
>
> This change looks good to me, thanks for spotting this and
> suggesting the fix.
>
> It only hits people who don't have usable MSI-X interrupts,
> and hey if you have one of these cards what are you doing
> sticking it into such a machine :-)
>
> Anyways, I'll apply this directly, thanks a lot!
Actually, I take that back... I want to do this slightly
differently.
That niu_poll_core() is used in both the MSI-X and non-MSI
case.
I always meant to fix this driver to not scan over all the
RX rings when we use MSI-X and the event can only be for
one specific queue.
Then we can add your rotating logic to the non-MSI-X interrupt
paths.
next prev parent reply other threads:[~2009-03-27 7:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-26 12:54 [PATCH 1/2] ucc_geth: Move freeing of TX packets to NAPI context Joakim Tjernlund
2009-03-26 12:54 ` [PATCH 2/2] ucc_geth: Rework the TX logic Joakim Tjernlund
2009-03-26 13:39 ` Anton Vorontsov
2009-03-26 16:43 ` Joakim Tjernlund
2009-03-26 18:05 ` Anton Vorontsov
2009-03-26 18:20 ` Joakim Tjernlund
2009-03-27 7:42 ` David Miller
2009-03-27 9:37 ` Joakim Tjernlund
2009-03-26 14:15 ` [PATCH 1/2] ucc_geth: Move freeing of TX packets to NAPI context Eric Dumazet
2009-03-26 16:55 ` Joakim Tjernlund
2009-03-26 18:26 ` [RFC] niu: RX queues should rotate if budget exhausted Eric Dumazet
2009-03-27 7:55 ` David Miller
2009-03-27 7:58 ` David Miller [this message]
2009-03-27 8:05 ` Eric Dumazet
2009-03-27 10:50 ` [PATCH 1/2] ucc_geth: Move freeing of TX packets to NAPI context Li Yang
2009-03-27 11:52 ` Joakim Tjernlund
2009-03-27 21:55 ` David Miller
2009-03-30 7:36 ` Li Yang
2009-03-30 7:48 ` Joakim Tjernlund
2009-03-30 7:57 ` Li Yang
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=20090327.005828.173228960.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dada1@cosmosbay.com \
--cc=jesper@krogh.cc \
--cc=netdev@vger.kernel.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 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).