| To: | Stephen Hemminger <shemminger@xxxxxxxx> |
|---|---|
| Subject: | Re: [RFT 1/3] 8139: safer spin loop for get_statistics |
| From: | Francois Romieu <romieu@xxxxxxxxxxxxx> |
| Date: | Thu, 17 Mar 2005 00:21:52 +0100 |
| Cc: | Jeff Garzik <jgarzik@xxxxxxxxx>, netdev@xxxxxxxxxxx |
| In-reply-to: | <20050316150429.375845f1@xxxxxxxxxxxxxxxxx> |
| References: | <20050316150429.375845f1@xxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.4.1i |
Stephen Hemminger <shemminger@xxxxxxxx> :
[...]
> diff -Nru a/drivers/net/8139cp.c b/drivers/net/8139cp.c
> --- a/drivers/net/8139cp.c 2005-03-16 14:54:48 -08:00
> +++ b/drivers/net/8139cp.c 2005-03-16 14:54:48 -08:00
[...]
> - while (work-- > 0) {
> + for (i = 0; i < 1000; i++) {
> if ((cpr32(StatsAddr) & DumpStats) == 0)
> break;
> - cpu_relax();
> + udelay(10);
> }
I am tempted to remove some stuff:
while (cpr32(StatsAddr) & DumpStats) {
if (msleep_interruptible(1))
break;
}
May be we could remove "cpr32(StatsAddr);" too as any posted write will
be commited in the loop anyway.
--
Ueimor
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [RFT 3/3] 8139cp: allocate statistics space only when needed, Stephen Hemminger |
|---|---|
| Next by Date: | [PATCH] net, ipv6: remove redundant NULL checks before kfree in ip6_flowlabel.c, Jesper Juhl |
| Previous by Thread: | [RFT 1/3] 8139: safer spin loop for get_statistics, Stephen Hemminger |
| Next by Thread: | [RFT 2/3] 8139cp: don't mix software and chip stats, Stephen Hemminger |
| Indexes: | [Date] [Thread] [Top] [All Lists] |