From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH v2] netpoll: Introduce netpoll_carrier_timeout kernel option
Date: Wed, 8 Jul 2009 16:23:17 +0400 [thread overview]
Message-ID: <20090708122317.GA7837@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20090708105902.GB6000@hmsreliant.think-freely.org>
On Wed, Jul 08, 2009 at 06:59:02AM -0400, Neil Horman wrote:
[...]
> > diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> > index d77fbd8..9347f4a 100644
> > --- a/Documentation/kernel-parameters.txt
> > +++ b/Documentation/kernel-parameters.txt
> > @@ -1531,6 +1531,11 @@ and is between 256 and 4096 characters. It is defined in the file
> > symbolic names: lapic and ioapic
> > Example: nmi_watchdog=2 or nmi_watchdog=panic,lapic
> >
> > + netpoll.carrier_timeout=
> > + [NET] Specifies amount of time (in seconds) that
> > + netpoll should wait for a carrier. By default netpoll
> > + waits 4 seconds.
> > +
> I'm not sure the documentation still belongs in kernel-parameters.txt if you
> make this a module options, but thats just a nit.
There are other module options described in the
kernel-parameters.txt. Plus it's really a kernel parameter. ;-)
> >
> > +#include <linux/moduleparam.h>
> > #include <linux/netdevice.h>
> > #include <linux/etherdevice.h>
> > #include <linux/string.h>
> > @@ -50,6 +51,9 @@ static atomic_t trapped;
> > static void zap_completion_queue(void);
> > static void arp_reply(struct sk_buff *skb);
> >
> > +static unsigned int carrier_timeout = 4;
> > +module_param(carrier_timeout, uint, 0644);
> > +
> > static void queue_process(struct work_struct *work)
> > {
> > struct netpoll_info *npinfo =
> > @@ -732,7 +736,7 @@ int netpoll_setup(struct netpoll *np)
> > }
> >
> > atleast = jiffies + HZ/10;
> > - atmost = jiffies + 4*HZ;
> > + atmost = jiffies + carrier_timeout * HZ;
> > while (!netif_carrier_ok(ndev)) {
> > if (time_after(jiffies, atmost)) {
> > printk(KERN_NOTICE
> > --
> > 1.6.3.3
> >
> I don't mind this functionality at all, but I'm looking at the code, and I have
> a hard time understanding why we bring up an interface here at all. I get that
> we might want early netpoll access for netconsole or something like that, but
> looking at the console code I don't see where we buffer anything other than the
> standard dmesg log. I don't see much reason why we can't just let normal early
> interface initalization from an initramfs bring up an interface like it normally
> does.
The earlier you bring the interface up, the earlier you'll able
to catch kernel oopses. netconsole is quite useful when
you don't have serial ports. The same applies for KGDBoE --
you might want to start debugging the kernel as soon as possible.
Sure, netconsole starts at module_init(), but looking at my dmesg,
netconsole initialization starts closer to the top of the log, so
it'll catch > 60% of oopses, i.e. all oopses in subsystems
that are below net/ in drivers/Makefile.
Thanks,
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
next prev parent reply other threads:[~2009-07-08 12:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-08 1:00 [PATCH] netpoll: Introduce netpoll_carrier_timeout kernel option Anton Vorontsov
2009-07-08 1:03 ` Stephen Hemminger
2009-07-08 1:30 ` [PATCH v2] " Anton Vorontsov
2009-07-08 10:59 ` Neil Horman
2009-07-08 12:23 ` Anton Vorontsov [this message]
2009-07-08 18:11 ` David Miller
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=20090708122317.GA7837@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=shemminger@vyatta.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.