From: Laszlo Ersek <lersek@redhat.com>
To: Wasim Khan <wasim.khan@nxp.com>, Pankaj Bansal <pankaj.bansal@nxp.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Udit Kumar <udit.kumar@nxp.com>
Subject: Re: Boot delay due to network devices
Date: Fri, 23 Mar 2018 15:02:14 +0100 [thread overview]
Message-ID: <011a56bd-b05d-9695-f898-7ecf537b6c01@redhat.com> (raw)
In-Reply-To: <HE1PR0401MB23467BC1183C8B0591BC464590A80@HE1PR0401MB2346.eurprd04.prod.outlook.com>
On 03/23/18 12:58, Wasim Khan wrote:
> Hi Laszlo,
>
> I want to re-discuss this thread with you.
>
> So as you mentioned that we can define a platform policy to connect
> to only intended devices (Say Network (PXE) and Removable Media
> devices).
>
> But when I say boot from Network devices, we have to scan all the
> devices as all devices are legal candidate for booting.
>
> Its only matter of setup that which network interfaces are currently
> connected via cable which can change from one setup to another setup.
> So interfaces which are not connected currently in some setup will
> waste time in auto-neg as driver's Start will be called for each
> interface instance before trying to boot starting from 1st boot
> option.
>
> Ex: if auto-neg timeout is 5 seconds and if we have 10 network
> interfaces (all are legal candidate for booting), and cable is
> connected to 3rd interface only then 45 seconds will be wasted (5
> seconds each for 9 interfaces) in auto-neg of interfaces which are
> not connected via cable.
>
> We want to save this time by skipping calling ConnectController
> before trying boot from available boot options starting from 1st boot
> option.
>
> Ex: if auto-neg timeout is 5 seconds and if we have 10 network
> interfaces (all are legal candidate for booting), and cable is
> connected to 3rd interface only, then 10 seconds will be wasted (in
> auto-neg of 1st and 2nd interface) and boot will success when boot
> from 3rd interfaces is tried. Now (in same/different setup) if I
> plug-in the cable to 1st interface, boot will success in 1st attempt
> and we will not waste any time.
>
> But as per the current implementation (PlatformBootManagerLib),
> ConnectController is called from BdsLib before trying to boot from a
> boot entry. Which looks logical to me because all ( or platform
> policy specific) drivers should be scanned to find new/update boot
> options and add their entries in BootOrder.
If you think that netboot should work (a) regardless of which NIC the
user connects to the network *and* (b) without requiring any interaction
from the user (in the firmware Setup utility), then you have to call
ConnectController() on all the possible NICs.
If at least one of (a) and (b) is permitted to be "false", then you can
call ConnectController() on the NICs selectively. You can have an HII
setup page (installed by a PlatformDxe driver, for example) that lists
ten checkboxes, one checkbox per NIC (hopefully with a label that is
visibly assignable to the physical ports). The checkbox states can be
stored in a shared non-volatile UEFI variable. You can consult that
variable in your PlatformBootManagerLib instance (generally starting
with the next boot), and only call ConnectController() on those NICs
that were selected. This can save boot time, but it also requires the
user to go into the Setup utility if they plug the cable into another port.
The management of Boot#### options is a separate step, as far as
PlatformBootManagerLib is concerned. It might make sense (in your
PlatformBootManagerLib instance) to remove the Boot#### options that
refer to NICs "foo" and "bar", if "foo" and "bar" are unchecked in your
UEFI variable. It also makes sense to call
EfiBootManagerRefreshAllBootOption() so that Boot#### options exist for
those NICs that you *did* connect.
As a reminder, some PlatformBootManagerLib instances don't even connect
various *console* devices (such as USB keyboards) in order to save boot
time, thus you can't even interrupt the fw boot process from the
keyboard. You have to use an OS facility to signal the firmware to enter
the Setup utility at the next boot.
This is just to show that there's a connection between firmware boot
time and boot (or even console) device selection by the user. The more
devices the user selects (or the more devices PlatformBootManagerLib
selects for the user), the longer the boot might take.
I apologize if I failed to clarify; I don't know what other comments I
could make.
Thanks
Laszlo
prev parent reply other threads:[~2018-03-23 13:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 9:23 Boot delay due to network devices Pankaj Bansal
2017-10-06 9:47 ` Laszlo Ersek
2017-10-06 11:07 ` Pankaj Bansal
2017-10-06 13:09 ` Laszlo Ersek
2018-03-23 11:58 ` Wasim Khan
2018-03-23 12:22 ` Michael Brown
2018-03-23 13:01 ` Wasim Khan
2018-03-23 14:28 ` Laszlo Ersek
2018-03-23 14:02 ` Laszlo Ersek [this message]
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-list 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=011a56bd-b05d-9695-f898-7ecf537b6c01@redhat.com \
--to=devel@edk2.groups.io \
/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