netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: 2.6.24-rc1 fails with lockup - /sbin/ifconfig / inet_ioctl() / dev_close() / rtl8169_down()
       [not found]           ` <1193378269.17910.4.camel@localhost>
@ 2007-10-26  6:37             ` Ingo Molnar
  2007-10-26 16:48               ` Stephen Hemminger
  0 siblings, 1 reply; 7+ messages in thread
From: Ingo Molnar @ 2007-10-26  6:37 UTC (permalink / raw)
  To: Romano Giannetti
  Cc: Peter Zijlstra, Linux Kernel Mailing List, David S. Miller,
	netdev, Francois Romieu, Edward Hsu, Jeff Garzik,
	Stephen Hemminger, Andrew Morton


* Romano Giannetti <romanol@upcomillas.es> wrote:

> > Does this help?
> 
> I tried this, but although I have the D-state processes, I cannot see 
> any debug trace now. Results are at:
> 
> http://www.dea.icai.upcomillas.es/romano/linux/info/2624rc1_3/
> 
> Can I try anything more? This is quite a show-stopper for me... and 
> before trying to bisect 11Mbyte of patches...

hm, from your log it appears that lockdep did not find anything, still 
the hang does trigger.

it's /sbin/ifconfig and inet_ioctl() / dev_close() / rtl8169_down() that 
seems to be hanging. I've extracted the relevant backtrace below. I've 
Cc:-ed people who might have a better idea about what's going on.

	Ingo

 ------------------>
 ifconfig      S c0476f80     0  7226   7166
        cbb67df0 00000046 c02f3f97 c0476f80 cbb67dc0 c01489d5 c2b81550 c2b8168c 
        c1cf7b80 00000000 c30bd250 00000000 cbb67dd0 00000282 cbb67e00 c0476f80 
        cbb67df0 c0132618 00004232 00000000 00000282 cbb67e00 00004232 f884e000 
 Call Trace:
  [schedule_timeout+72/192] schedule_timeout+0x48/0xc0
  [schedule_timeout_interruptible+21/32] schedule_timeout_interruptible+0x15/0x20
  [msleep_interruptible+39/64] msleep_interruptible+0x27/0x40
  [<f88422f0>] rtl8169_down+0xb0/0xd0 [r8169]
  [<f88424cf>] rtl8169_close+0x1f/0xb0 [r8169]
  [dev_close+71/96] dev_close+0x47/0x60
  [dev_change_flags+125/384] dev_change_flags+0x7d/0x180
  [devinet_ioctl+1225/1632] devinet_ioctl+0x4c9/0x660
  [inet_ioctl+107/144] inet_ioctl+0x6b/0x90
  [sock_ioctl+208/544] sock_ioctl+0xd0/0x220
  [do_ioctl+40/128] do_ioctl+0x28/0x80
  [vfs_ioctl+87/640] vfs_ioctl+0x57/0x280
  [sys_ioctl+57/96] sys_ioctl+0x39/0x60
  [sysenter_past_esp+95/165] sysenter_past_esp+0x5f/0xa5
  =======================

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.6.24-rc1 fails with lockup - /sbin/ifconfig / inet_ioctl() / dev_close() / rtl8169_down()
  2007-10-26  6:37             ` 2.6.24-rc1 fails with lockup - /sbin/ifconfig / inet_ioctl() / dev_close() / rtl8169_down() Ingo Molnar
@ 2007-10-26 16:48               ` Stephen Hemminger
  2007-10-26 17:56                 ` Ingo Molnar
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2007-10-26 16:48 UTC (permalink / raw)
  To: Ingo Molnar, Francois Romieu
  Cc: Romano Giannetti, Peter Zijlstra, Linux Kernel Mailing List,
	David S. Miller, netdev, Edward Hsu, Jeff Garzik, Andrew Morton

On Fri, 26 Oct 2007 08:37:33 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> 
> * Romano Giannetti <romanol@upcomillas.es> wrote:
> 
> > > Does this help?
> > 
> > I tried this, but although I have the D-state processes, I cannot see 
> > any debug trace now. Results are at:
> > 
> > http://www.dea.icai.upcomillas.es/romano/linux/info/2624rc1_3/
> > 
> > Can I try anything more? This is quite a show-stopper for me... and 
> > before trying to bisect 11Mbyte of patches...
> 
> hm, from your log it appears that lockdep did not find anything, still 
> the hang does trigger.
> 
> it's /sbin/ifconfig and inet_ioctl() / dev_close() / rtl8169_down() that 
> seems to be hanging. I've extracted the relevant backtrace below. I've 
> Cc:-ed people who might have a better idea about what's going on.
> 
> 	Ingo

Are you building with NAPI enabled or not. Looks like the following
might help the non-napi case.

--- a/drivers/net/r8169.c	2007-10-24 21:38:43.000000000 -0700
+++ b/drivers/net/r8169.c	2007-10-26 09:46:07.000000000 -0700
@@ -2989,13 +2989,16 @@ static void rtl8169_down(struct net_devi
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
 	void __iomem *ioaddr = tp->mmio_addr;
-	unsigned int poll_locked = 0;
 	unsigned int intrmask;
 
 	rtl8169_delete_timer(dev);
 
 	netif_stop_queue(dev);
 
+#ifdef CONFIG_R8169_NAPI
+	napi_disable(&tp->napi);
+#endif
+
 core_down:
 	spin_lock_irq(&tp->lock);
 
@@ -3009,11 +3012,6 @@ core_down:
 
 	synchronize_irq(dev->irq);
 
-	if (!poll_locked) {
-		napi_disable(&tp->napi);
-		poll_locked++;
-	}
-
 	/* Give a racing hard_start_xmit a few cycles to complete. */
 	synchronize_sched();  /* FIXME: should this be synchronize_irq()? */
 




-- 
Stephen Hemminger <shemminger@linux-foundation.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 2.6.24-rc1 fails with lockup - /sbin/ifconfig / inet_ioctl() / dev_close() / rtl8169_down()
  2007-10-26 16:48               ` Stephen Hemminger
@ 2007-10-26 17:56                 ` Ingo Molnar
  2007-10-26 18:33                   ` [PATCH] r8169: don't call napi_disable if not doing NAPI Stephen Hemminger
  0 siblings, 1 reply; 7+ messages in thread
From: Ingo Molnar @ 2007-10-26 17:56 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Francois Romieu, Romano Giannetti, Peter Zijlstra,
	Linux Kernel Mailing List, David S. Miller, netdev, Edward Hsu,
	Jeff Garzik, Andrew Morton


* Stephen Hemminger <shemminger@linux-foundation.org> wrote:

> > hm, from your log it appears that lockdep did not find anything, 
> > still the hang does trigger.
> > 
> > it's /sbin/ifconfig and inet_ioctl() / dev_close() / rtl8169_down() 
> > that seems to be hanging. I've extracted the relevant backtrace 
> > below. I've Cc:-ed people who might have a better idea about what's 
> > going on.
> 
> Are you building with NAPI enabled or not. Looks like the following 
> might help the non-napi case.

the config from:

  http://www.dea.icai.upcomillas.es/romano/linux/info/2624rc1_1/

suggests that NAPI was disabled:

  CONFIG_R8169=m
  # CONFIG_R8169_NAPI is not set
  CONFIG_R8169_VLAN=y

	Ingo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] r8169: don't call napi_disable if not doing NAPI
  2007-10-26 17:56                 ` Ingo Molnar
@ 2007-10-26 18:33                   ` Stephen Hemminger
  2007-10-26 20:17                     ` Francois Romieu
                                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stephen Hemminger @ 2007-10-26 18:33 UTC (permalink / raw)
  To: Ingo Molnar, Francois Romieu, Jeff Garzik
  Cc: Romano Giannetti, Peter Zijlstra, Linux Kernel Mailing List,
	David S. Miller, netdev, Edward Hsu, Andrew Morton

Don't call napi_disable if not configured.
And make sure that any misuse of napi_xxx in future fails
with a compile error.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>

--- a/drivers/net/r8169.c	2007-10-24 21:38:43.000000000 -0700
+++ b/drivers/net/r8169.c	2007-10-26 11:27:02.000000000 -0700
@@ -392,7 +392,9 @@ struct rtl8169_private {
 	void __iomem *mmio_addr;	/* memory map physical address */
 	struct pci_dev *pci_dev;	/* Index of PCI device */
 	struct net_device *dev;
+#ifdef CONFIG_R8169_NAPI
 	struct napi_struct napi;
+#endif
 	spinlock_t lock;		/* spin lock flag */
 	u32 msg_enable;
 	int chipset;
@@ -2989,13 +2991,16 @@ static void rtl8169_down(struct net_devi
 {
 	struct rtl8169_private *tp = netdev_priv(dev);
 	void __iomem *ioaddr = tp->mmio_addr;
-	unsigned int poll_locked = 0;
 	unsigned int intrmask;
 
 	rtl8169_delete_timer(dev);
 
 	netif_stop_queue(dev);
 
+#ifdef CONFIG_R8169_NAPI
+	napi_disable(&tp->napi);
+#endif
+
 core_down:
 	spin_lock_irq(&tp->lock);
 
@@ -3009,11 +3014,6 @@ core_down:
 
 	synchronize_irq(dev->irq);
 
-	if (!poll_locked) {
-		napi_disable(&tp->napi);
-		poll_locked++;
-	}
-
 	/* Give a racing hard_start_xmit a few cycles to complete. */
 	synchronize_sched();  /* FIXME: should this be synchronize_irq()? */
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] r8169: don't call napi_disable if not doing NAPI
  2007-10-26 18:33                   ` [PATCH] r8169: don't call napi_disable if not doing NAPI Stephen Hemminger
@ 2007-10-26 20:17                     ` Francois Romieu
  2007-10-28 22:18                     ` Romano Giannetti
  2007-10-29  8:56                     ` Romano Giannetti
  2 siblings, 0 replies; 7+ messages in thread
From: Francois Romieu @ 2007-10-26 20:17 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Ingo Molnar, Jeff Garzik, Romano Giannetti, Peter Zijlstra,
	Linux Kernel Mailing List, David S. Miller, netdev, Edward Hsu,
	Andrew Morton

Stephen Hemminger <shemminger@linux-foundation.org> :
> Don't call napi_disable if not configured.
> And make sure that any misuse of napi_xxx in future fails
> with a compile error.

Disable napi polling early and remove the useless poll_locked logic.

> 
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>

Acked-off-by: Francois Romieu <romieu@fr.zoreil.com>

-- 
Ueimor

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] r8169: don't call napi_disable if not doing NAPI
  2007-10-26 18:33                   ` [PATCH] r8169: don't call napi_disable if not doing NAPI Stephen Hemminger
  2007-10-26 20:17                     ` Francois Romieu
@ 2007-10-28 22:18                     ` Romano Giannetti
  2007-10-29  8:56                     ` Romano Giannetti
  2 siblings, 0 replies; 7+ messages in thread
From: Romano Giannetti @ 2007-10-28 22:18 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Ingo Molnar, Francois Romieu, Jeff Garzik, Peter Zijlstra,
	Linux Kernel Mailing List, David S. Miller, netdev, Edward Hsu,
	Andrew Morton


On Fri, 2007-10-26 at 11:33 -0700, Stephen Hemminger wrote:
> Don't call napi_disable if not configured.
> And make sure that any misuse of napi_xxx in future fails
> with a compile error.

Will test as soon as possible (been without internet in the week end). 
Thanks.

As a bonus, I tried more thing, and I had a signal form lockdep. You can
find it here:

http://www.dea.icai.upcomillas.es/romano/linux/info/2624rc1_5/

patching and compiling now.

Romano 

-- 
Sorry for the disclaimer --- ¡I cannot stop it!



--
La presente comunicación tiene carácter confidencial y es para el exclusivo uso del destinatario indicado en la misma. Si Ud. no es el destinatario indicado, le informamos que cualquier forma de distribución, reproducción o uso de esta comunicación y/o de la información contenida en la misma están estrictamente prohibidos por la ley. Si Ud. ha recibido esta comunicación por error, por favor, notifíquelo inmediatamente al remitente contestando a este mensaje y proceda a continuación a destruirlo. Gracias por su colaboración.

This communication contains confidential information. It is for the exclusive use of the intended addressee. If you are not the intended addressee, please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited by law. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this message. Thank you for your cooperation. 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] r8169: don't call napi_disable if not doing NAPI
  2007-10-26 18:33                   ` [PATCH] r8169: don't call napi_disable if not doing NAPI Stephen Hemminger
  2007-10-26 20:17                     ` Francois Romieu
  2007-10-28 22:18                     ` Romano Giannetti
@ 2007-10-29  8:56                     ` Romano Giannetti
  2 siblings, 0 replies; 7+ messages in thread
From: Romano Giannetti @ 2007-10-29  8:56 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Ingo Molnar, Francois Romieu, Jeff Garzik, Peter Zijlstra,
	Linux Kernel Mailing List, David S. Miller, netdev, Edward Hsu,
	Andrew Morton


On Fri, 2007-10-26 at 11:33 -0700, Stephen Hemminger wrote:
> Don't call napi_disable if not configured.
> And make sure that any misuse of napi_xxx in future fails
> with a compile error.
> 
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
> 

This fix the problem for me (at least, after 8 suspend/resume cycles). 
Thanks.

Tested-by: Romano Giannetti <romano.giannetti@gmail.com>

-- 
Sorry for the disclaimer --- ¡I cannot stop it!



--
La presente comunicación tiene carácter confidencial y es para el exclusivo uso del destinatario indicado en la misma. Si Ud. no es el destinatario indicado, le informamos que cualquier forma de distribución, reproducción o uso de esta comunicación y/o de la información contenida en la misma están estrictamente prohibidos por la ley. Si Ud. ha recibido esta comunicación por error, por favor, notifíquelo inmediatamente al remitente contestando a este mensaje y proceda a continuación a destruirlo. Gracias por su colaboración.

This communication contains confidential information. It is for the exclusive use of the intended addressee. If you are not the intended addressee, please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited by law. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy this message. Thank you for your cooperation. 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-10-29  8:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <alpine.LFD.0.999.0710232057080.30120@woody.linux-foundation.org>
     [not found] ` <1193232344.32208.0.camel@localhost>
     [not found]   ` <20071024142759.GA13657@elte.hu>
     [not found]     ` <1193241191.14314.8.camel@localhost>
     [not found]       ` <20071024155521.GA16690@elte.hu>
     [not found]         ` <1193242267.6914.6.camel@twins>
     [not found]           ` <1193378269.17910.4.camel@localhost>
2007-10-26  6:37             ` 2.6.24-rc1 fails with lockup - /sbin/ifconfig / inet_ioctl() / dev_close() / rtl8169_down() Ingo Molnar
2007-10-26 16:48               ` Stephen Hemminger
2007-10-26 17:56                 ` Ingo Molnar
2007-10-26 18:33                   ` [PATCH] r8169: don't call napi_disable if not doing NAPI Stephen Hemminger
2007-10-26 20:17                     ` Francois Romieu
2007-10-28 22:18                     ` Romano Giannetti
2007-10-29  8:56                     ` Romano Giannetti

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).