netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Roger Luethi <rl@hellgate.ch>
Cc: Andrew Morton <akpm@osdl.org>, netdev@oss.sgi.com
Subject: Re: [6/9][PATCH 2.6] Fix Tx engine race for good
Date: Sat, 19 Jun 2004 17:22:44 -0400	[thread overview]
Message-ID: <40D4AEA4.6050005@pobox.com> (raw)
In-Reply-To: <20040615174933.GA11294@k3.hellgate.ch>

Roger Luethi wrote:
> +#define RHINE_WAIT_FOR(condition) do {					\
> +	int i=1024;							\
> +	while (!(condition) && --i)					\
> +		;							\
> +	if (debug > 1 && i < 512)					\
> +		printk(KERN_INFO "%s: %4d cycles used @ %s:%d\n",	\
> +				DRV_NAME, 1024-i, __func__, __LINE__);	\
> +} while(0)

empty loops need at least a cpu_relax(), if not a true delay to 
guarantee the timing you desire.

Also, it would be nice to change the name, since there isn't anything 
rhine-specific about this macro.

	Jeff

       reply	other threads:[~2004-06-19 21:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040615174933.GA11294@k3.hellgate.ch>
2004-06-19 21:22 ` Jeff Garzik [this message]
2004-06-19 22:18   ` [6/9][PATCH 2.6] Fix Tx engine race for good Roger Luethi

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=40D4AEA4.6050005@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=akpm@osdl.org \
    --cc=netdev@oss.sgi.com \
    --cc=rl@hellgate.ch \
    /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).