From: Roland Dreier <rdreier@cisco.com>
To: hadi@cyberus.ca
Cc: Shirley Ma <xma@us.ibm.com>, David Miller <davem@davemloft.net>,
jgarzik@pobox.com, netdev@vger.kernel.org, rusty@rustcorp.com.au,
shemminger@linux-foundation.org
Subject: Re: [PATCH RFC]: napi_struct V5
Date: Mon, 13 Aug 2007 14:47:31 -0700 [thread overview]
Message-ID: <ada7inz85u4.fsf@cisco.com> (raw)
In-Reply-To: <1186754107.5188.32.camel@localhost> (jamal's message of "Fri, 10 Aug 2007 09:55:07 -0400")
> > Could you explain why this is unfair?
>
> The simple answer is the core attempts DRR scheduling (search for the
> paper by Varghese et al for more details)
> If you have multiple users of a resource (network interfaces in this
> case), then the quantum defines their weight. If you use more than your
> fair quota, then you are being unfair.
OK, I think we were talking past each other. As you noted later, the
current behavior *is* fair, since it uses less than the full quota.
What I couldn't understand was why everyone was telling me that using
*less* than a full quota was unfair -- and now I think we all agree
that it is fair.
> Talk to your vendor (your hardware guys in your case ;->) next time
> to fix their chip. The best scheme is to allow a Clear-on-write
> only on the specific bit/event.
Actually it is more of an IB spec issue than a hardware issue. IPoIB
is really more of a protocol than a hardware driver in many ways; one
analogy would be PPP, which runs on various serial drivers ranging
from an analog modem to cellular data cards using USB serial to PPPoE.
The primitives for event handling that the IB spec defines are such
that this NAPI event handling gap is unavoidable. But in fact a lot
of IB adapter hardware has somewhat better event handling so that the
gap never occurs. We take advantage of this by having the "request
event" operation simply be hard-coded never to return the missed event
hint on hardware where we know the missed event is impossible by
design. However IPoIB has to run on all IB hardware so we can only
assume the least-common-denominator behavior, which means we have to
have the missed event handling for the hardware where it does apply.
> > The second one seems to perform better because in the missed event
> > case, it gives a few more packets a chance to arrive so that we can
> > amortize the polling overhead a little more.
>
> Theory makes sense. Have you validated?
Yes, IBM (the people with the adapter hardware where this path
triggers) did benchmarking and report that allowing the work to pile
up makes a huge performance difference. In fact it is kind of
suspicious that the difference is huge -- I wouldn't expect the missed
event path to be common enough to make that much of a difference, but
for some reason it is.
- R.
next prev parent reply other threads:[~2007-08-13 21:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-06 6:24 [PATCH RFC]: napi_struct V5 David Miller
2007-08-06 18:00 ` Michael Chan
2007-08-06 20:50 ` David Miller
2007-08-07 12:52 ` jamal
2007-08-08 0:59 ` David Miller
2007-08-08 12:10 ` jamal
2007-08-09 4:35 ` David Miller
2007-08-07 22:37 ` Roland Dreier
2007-08-07 23:06 ` David Miller
2007-08-08 3:56 ` Roland Dreier
2007-08-08 4:08 ` David Miller
[not found] ` <OFA2F18805.38AA0BD0-ON87257331.005367FB-88257331.0027BEED@us.ibm.com>
2007-08-08 15:32 ` jamal
2007-08-09 4:23 ` David Miller
2007-08-09 5:32 ` Jeff Garzik
2007-08-09 16:58 ` Roland Dreier
2007-08-10 13:55 ` jamal
2007-08-10 21:39 ` David Miller
2007-08-13 21:47 ` Roland Dreier [this message]
2007-08-08 22:20 ` David Miller
2007-08-08 23:23 ` Shirley Ma
2007-08-09 17:49 ` Roland Dreier
2007-08-09 18:16 ` Shirley Ma
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=ada7inz85u4.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=shemminger@linux-foundation.org \
--cc=xma@us.ibm.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).