From: jamal <hadi@cyberus.ca>
To: mellia@prezzemolo.polito.it
Cc: P@draigBrady.com, e1000-devel@lists.sourceforge.net,
Jorge Manuel Finochietto <jorge.finochietto@polito.it>,
Giulio Galante <galante@polito.it>,
netdev@oss.sgi.com
Subject: Re: [E1000-devel] Transmission limit
Date: 30 Nov 2004 08:46:04 -0500 [thread overview]
Message-ID: <1101822364.1044.60.camel@jzny.localdomain> (raw)
In-Reply-To: <1101738118.14930.142.camel@verza.polito.it>
On Mon, 2004-11-29 at 09:21, Marco Mellia wrote:
> On Fri, 2004-11-26 at 20:56, jamal wrote:
> > On Fri, 2004-11-26 at 10:31, Marco Mellia wrote:
> > > If you don't trust us, please, ignore this email.
> > > Sorry.
> >
> > Dont take it the wrong way please - nobody has been able to produce the
> > results you have. So thats why you may be getting that comment.
> > The fact you have been able to do this is a good thing.
>
> No problem from this side. I also forgot a couple of 8-! I guess...
>
> [...]
>
> > prefetching as in the use of prefetch()?
> > What were you prefetching if you end up dropping packet?
> >
>
I read your paper on the weekend - theres one thing which i dont think
has been written on before on NAPI that you covered unfortunetly with no
melodrama ;-> This is the min-max fairness issue. If you actually mix
and match different speeds then it becomes a really interesting problem.
Example try congesting a 100Mbps with 2x1Gbps. What quotas to use etc.
Could this be done cleverly at runtime with dynamic adjustments etc.
Next time you want you want to slave students to do some work talk to us
- I got plenty of things you could try out and keep them busy forever;->
> Sorry I used the wrong terms there.
> What we discovered, is that the CPU caching mechanisms as a HUGE impact.
> And that you have very little control on it. Prefetching may help, but
> it is difficult to tredict its impacts...
Prefetching is hard. The only evidence i have seen of actually what
"appears" to be working prefetching is some code from David Morsberger
at HP. Other architectures are known to be more friendly - my eperiences
with MIPs are far more pleasant. BTW, thats another topic to get those
students to investigate ;->
> Indeed, if you access to the packet struct, the CPU has to fetch data
> from the main memory, which stored the packet transfered using DMA from
> the NIC. The penalty in the memory access is huge, and you have little
> control on it.
>
> In our experiments, we modified the kernel to drop packets just after
> receiving them. skb are just deallocated (using standerd kernel
> routines, i.e., no recycling is used). Logically, that happen when the
> netif_rx() is called.
>
> Now, we have three cases
> 1) just mofify the netif_rx() to drop packets.
> 2) as in one, plus remove the protocol check in the driver
> (i.e., comment the line
> skb->protocol = eth_type_trans(skb, netdev);
> ) to avoid to access the real packet data.
> 3) as in 2, but dealloc is performed at the driver level, instead of
> calling the netif_rx()
>
> In the first case, we can receive about 1.1Mpps (~80% of packets)
Possible. I was able to receive 900Kpps or so in my experiments with
gact drop which is slightly above this with a 2.4 Ghz machine with IRQ
affinity.
> In the second case, we can receive 100% of packets, as we removed the
> penalty of looking at the packet headers to discover its protocol type.
>
This is the one people found hard to believe. I will go and retest this.
It is possible.
> In the third case, we can NOT receive 100% of packets!
> The only difference is that we actually _REMOVED_ a funcion call. This
> reduces the overhead, and the compiler/cpu/whatever can not optimize the
> data path to access to the skb which must be freed.
It doesnt seem like you were runing NAPI if you depended on calling
netif_rx
In that case, #3 would be freeing in hard IRQ context while #2 is
softIRQ.
> Our guess is that by freeing up the skb in the netif_rx() function
> actually allows the compiler/cpu to prefetch the skb itself, and
> therefore keep the pipeline working...
>
> My guess is that if you change compiler, cpu, memory subsystem, you may
> get very counterintuitive results...
Refer to my comment above.
Repeat tests with NAPI and see if you get same results.
cheers,
jamal
next prev parent reply other threads:[~2004-11-30 13:46 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1101467291.24742.70.camel@mellia.lipar.polito.it>
2004-11-26 14:05 ` [E1000-devel] Transmission limit P
2004-11-26 15:31 ` Marco Mellia
2004-11-26 19:56 ` jamal
2004-11-29 14:21 ` Marco Mellia
2004-11-30 13:46 ` jamal [this message]
2004-12-02 17:24 ` Marco Mellia
2004-11-26 20:06 ` jamal
2004-11-26 20:56 ` Lennert Buytenhek
2004-11-26 21:02 ` Lennert Buytenhek
2004-11-27 9:25 ` Harald Welte
[not found] ` <20041127111101.GC23139@xi.wantstofly.org>
2004-11-27 11:31 ` Harald Welte
2004-11-27 20:12 ` Cesar Marcondes
2004-11-29 8:53 ` Marco Mellia
2004-11-29 14:50 ` Lennert Buytenhek
2004-11-30 8:42 ` Marco Mellia
2004-12-01 12:25 ` jamal
2004-12-02 13:39 ` Marco Mellia
2004-12-03 13:07 ` jamal
2004-11-26 15:40 ` Robert Olsson
2004-11-26 15:59 ` Marco Mellia
2004-11-26 16:57 ` P
2004-11-26 20:01 ` jamal
2004-11-29 10:19 ` P
2004-11-29 13:09 ` Robert Olsson
2004-11-29 20:16 ` David S. Miller
2004-12-01 16:47 ` Robert Olsson
2004-11-30 13:31 ` jamal
2004-11-30 13:46 ` Lennert Buytenhek
2004-11-30 14:25 ` jamal
2004-12-01 0:11 ` Lennert Buytenhek
2004-12-01 1:09 ` Scott Feldman
2004-12-01 15:34 ` Robert Olsson
2004-12-01 16:49 ` Scott Feldman
2004-12-01 17:37 ` Robert Olsson
2004-12-02 17:54 ` Robert Olsson
2004-12-02 18:23 ` Robert Olsson
2004-12-02 23:25 ` Lennert Buytenhek
2004-12-03 5:23 ` Scott Feldman
2004-12-10 16:24 ` Martin Josefsson
2004-12-01 18:29 ` Lennert Buytenhek
2004-12-01 21:35 ` Lennert Buytenhek
2004-12-02 6:13 ` Scott Feldman
2004-12-03 13:24 ` jamal
2004-12-05 14:50 ` 1.03Mpps on e1000 (was: Re: [E1000-devel] Transmission limit) Lennert Buytenhek
2004-12-05 15:03 ` Martin Josefsson
2004-12-05 15:15 ` Lennert Buytenhek
2004-12-05 15:19 ` Martin Josefsson
2004-12-05 15:30 ` Martin Josefsson
2004-12-05 17:00 ` Lennert Buytenhek
2004-12-05 17:11 ` Martin Josefsson
2004-12-05 17:38 ` Martin Josefsson
2004-12-05 18:14 ` Lennert Buytenhek
2004-12-05 15:42 ` Martin Josefsson
2004-12-05 16:48 ` Martin Josefsson
2004-12-05 17:01 ` Martin Josefsson
2004-12-05 17:58 ` Lennert Buytenhek
2004-12-05 17:44 ` Lennert Buytenhek
2004-12-05 17:51 ` Lennert Buytenhek
2004-12-05 17:54 ` Martin Josefsson
2004-12-06 11:32 ` 1.03Mpps on e1000 (was: " jamal
2004-12-06 12:11 ` Lennert Buytenhek
2004-12-06 12:20 ` jamal
2004-12-06 12:23 ` Lennert Buytenhek
2004-12-06 12:30 ` Martin Josefsson
2004-12-06 13:11 ` jamal
[not found] ` <20041206132907.GA13411@xi.wantstofly.org>
[not found] ` <16820.37049.396306.295878@robur.slu.se>
2004-12-06 17:32 ` 1.03Mpps on e1000 (was: Re: [E1000-devel] " P
2004-12-08 23:36 ` Ray Lehtiniemi
[not found] ` <41B825A5.2000009@draigBrady.com>
[not found] ` <20041209161825.GA32454@mail.com>
2004-12-09 17:12 ` 1.03Mpps on e1000 P
[not found] ` <20041209164820.GB32454@mail.com>
2004-12-09 17:19 ` P
2004-12-09 23:25 ` Ray Lehtiniemi
2004-12-05 21:12 ` 1.03Mpps on e1000 (was: Re: [E1000-devel] Transmission limit) Scott Feldman
2004-12-05 21:25 ` Lennert Buytenhek
2004-12-06 1:23 ` 1.03Mpps on e1000 (was: " Scott Feldman
2004-12-02 17:31 ` [E1000-devel] Transmission limit Marco Mellia
2004-12-03 20:57 ` Lennert Buytenhek
2004-12-04 10:36 ` Lennert Buytenhek
2004-12-01 12:08 ` jamal
2004-12-01 15:24 ` Lennert Buytenhek
2004-11-26 17:58 ` Robert Olsson
2004-11-27 20:00 ` Lennert Buytenhek
2004-11-29 12:44 ` Marco Mellia
2004-11-29 15:19 ` Lennert Buytenhek
2004-11-29 17:32 ` Marco Mellia
2004-11-29 19:08 ` Lennert Buytenhek
2004-11-29 19:09 ` Lennert Buytenhek
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=1101822364.1044.60.camel@jzny.localdomain \
--to=hadi@cyberus.ca \
--cc=P@draigBrady.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=galante@polito.it \
--cc=jorge.finochietto@polito.it \
--cc=mellia@prezzemolo.polito.it \
--cc=netdev@oss.sgi.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