* [2.6.36-rc5] r8169 regression...
@ 2010-10-19 17:01 Daniel J Blueman
2010-10-19 22:07 ` Francois Romieu
0 siblings, 1 reply; 2+ messages in thread
From: Daniel J Blueman @ 2010-10-19 17:01 UTC (permalink / raw)
To: Matthew Garrett, Francois Romieu, David S. Miller
Cc: Linux Kernel, Linux Networking
Since 2.6.36-rc5, I've been seeing unexpected link up and (as a
side-effect) pending softirq messages [1] when transferring data over
a r8169 adapter ("RTL8168d/8111d").
The recent change [2] to make the r8169 driver sensitive to receive
overflow events is clearly unnecessary for this MAC revision (since it
was fine without before), so it may be worthwhile to reintroduce the
'tp->mac_version == RTL_GIGA_MAC_VER_11' condition on resetting the
link, tweaked to the problematic MAC version in the Thinkpad X100e.
As a second bonus, we find a latent softirq. When a receive overflow
is now detected, we get the callchain
rtl8169_tx_timeout->rtl8169_schedule_work which causes
rtl8169_reset_task->rtl8169_rx_interrupt->netif_rx from outside the
interrupt handler. I could cook a patch which would ensure
netif_rx_ni() is called outside the interrupt handler, but do we care?
Daniel
--- [1]
[ 1908.724492] r8169 0000:0b:00.0: eth0: link up
[ 1909.593803] r8169 0000:0b:00.0: eth0: link up
[ 1909.593818] NOHZ: local_softirq_pending 08
[ 1910.352950] r8169 0000:0b:00.0: eth0: link up
[ 1913.739897] r8169 0000:0b:00.0: eth0: link up
[ 1914.708997] r8169 0000:0b:00.0: eth0: link up
[ 1914.709011] NOHZ: local_softirq_pending 08
[ 1915.947717] r8169 0000:0b:00.0: eth0: link up
[ 1916.317396] r8169 0000:0b:00.0: eth0: link up
[ 1916.317409] NOHZ: local_softirq_pending 08
[ 1919.824151] r8169 0000:0b:00.0: eth0: link up
[ 1919.824169] NOHZ: local_softirq_pending 08
[ 1920.333731] r8169 0000:0b:00.0: eth0: link up
[ 1921.083030] r8169 0000:0b:00.0: eth0: link up
[ 1921.722490] r8169 0000:0b:00.0: eth0: link up
[ 1921.722506] NOHZ: local_softirq_pending 08
[ 1925.438882] r8169 0000:0b:00.0: eth0: link up
[ 1925.438896] NOHZ: local_softirq_pending 08
[ 1926.248151] r8169 0000:0b:00.0: eth0: link up
[ 1927.536887] r8169 0000:0b:00.0: eth0: link up
[ 1927.536893] NOHZ: local_softirq_pending 08
[ 1928.336193] r8169 0000:0b:00.0: eth0: link up
[ 1928.336211] NOHZ: local_softirq_pending 08
[ 1929.735001] r8169 0000:0b:00.0: eth0: link up
...
--- [2]
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=801e147cde02f04b5c2f42764cd43a89fc7400a2
--
Daniel J Blueman
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [2.6.36-rc5] r8169 regression...
2010-10-19 17:01 [2.6.36-rc5] r8169 regression Daniel J Blueman
@ 2010-10-19 22:07 ` Francois Romieu
0 siblings, 0 replies; 2+ messages in thread
From: Francois Romieu @ 2010-10-19 22:07 UTC (permalink / raw)
To: Daniel J Blueman
Cc: Matthew Garrett, David S. Miller, Linux Kernel, Linux Networking
Daniel J Blueman <daniel.blueman@gmail.com> :
> Since 2.6.36-rc5, I've been seeing unexpected link up and (as a
> side-effect) pending softirq messages [1] when transferring data over
> a r8169 adapter ("RTL8168d/8111d").
>
> The recent change [2] to make the r8169 driver sensitive to receive
> overflow events is clearly unnecessary for this MAC revision (since it
> was fine without before), so it may be worthwhile to reintroduce the
> 'tp->mac_version == RTL_GIGA_MAC_VER_11' condition on resetting the
> link, tweaked to the problematic MAC version in the Thinkpad X100e.
Matthew, can you apply the patch below and send your XID line ?
At this stage in -rc, I'd rather revert [2], live with some Thinkpad
X100e crashes when under network load while the screen turns off and
avoid any new pesky regression. David ?
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 992db2f..15b8e57 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -3208,7 +3208,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
netif_info(tp, probe, dev, "%s at 0x%lx, %pM, XID %08x IRQ %d\n",
rtl_chip_info[tp->chipset].name,
dev->base_addr, dev->dev_addr,
- (u32)(RTL_R32(TxConfig) & 0x9cf0f8ff), dev->irq);
+ (u32)(RTL_R32(TxConfig) & 0xfcf0f8ff), dev->irq);
rtl8169_init_phy(dev, tp);
[...]
> As a second bonus, we find a latent softirq. When a receive overflow
> is now detected, we get the callchain
> rtl8169_tx_timeout->rtl8169_schedule_work which causes
> rtl8169_reset_task->rtl8169_rx_interrupt->netif_rx from outside the
> interrupt handler. I could cook a patch which would ensure
> netif_rx_ni() is called outside the interrupt handler, but do we care?
You can remove rtl8169_rx_interrupt in rtl8169_reset_task so that
rtl8169_rx_interrupt be only called from softirq context. It will
save some what-is-the-current-context code and avoid a circular
rtl8169_rx_interrupt <-> rtl8169_reset_task dependency.
[...]
> --- [2]
>
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=801e147cde02f04b5c2f42764cd43a89fc7400a2
--
Ueimor
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-19 22:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-19 17:01 [2.6.36-rc5] r8169 regression Daniel J Blueman
2010-10-19 22:07 ` Francois Romieu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®