netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: "'netdev@oss.sgi.com'" <netdev@oss.sgi.com>
Subject: NAPI:  dev.c change to net_rx_action algorithm.
Date: Fri, 08 Nov 2002 20:23:30 -0800	[thread overview]
Message-ID: <3DCC8DC2.4020204@candelatech.com> (raw)

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

             reply	other threads:[~2002-11-09  4:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-09  4:23 Ben Greear [this message]
2002-11-09  4:32 ` NAPI: dev.c change to net_rx_action algorithm 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

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=3DCC8DC2.4020204@candelatech.com \
    --to=greearb@candelatech.com \
    --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;
as well as URLs for NNTP newsgroup(s).