From: Ingo Molnar <mingo@elte.hu>
To: Andi Kleen <ak@suse.de>
Cc: Matt Mackall <mpm@selenic.com>,
Steven Rostedt <rostedt@goodmis.org>,
Andrew Morton <akpm@osdl.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
John B?ckstrand <sandos@home.se>,
davem@davemloft.net
Subject: Re: [PATCH] netpoll can lock up on low memory.
Date: Sat, 6 Aug 2005 09:45:03 +0200 [thread overview]
Message-ID: <20050806074503.GA5914@elte.hu> (raw)
In-Reply-To: <20050805212610.GA8266@wotan.suse.de>
* Andi Kleen <ak@suse.de> wrote:
> On Fri, Aug 05, 2005 at 01:01:57PM -0700, Matt Mackall wrote:
> > The netpoll philosophy is to assume that its traffic is an absolute
> > priority - it is better to potentially hang trying to deliver a panic
> > message than to give up and crash silently.
>
> That would be ok if netpoll was only used to deliver panics. But it is
> not. It delivers all messages, and you cannot hang the kernel during
> that. Actually even for panics it is wrong, because often it is more
> important to reboot in a panic than (with a panic timeout) to actually
> deliver the panic. That's needed e.g. in a failover cluster.
without going into the merits of this discussion, reliable failover
clusters must include (and do include) an external ability to cut power.
No amount of in-kernel logic will prevent the kernel from hanging, given
a bad enough kernel bug.
So the right question is not 'can we prevent the kernel from hanging,
ever' (we cannot), but 'which change makes it less likely for the kernel
to hang'. (and, obviously: assuming all other kernel components are
functioning per specification, netpoll itself most not hang :-)
even a plain printk to VGA can hang in certain kernel crashes. Netpoll
is more complex and thus has more exposure to hangs. E.g. netpoll relies
on the network driver to correctly recycle skbs within a bound amount of
time. If the network driver leaks skbs, it's game over for netpoll.
[ i'd prefer a hang over nondeterministic behavior, and e.g. losing
console messages is sure nondeterministic behavior. What if the
console message is "WARNING: the box has just been broken into"? ]
we could do one thing (see the patch below): i think it would be useful
to fill up the netlogging skb queue straight at initialization time.
Especially if netpoll is used for dumping alone, the system might not be
in a situation to fill up the queue at the point of crash, so better be
a bit more prepared and keep the pipeline filled.
Ingo
Signed-off-by: Ingo Molnar <mingo@elte.hu>
--- net/core/netpoll.c.orig
+++ net/core/netpoll.c
@@ -720,6 +720,8 @@ int netpoll_setup(struct netpoll *np)
}
/* last thing to do is link it to the net device structure */
ndev->npinfo = npinfo;
+ /* fill up the skb queue */
+ refill_skbs();
return 0;
next prev parent reply other threads:[~2005-08-06 7:44 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <42F347D2.7000207@home.se.suse.lists.linux.kernel>
2005-08-05 11:45 ` lockups with netconsole on e1000 on media insertion Andi Kleen
2005-08-05 12:44 ` John Bäckstrand
2005-08-05 13:49 ` Steven Rostedt
2005-08-05 13:55 ` Andi Kleen
2005-08-05 14:10 ` Steven Rostedt
2005-08-05 14:14 ` Andi Kleen
2005-08-05 14:27 ` Steven Rostedt
2005-08-05 14:36 ` David S. Miller
2005-08-05 15:02 ` Steven Rostedt
2005-08-05 14:36 ` [PATCH] netpoll can lock up on low memory Steven Rostedt
2005-08-05 20:01 ` Matt Mackall
2005-08-05 20:57 ` Steven Rostedt
2005-08-05 21:28 ` Matt Mackall
2005-08-06 0:23 ` Steven Rostedt
2005-08-06 1:53 ` Matt Mackall
2005-08-06 2:32 ` Steven Rostedt
2005-08-06 7:30 ` Daniel Phillips
2005-08-06 7:58 ` Ingo Molnar
2005-08-06 23:10 ` Matt Mackall
2005-08-06 9:46 ` David S. Miller
2005-08-06 9:57 ` Steven Rostedt
2005-08-06 12:09 ` John Bäckstrand
2005-08-07 5:40 ` Matt Mackall
2005-08-05 21:26 ` Andi Kleen
2005-08-05 21:42 ` Matt Mackall
2005-08-05 21:51 ` Andi Kleen
2005-08-06 1:16 ` Matt Mackall
2005-08-06 0:30 ` Steven Rostedt
2005-08-06 7:45 ` Ingo Molnar [this message]
2005-08-06 11:29 ` Andi Kleen
2005-08-07 21:12 ` lockups with netconsole on e1000 on media insertion John Bäckstrand
2005-08-08 2:29 ` Steven Rostedt
2005-08-05 20:12 ` Matt Mackall
2005-08-05 21:56 ` Andi Kleen
2005-08-05 23:20 ` Matt Mackall
2005-08-05 23:51 ` Andi Kleen
2005-08-06 1:22 ` Matt Mackall
2005-08-06 1:37 ` Daniel Phillips
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050806074503.GA5914@elte.hu \
--to=mingo@elte.hu \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sandos@home.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox