From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: chuck.lever@oracle.com, linux@razik.name,
Pekka Enberg <penberg@kernel.org>,
linux-nfs <linux-nfs@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Boot regression caused by commit 6829a048
Date: Fri, 06 Jan 2012 18:16:41 -0500 [thread overview]
Message-ID: <1325891801.11799.5.camel@lade.trondhjem.org> (raw)
In-Reply-To: <1325892770.4847.1.camel@lappy>
On Sat, 2012-01-07 at 01:32 +0200, Sasha Levin wrote:
> On Fri, 2012-01-06 at 13:26 -0500, Trond Myklebust wrote:
> > On Fri, 2012-01-06 at 19:32 +0200, Sasha Levin wrote:
> > > Hi all,
> > >
> > > I've noticed a boot regression caused by commit 6829a048 ("NFS: Retry
> > > mounting NFSROOT") which has increased boot time by 95 seconds.
> > >
> > > The scenario is as follows:
> > > - A virtual guest running under the KVM tool.
> > > - Guest is using kernel automatic IP DHCP configuration ("ip=dhcp").
> > > - Guest is booting from a 9p device (which is not detected as block,
> > > and gets mounted after NFS tries to do its mounts).
> > > - No NFS server at all, no NFS parameters passed to the guest kernel.
> > >
> > > Under this scenario, theres an additional 95 second delay before NFS
> > > fails and tries to boot using 9p:
> > >
> > > [...]
> > > [ 6.505269] md: autorun ...
> > > [ 6.506954] md: ... autorun DONE.
> > > [ 101.522716] VFS: Unable to mount root fs via NFS, trying floppy.
> > > [ 101.534499] VFS: Mounted root (9p filesystem) on device 0:18.
> > > [...]
> >
> > Can't you avoid the whole NFS root mount attempt by setting "root=2:0"
> > directly instead of relying on 'mount_root' to do it for you?
>
> I am specifying root and root parameters fully:
>
> "root=/dev/root rw rootflags=rw,trans=virtio,version=9p2000.L
> rootfstype=9p"
>
> Actually, I'm not sure why NFS comes to play at all in this case.
It's because mount_root() tests MAJOR(ROOT_DEV) only when probing for
nfsroot. Since ROOT_DEV is initialised to 0, and root=/dev/root matches
nothing in name_to_dev_t(), then you end up matching the nfsroot test.
A simple fix would be either:
A) skip the root=/dev/root.
B) change mount_root to also test MINOR(ROOT_DEV), which should equal
255 if ROOT_DEV==Root_NFS
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
next prev parent reply other threads:[~2012-01-06 23:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-06 17:32 Boot regression caused by commit 6829a048 Sasha Levin
2012-01-06 18:26 ` Trond Myklebust
2012-01-06 23:32 ` Sasha Levin
2012-01-06 23:16 ` Trond Myklebust [this message]
2012-01-07 8:59 ` Sasha Levin
2012-01-06 18:29 ` Chuck Lever
2012-01-06 23:36 ` Sasha Levin
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=1325891801.11799.5.camel@lade.trondhjem.org \
--to=trond.myklebust@netapp.com \
--cc=chuck.lever@oracle.com \
--cc=levinsasha928@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=linux@razik.name \
--cc=penberg@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).