| To: | "David S. Miller" <davem@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH]: Tigon3 new NAPI locking v2 |
| From: | Jeff Garzik <jgarzik@xxxxxxxxx> |
| Date: | Fri, 03 Jun 2005 16:23:07 -0400 |
| Cc: | netdev@xxxxxxxxxxx, mchan@xxxxxxxxxxxx |
| In-reply-to: | <20050603.122558.88474819.davem@davemloft.net> |
| References: | <20050603.122558.88474819.davem@davemloft.net> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050328 Fedora/1.7.6-1.2.5 |
David S. Miller wrote:
[TG3]: Eliminate all hw IRQ handler spinlocks.
As further work, I would like to see how much (alot? all?) of the timer code could be moved into a workqueue, where we could kill the last of the horrible-udelay loops in the driver. Particularly awful is while (++tick < 195000) {
status = tg3_fiber_aneg_smachine(tp, &aninfo);
if (status == ANEG_DONE || status == ANEG_FAILED)
break; udelay(1);
}where you could freeze a uniprocess box (lock out everything but interrupts) for over 1 second. IOW, the slower the phy, the more these slow-path delays can affect the overall system. This is a MINOR, low priority issue; but long delays are uglies that should be fixed, if its relatively painless. * This loop makes me nervous... If there's a fault on the PCI bus or the hardware is unplugged, val will equal 0xffffffff. * A few comments for normal humans like "force an interrupt" and "wait for interrupt handler to complete" might be nice. * a BUG_ON(if-interrupts-are-disabled) line might be nice Rather than an 'irq_sync' arg, my instinct would have been to create tg3_full_lock() and tg3_full_lock_sync(). This makes the action -much- more obvious to the reader, and since its inline doesn't cost anything (compiler's optimizer even does a tiny bit less work my way). Jeff |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: RFC: NAPI packet weighting patch, David S. Miller |
|---|---|
| Next by Date: | Re: RFC: NAPI packet weighting patch, jamal |
| Previous by Thread: | [PATCH]: Tigon3 new NAPI locking v2, David S. Miller |
| Next by Thread: | Re: [PATCH]: Tigon3 new NAPI locking v2, David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |