netdev
[Top] [All Lists]

RE: [PATCH] make tg3 NAPI support configurable

To: scott.feldman@xxxxxxxxx, Robert.Olsson@xxxxxxxxxxx, jgarzik@xxxxxxxxx
Subject: RE: [PATCH] make tg3 NAPI support configurable
From: jc <jchapman@xxxxxxxxxxx>
Date: Thu, 15 Jan 2004 08:01:42 +0000
Cc: gnb@xxxxxxxxxxxxxxxxx, davem@xxxxxxxxxx, netdev@xxxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Internet Messaging Program (IMP) 3.1
Hi all,

I found that testing if any tx work is done in dev->poll before exiting 
polled mode improves performance by about 7% (max) in a 2-port e100 bridge
forwarding unidirectional test case. If tx work is not considered when 
deciding whether to netif_rx_complete, the transmitting interface sees 
loads of interrupts and hence forwarding throughput is degraded. 

When testing with bidirectional test data, no improvement is seen since 
the dev->poll is kept in polled mode on both interfaces due to
receive work.

Hope this helps.

-jc   

> > >  Furthermore NAPI can be extended to schedule dev->poll even for TX-
> > >  interrupts. There is pacth for e1000 doing this. We see about 5-8% 
> > >  overall system packet improvement with this.

> > I was thinking of a variant JC [jchapman@xxxxxxxxxxx]
> > mentioned on this list some time ago. He also sent me
> > the patch for e1000. A test and the patch is below.
> 
> JC contributed almost the exact patch for the e100 rewrite and it did
> help Tx, but I don't remember how much.  JC, do you remember?  Here is
> the snippet:
> 
> static int e100_poll(struct net_device *netdev, int *budget)
> {
>         struct nic *nic = netdev->priv;
>         unsigned int work_to_do = min(netdev->quota, *budget);
>         unsigned int work_done = 0;
>         int tx_cleaned;
> 
>         e100_rx_clean(nic, &work_done, work_to_do);
>         tx_cleaned = e100_tx_clean(nic);
> 
>         /* If no Rx and Tx cleanup work was done, exit polling mode. */
>         if((!tx_cleaned && (work_done == 0)) || !netif_running(netdev))
>         {
>                 netif_rx_complete(netdev);
>                 e100_enable_irq(nic);
>                 return 0;
>         }
> 
>         *budget -= work_done;
>         netdev->quota -= work_done;
> 
>         return 1;
> }
 




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

<Prev in Thread] Current Thread [Next in Thread>