Re: netconsole hangs w/ alt-sysrq-t

From: Jeff Moyer
Date: Wed Apr 28 2004 - 07:47:12 EST


==> Regarding Re: netconsole hangs w/ alt-sysrq-t; Matt Mackall <mpm@xxxxxxxxxxx> adds:

mpm> On Thu, Apr 22, 2004 at 11:29:33AM -0400, Jeff Moyer wrote:
>> If netconsole is enabled, and you hit Alt-Sysrq-t, then it will print a
>> small amount of output to the console(s) and then hang the system. In
>> this case, I'm using the e100 driver, and we end up exhausting the
>> available cbs. Since we are in interrupt context, the driver's poll
>> routine is never run, and we loop infinitely waiting for resources to
>> free up that never will. Kernel version is 2.6.5.

mpm> Can you try 2.6.6-rc2? It has a fix to congestion handling that should
mpm> address this.

Is the attached patch the change you are referring to? If so, I don't see
how this would fix the problem. I ended up deferring netpoll writes to
process context, which has been working fine for me. Have I missed
something?

-Jeff

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/04/13 14:07:53-04:00 mpm@xxxxxxxxxxx
# [PATCH] netpoll transmit busy bugfix
#
# Fix for handling of full transmit queue when netpoll trap is enabled.
#
# From Stelian Pop <stelian@xxxxxxxxxx>
#
# net/core/netpoll.c
# 2004/04/10 16:19:31-04:00 mpm@xxxxxxxxxxx +3 -9
# netpoll transmit busy bugfix
#
diff -Nru a/net/core/netpoll.c b/net/core/netpoll.c
--- a/net/core/netpoll.c Wed Apr 28 05:43:08 2004
+++ b/net/core/netpoll.c Wed Apr 28 05:43:08 2004
@@ -163,21 +163,15 @@
spin_lock(&np->dev->xmit_lock);
np->dev->xmit_lock_owner = smp_processor_id();

- if (netif_queue_stopped(np->dev)) {
- np->dev->xmit_lock_owner = -1;
- spin_unlock(&np->dev->xmit_lock);
-
- netpoll_poll(np);
- goto repeat;
- }
-
status = np->dev->hard_start_xmit(skb, np->dev);
np->dev->xmit_lock_owner = -1;
spin_unlock(&np->dev->xmit_lock);

/* transmit busy */
- if(status)
+ if(status) {
+ netpoll_poll(np);
goto repeat;
+ }
}

void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/