All of lore.kernel.org
 help / color / mirror / Atom feed
* Commit "ipconfig wait for carrier" makes boot hang for 2 mins if no carrier
@ 2012-09-04 14:41 Joakim Tjernlund
  2012-09-04 16:09 ` Micha Nelissen
  2012-09-04 18:04 ` Joakim Tjernlund
  0 siblings, 2 replies; 9+ messages in thread
From: Joakim Tjernlund @ 2012-09-04 14:41 UTC (permalink / raw)
  To: netdev, Micha Nelissen


Above mentioned commit(3fb72f1e6e6165c5f495e8dc11c5bbd14c73385c) changes
a ~1 sec delay to ~120 sec boot delay if no carrier. This is a really
long time to wait if you just want to set an IP address but doesn't
care about NFS root, holds up the boot with 2 minutes.

 Jocke

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

* Re: Commit "ipconfig wait for carrier" makes boot hang for 2 mins if no carrier
  2012-09-04 14:41 Commit "ipconfig wait for carrier" makes boot hang for 2 mins if no carrier Joakim Tjernlund
@ 2012-09-04 16:09 ` Micha Nelissen
  2012-09-04 18:04 ` Joakim Tjernlund
  1 sibling, 0 replies; 9+ messages in thread
From: Micha Nelissen @ 2012-09-04 16:09 UTC (permalink / raw)
  To: Joakim Tjernlund; +Cc: netdev

Op 2012-09-04 16:41, Joakim Tjernlund schreef:
> Above mentioned commit(3fb72f1e6e6165c5f495e8dc11c5bbd14c73385c) changes
> a ~1 sec delay to ~120 sec boot delay if no carrier. This is a really
> long time to wait if you just want to set an IP address but doesn't
> care about NFS root, holds up the boot with 2 minutes.

Why not set the IP address then in your rootfs yourself?

Micha

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

* Re: Commit "ipconfig wait for carrier" makes boot hang for 2 mins if no carrier
  2012-09-04 14:41 Commit "ipconfig wait for carrier" makes boot hang for 2 mins if no carrier Joakim Tjernlund
  2012-09-04 16:09 ` Micha Nelissen
@ 2012-09-04 18:04 ` Joakim Tjernlund
  2012-09-04 19:33   ` Micha Nelissen
  1 sibling, 1 reply; 9+ messages in thread
From: Joakim Tjernlund @ 2012-09-04 18:04 UTC (permalink / raw)
  To: Micha Nelissen; +Cc: netdev

-----Micha Nelissen <micha@neli.hopto.org> wrote: -----
> 
> Op 2012-09-04 16:41, Joakim Tjernlund schreef: > Above mentioned
> commit(3fb72f1e6e6165c5f495e8dc11c5bbd14c73385c) changes
> a ~1 sec delay to ~120 sec boot delay
> if no carrier. This is a really
> long time to wait if you just want to set an IP address but
> doesn't
> care about NFS root, holds up the boot with 2 minutes.
>
>  Why not set the IP address then in your rootfs yourself?  Micha 

I could ask you the same question, why do you need to have nfs in kernel?
The answer is probably the same, it is much easier to
manage our IP config in one place for our embedded system.

I don't understand why you need 2 minutes timeout for carrier either?

The wait should be conditional on NFS root or not so that non NFS roots
can skip this stage altogether.

 Jocke 

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

* Re: Commit "ipconfig wait for carrier" makes boot hang for 2 mins if no  carrier
  2012-09-04 18:04 ` Joakim Tjernlund
@ 2012-09-04 19:33   ` Micha Nelissen
  2012-09-05  7:04     ` Joakim Tjernlund
  0 siblings, 1 reply; 9+ messages in thread
From: Micha Nelissen @ 2012-09-04 19:33 UTC (permalink / raw)
  To: Joakim Tjernlund; +Cc: netdev

Joakim Tjernlund wrote:
>>  Why not set the IP address then in your rootfs yourself?  Micha 
> 
> I could ask you the same question, why do you need to have nfs in kernel?

Because that's where my root filesystem is? The IP autoconfiguration
code exists for this purpose.

> The answer is probably the same, it is much easier to
> manage our IP config in one place for our embedded system.

You retrieve the kernel via TFTP or so when booting?

> I don't understand why you need 2 minutes timeout for carrier either?

Just a safe value.

> The wait should be conditional on NFS root or not so that non NFS roots
> can skip this stage altogether.

Feel free to submit a patch :-)

Micha

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

* Re: Commit "ipconfig wait for carrier" makes boot hang for 2 mins if no carrier
  2012-09-04 19:33   ` Micha Nelissen
@ 2012-09-05  7:04     ` Joakim Tjernlund
  2012-09-05  8:30       ` Micha Nelissen
  0 siblings, 1 reply; 9+ messages in thread
From: Joakim Tjernlund @ 2012-09-05  7:04 UTC (permalink / raw)
  To: Micha Nelissen; +Cc: netdev

Micha Nelissen <micha@neli.hopto.org> wrote on 2012/09/04 21:33:37:
>
> Joakim Tjernlund wrote:
> >>  Why not set the IP address then in your rootfs yourself?  Micha
> >
> > I could ask you the same question, why do you need to have nfs in kernel?
>
> Because that's where my root filesystem is? The IP autoconfiguration
> code exists for this purpose.

This is not the only purpose.

>
> > The answer is probably the same, it is much easier to
> > manage our IP config in one place for our embedded system.
>
> You retrieve the kernel via TFTP or so when booting?

Yes, but mostly not. This really doesn't matter

>
> > I don't understand why you need 2 minutes timeout for carrier either?
>
> Just a safe value.
>
> > The wait should be conditional on NFS root or not so that non NFS roots
> > can skip this stage altogether.
>
> Feel free to submit a patch :-)

Your patch broke other use cases so my patch would just revert or change the tmo
to 2 secs or so.
Or you could clean up your stuff so it works for all and not just for you.

 Jocke

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

* Re: Commit "ipconfig wait for carrier" makes boot hang for 2 mins if no   carrier
  2012-09-05  7:04     ` Joakim Tjernlund
@ 2012-09-05  8:30       ` Micha Nelissen
  2012-09-05  8:47         ` Joakim Tjernlund
  0 siblings, 1 reply; 9+ messages in thread
From: Micha Nelissen @ 2012-09-05  8:30 UTC (permalink / raw)
  To: Joakim Tjernlund; +Cc: netdev

Op 2012-09-05 9:04, Joakim Tjernlund schreef:
>> Because that's where my root filesystem is? The IP autoconfiguration
>> code exists for this purpose.
>
> This is not the only purpose.

Documentation/filesystems/nfs/nfsroot.txt seems to suggest so (this is 
where the ip= parameter is documented), but it works independently indeed.

So explain your reasons?

>>> The answer is probably the same, it is much easier to
>>> manage our IP config in one place for our embedded system.
>>
>> You retrieve the kernel via TFTP or so when booting?
>
> Yes, but mostly not. This really doesn't matter

Seems to me that if you boot standalone there is no reason to let the IP 
address be configured by the kernel? Retrieve the IP address in user 
space from your bootloader environment or whatever. And if you boot from 
ethernet (or some other networking interface), then you have a carrier, 
and there is no 2 minute delay (maybe less even than before with this 
patch!).

>>> The wait should be conditional on NFS root or not so that non NFS roots
>>> can skip this stage altogether.
>
> Your patch broke other use cases so my patch would just revert or change the tmo
> to 2 secs or so.
> Or you could clean up your stuff so it works for all and not just for you.

It didn't break anything, it does work for you also, you just need to 
wait somewhat longer. Or make sure there is a carrier. The intent of the 
original 1 second delay was to let the link come up!

Micha

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

* Re: Commit "ipconfig wait for carrier" makes boot hang for 2 mins if no carrier
  2012-09-05  8:30       ` Micha Nelissen
@ 2012-09-05  8:47         ` Joakim Tjernlund
  2012-09-05 17:01           ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Joakim Tjernlund @ 2012-09-05  8:47 UTC (permalink / raw)
  To: Micha Nelissen; +Cc: netdev



Micha Nelissen <micha@neli.hopto.org> wrote on 2012/09/05 10:30:36:

> From: Micha Nelissen <micha@neli.hopto.org>
> To: Joakim Tjernlund <joakim.tjernlund@transmode.se>,
> Cc: netdev@vger.kernel.org
> Date: 2012/09/05 10:30
> Subject: Re: Commit "ipconfig wait for carrier" makes boot hang for 2 mins if no   carrier
>
> Op 2012-09-05 9:04, Joakim Tjernlund schreef:
> >> Because that's where my root filesystem is? The IP autoconfiguration
> >> code exists for this purpose.
> >
> > This is not the only purpose.
>
> Documentation/filesystems/nfs/nfsroot.txt seems to suggest so (this is
> where the ip= parameter is documented), but it works independently indeed.
>
> So explain your reasons?
If you read that doc you find:

ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>

  This parameter tells the kernel how to configure IP addresses of devices
  and also how to set up the IP routing table. It was originally called
  `nfsaddrs', but now the boot-time IP configuration works independently of
  NFS, so it was renamed to `ip' and the old name remained as an alias for
  compatibility reasons.

>
> >>> The answer is probably the same, it is much easier to
> >>> manage our IP config in one place for our embedded system.
> >>
> >> You retrieve the kernel via TFTP or so when booting?
> >
> > Yes, but mostly not. This really doesn't matter
>
> Seems to me that if you boot standalone there is no reason to let the IP
> address be configured by the kernel? Retrieve the IP address in user
> space from your bootloader environment or whatever. And if you boot from
> ethernet (or some other networking interface), then you have a carrier,
> and there is no 2 minute delay (maybe less even than before with this
> patch!).

Everything is possible but we choosed to use already built-in functionality, as
did you.
You could have added an initram FS and done your NFS mount there so this
argument goes nowhere.

>
> >>> The wait should be conditional on NFS root or not so that non NFS roots
> >>> can skip this stage altogether.
> >
> > Your patch broke other use cases so my patch would just revert or change the tmo
> > to 2 secs or so.
> > Or you could clean up your stuff so it works for all and not just for you.
>
> It didn't break anything, it does work for you also, you just need to
> wait somewhat longer. Or make sure there is a carrier. The intent of the
> original 1 second delay was to let the link come up!

Sure it did, our system(and not only ours I bet) can not accept a 2 minute delay in
booting up the system for no reason.

Please adjust the 2 min wait to nfsroot= only and keep the old way for ip=

 Jocke

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

* Re: Commit "ipconfig wait for carrier" makes boot hang for 2 mins if no carrier
  2012-09-05  8:47         ` Joakim Tjernlund
@ 2012-09-05 17:01           ` David Miller
  2012-09-05 21:41             ` Joakim Tjernlund
  0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2012-09-05 17:01 UTC (permalink / raw)
  To: joakim.tjernlund; +Cc: micha, netdev

From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Date: Wed, 5 Sep 2012 10:47:56 +0200

> Please adjust the 2 min wait to nfsroot= only and keep the old way for ip=

Sorry, this is not happening, I fully support the change in the tree
as-is and will not modify it in the way you request.

You'll have to accomodate this situation in some other local way.

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

* Re: Commit "ipconfig wait for carrier" makes boot hang for 2 mins if no carrier
  2012-09-05 17:01           ` David Miller
@ 2012-09-05 21:41             ` Joakim Tjernlund
  0 siblings, 0 replies; 9+ messages in thread
From: Joakim Tjernlund @ 2012-09-05 21:41 UTC (permalink / raw)
  To: David Miller; +Cc: micha, netdev

David Miller <davem@davemloft.net> wrote on 2012/09/05 19:01:58:
>
> From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
> Date: Wed, 5 Sep 2012 10:47:56 +0200
>
> > Please adjust the 2 min wait to nfsroot= only and keep the old way for ip=
>
> Sorry, this is not happening, I fully support the change in the tree
> as-is and will not modify it in the way you request.
>
> You'll have to accomodate this situation in some other local way.

I have fixed it locally, but I would like to know why you support the current way.
It adds a incredibly long delay for systems that doesn't need a carrier, they
just want an IP address defined for a particular I/F. I cannot see why
this change would be beneficial for all.

 Jocke

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

end of thread, other threads:[~2012-09-05 21:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-04 14:41 Commit "ipconfig wait for carrier" makes boot hang for 2 mins if no carrier Joakim Tjernlund
2012-09-04 16:09 ` Micha Nelissen
2012-09-04 18:04 ` Joakim Tjernlund
2012-09-04 19:33   ` Micha Nelissen
2012-09-05  7:04     ` Joakim Tjernlund
2012-09-05  8:30       ` Micha Nelissen
2012-09-05  8:47         ` Joakim Tjernlund
2012-09-05 17:01           ` David Miller
2012-09-05 21:41             ` Joakim Tjernlund

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.