netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* NAPI:  dev.c change to net_rx_action algorithm.
@ 2002-11-09  4:23 Ben Greear
  2002-11-09  4:32 ` jamal
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Greear @ 2002-11-09  4:23 UTC (permalink / raw)
  To: 'netdev@oss.sgi.com'

I tried making this change to dev.c in the net_rx_action method.

So far, I have passed about 25 million packets and only dropped
about 1.5k.  This is with 4 interfaces tx + rx 8kpps (757 byte packets).

rx-ring size is 1024, weight is 24, skb-hotlist is 2048.  This is
the best results so far, but it may be that this code change does
not fare so well in other cases....

Comments?


/*
		if (dev->quota <= 0 || dev->poll(dev, &budget)) {
			local_irq_disable();
			list_del(&dev->poll_list);
			list_add_tail(&dev->poll_list, &queue->poll_list);
			if (dev->quota < 0)
                                 dev->quota += dev->weight;
                         else
                                 dev->quota = dev->weight;
		} else {
			dev_put(dev);
			local_irq_disable();
		}
*/

                 /* This scheme should allow devices to build up 2x their weight in quota
                  * credit.  Heavy users will only get their normal quota.  This should
                  * help let bursty traffic get higher priority. --Ben
                  */
                 if (dev->poll(dev, &budget)) {
                         /* More to do, put these guys back on the poll list */
			local_irq_disable();
			list_del(&dev->poll_list);
			list_add_tail(&dev->poll_list, &queue->poll_list);
                         dev->quota = dev->weight;
                 }
                 else {
                         /* These guys are done, they come off of the poll list */
                         if (dev->quota >= dev->weight) {
                                 dev->quota = (dev->weight << 1); /* max quota of 2x weight */
                         }
                         else {
                                 dev->quota += dev->weight;
                         }
			dev_put(dev);
			local_irq_disable();
		}

-- 
Ben Greear <greearb@candelatech.com>       <Ben_Greear AT excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-11-09 14:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-09  4:23 NAPI: dev.c change to net_rx_action algorithm Ben Greear
2002-11-09  4:32 ` jamal
2002-11-09  4:55   ` Ben Greear
2002-11-09  4:58     ` jamal
2002-11-09  5:30       ` Ben Greear
2002-11-09 14:41         ` jamal

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).