| To: | "David S. Miller" <davem@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: Locking model for NAPI drivers |
| From: | "Michael Chan" <mchan@xxxxxxxxxxxx> |
| Date: | Thu, 02 Jun 2005 12:56:52 -0700 |
| Cc: | netdev@xxxxxxxxxxx |
| In-reply-to: | <1117661650.4310.62.camel@rh4> |
| References: | <20050531.154847.63995530.davem@davemloft.net> <1117658019.4310.58.camel@rh4> <20050601.152134.120445266.davem@davemloft.net> <1117661650.4310.62.camel@rh4> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Wed, 2005-06-01 at 14:34 -0700, Michael Chan wrote:
> On Wed, 2005-06-01 at 15:21 -0700, David S. Miller wrote:
> > Since the caller shuts down NAPI ->poll(), after setting the SYNC bit
> > we can just check the MAILBOX register, and if a '1' is there just
> > return. Does one need to mask out the upper bits of the regiser in
> > order to avoid seeing the IRQ tag in such a comparison?
> >
> No, just check for the value 1 since that's the value we use to disable
> interrupts. The value read back will always be 1 if 1 was previously
> written to it.
>
One more race condition:
CPU1 CPU2
tg3_poll()
__netif_rx_complete()
tg3_netif_stop()
netif_poll_disable()
tg3_full_lock()
tg3_irq_quiesce()
tg3_restart_ints()
BUG_ON(tp->irq_state)
This race condition is somewhat harmless but I think we need to take
care of it for correctness. Any simple ways to fix it?
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: 2.6.12-rc5-mm2: "bic unavailable using TCP reno" messages, Adrian Bunk |
|---|---|
| Next by Date: | RE: RFC: NAPI packet weighting patch, Ronciak, John |
| Previous by Thread: | Re: Locking model for NAPI drivers, Michael Chan |
| Next by Thread: | Unable to handle kernel paging request at virtual address 04000460, raghunathan.venkatesan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |