public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: Aaron Young <aaron.young@oracle.com>, devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH 1/1] MdeModulePkg: Optimize BmExpandPartitionDevicePath
Date: Thu, 12 Oct 2023 17:14:27 +0200	[thread overview]
Message-ID: <f673dab4-9465-2dfa-9cf2-c251a5ffd452@redhat.com> (raw)
In-Reply-To: <16085.1697045816285916965@groups.io>

On 10/11/23 19:36, Aaron Young wrote:
> 
>  Thanks for the comments, Laszlo.
> 
>  I could look into optimizing SetBootOrderFromQemu()->Match() by using
>  EfiBootManagerGetNextLoadOptionDevicePath() instead of
> EfiBootManagerGetLoadOptionBuffer().
>  Makes sense to me and at first glance seems like it would work. My main
> concern is some
>  unforeseen change in behavior that manifests in a regression somehow.
> Would require lots
>  of testing beyond what I am capable of doing.

Yes, this is exactly my concern as well.
EfiBootManagerGetLoadOptionBuffer() contains an internal loop around
EfiBootManagerGetNextLoadOptionDevicePath(), and some short form -->
long form expansions that succeed right now may depend on that loop. If
we just replace the current call to EfiBootManagerGetLoadOptionBuffer()
without repeating the same loop, we could regress things.

>  However, I'd prefer to do this as a separate task from this PR as it's
> not really
>  related, right? i.e. EfiBootManagerGetNextLoadOptionDevicePath() still
> ends up
>  calling ConnectAll. just making sure I understand.

Sure, this is totally unrelated. And, it's not a functional issue, just
an opportunity for some slight optimization (at the risk of a functional
regression, of course). So definitely don't get into it without proper
time allocation.

That's why I'm not doing it myself either! I just thought that you might
be able to consider it, given that you're looking at
BmExpandPartitionDevicePath() already. But, certainly feel free to
ignore it.

Basically I wish UefiBootManagerLib offered an interface that did *all*
of what EfiBootManagerGetLoadOptionBuffer() does, except loading the
file contents. But extending UefiBootManagerLib with new interfaces is
difficult.

> 
>  Also, I can look into amending the PR commit to add the call chain for
> ConnectDevicesFromQemu
>  that you menioned above.

That would be welcome.

Thanks!
Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109575): https://edk2.groups.io/g/devel/message/109575
Mute This Topic: https://groups.io/mt/101876973/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-10-12 15:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 15:06 [edk2-devel] [PATCH 1/1] MdeModulePkg: Optimize BmExpandPartitionDevicePath Aaron Young
2023-10-10 16:38 ` Laszlo Ersek
2023-10-11 17:36   ` Aaron Young via groups.io
2023-10-12 15:14     ` Laszlo Ersek [this message]
2023-10-24  2:18 ` Gao, Zhichao
2023-10-24 12:29   ` Laszlo Ersek
2023-10-24 13:15     ` Laszlo Ersek

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=f673dab4-9465-2dfa-9cf2-c251a5ffd452@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