[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <535ddc6b0709041021y4f280aa2t829c46a33b19bb16@mail.gmail.com>
Date: Tue, 4 Sep 2007 10:21:08 -0700
From: "Mandeep Baines" <mandeep.baines@...il.com>
To: hadi@...erus.ca
Cc: "Daniele Venzano" <venza@...wnhat.org>, davem@...emloft.net,
rick.jones2@...com, msb@...gle.com, netdev@...r.kernel.org,
grundler@...gle.com, robert.olsson@....uu.se, jeff@...zik.org,
nhorman@...driver.com
Subject: Re: [PATCH] [sis900] convert to NAPI, WAS Re: pktgen terminating condition
On 9/4/07, jamal <hadi@...erus.ca> wrote:
> On Mon, 2007-03-09 at 20:20 -0700, Mandeep Singh Baines wrote:
>
> > I didn't see much saving in interrupts on my machine (too fast, I guess).
>
> You could try the idea suggested by Dave earlier and just turn interupts
> for every nth packet. That should cut down the numbers.
>
I wanted to do that but I couldn't figure out how to free the last skb
if it happened to be a transmit that didn't generate a tx completion
interrupt.
Let's say I interrupt every 4th packet.I've already sent packets 0 to
4. Now I send packets 5 and 6. I can't figure out how to ensure that
the skb's for these packets get freed in a deterministic amount of
time if there is no interrupt? They will get freed when packet 8 gets
transmitted but there is no upper bound on when that will happen.
Maybe I could create a tx skb cleanup timer that I kickoff in
hard_start_xmit(). Every call to hard_start_xmit would reset the
timer. I could try this for a future patch. Not sure if the extra code
would cost me more than I get back in savings.
> > I did see a significant boost to tx performance by optimizing start_xmit: more
> > than double pps in pktgen.
>
> 148Kpps on a slow piece of hardware aint bad - Good Stuff. I wonder how
> much CPU is being abused.
>
> If you wanna go one extra mile (separate future patch): get rid of that
> tx lock and use netif_tx_lock on the interupt path. Look at some sane
> driver like tg3 for reference.
>
Cool. I'll check out the tg3.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists