netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: akepner@sgi.com
Cc: mchan@broadcom.com, netdev@oss.sgi.com
Subject: Re: Perf data with recent tg3 patches
Date: Fri, 13 May 2005 17:50:13 -0700 (PDT)	[thread overview]
Message-ID: <20050513.175013.00786860.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0505131648140.14917@linux.site>

From: Arthur Kepner <akepner@sgi.com>
Subject: Re: Perf data with recent tg3 patches
Date: Fri, 13 May 2005 16:57:51 -0700 (PDT)

> I found that the reason is that, 
> under high receive load, most of the time (~80%) the 
> tag in the status block changes between the time that 
> it's read (and saved as last_tag) in tg3_poll(), and when 
> it's written back to MAILBOX_INTERRUPT_0 in 
> tg3_restart_ints(). If I understand the way the status 
> tag works, that means that the card will immediately 
> generate another interrupt. That's consistent with 
> what I'm seeing - a much higher interrupt rate when the 
> tagged status patch is used.

Thanks for tracking this down.

Perhaps we can make the logic in tg3_poll() smarter about
this.  Something like:

	tg3_process_phy_events();
	tg3_tx();
	tg3_rx();

	if (tp->tg3_flags & TG3_FLAG_TAGGED_STATUS)
		tp->last_tag = sblk->status_tag;
	rmb();
	done = !tg3_has_work(tp);
	if (done) {
		spin_lock_irqsave(&tp->lock, flags);
		__netif_rx_complete(netdev);
		tg3_restart_ints(tp);
		spin_unlock_irqrestore(&tp->lock, flags);
	}
	return (done ? 0 : 1);

Basically, move the last_tag sample to after we do the
work, then recheck the RX/TX producer/consumer indexes.

  reply	other threads:[~2005-05-14  0:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-13  2:49 Perf data with recent tg3 patches Arthur Kepner
     [not found] ` <20050512.211935.67881321.davem@davemloft.net>
2005-05-13 23:57   ` Arthur Kepner
2005-05-14  0:50     ` David S. Miller [this message]
2005-05-14  0:39       ` Michael Chan
2005-05-14  5:20         ` David S. Miller
2005-05-20 21:52           ` Arthur Kepner
2005-05-20 22:33             ` David S. Miller
2005-05-20 22:52               ` Rick Jones
2005-05-20 22:54               ` Arthur Kepner

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=20050513.175013.00786860.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=akepner@sgi.com \
    --cc=mchan@broadcom.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).