grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Chang via Grub-devel <grub-devel@gnu.org>
To: Daniel Kiper <dkiper@net-space.pl>
Cc: Michael Chang <mchang@suse.com>, grub-devel@gnu.org
Subject: Re: Re: Re: [PATCH] disk: Prioritize OS disk devices over memdisk and procfs
Date: Tue, 19 Mar 2024 17:34:01 +0800	[thread overview]
Message-ID: <rs62rtor5eqvz474ox4ljgqjvwfmnny4dmo43b66jc5pd2y7ul@i4j7x4okpcea> (raw)
In-Reply-To: <20240318113437.2wayjxsfesiddj25@tomti.i.net-space.pl>

On Mon, Mar 18, 2024 at 12:34:37PM +0100, Daniel Kiper wrote:
> On Mon, Mar 18, 2024 at 02:21:36PM +0800, Michael Chang wrote:
> > On Fri, Mar 15, 2024 at 04:09:02PM +0100, Daniel Kiper wrote:
> > > On Fri, Mar 15, 2024 at 05:00:28PM +0800, Michael Chang via Grub-devel wrote:
> > > > Refine iteration to prioritize returning system disk devices over
> > > > memdisk and procfs. This adjustment brings about a modest improvement in
> > > > search efficiency, particularly during file or UUID-based
> > > > searches for a root file system. Additionally, it helps mitigate
> > > > potential collisions in file-based searches where memdisk may mistakenly
> > > > take precedence over system disks.
> > >
> > > It seems to me you could do this without adding additional loops. If it
> > > is not possible the change begs for comment.
> >
> > Thanks for review. The added loop for proc and memdisk in the final
> > output is required for the `ls' to output list of all devices. I'll add
> > this to the comment and send v2 patch.
> 
> I understand that. However, by adding two ifs and two variables or so
> you would be able to avoid two additional loops. And I would really
> prefer that...

The intention behind using two loops is to facilitate two separate
rounds of disk pull. The first round specifically targets system disks,
helping to exclude undesired factors such as memdisk or procfs in
between totally. In my opinion, this sequential approach appears to
offer advantages over a single loop where all disk types are mixed
together in one type of pull.

Thanks,
Michael

> 
> Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

      reply	other threads:[~2024-03-19  9:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15  9:00 [PATCH] disk: Prioritize OS disk devices over memdisk and procfs Michael Chang via Grub-devel
2024-03-15 15:09 ` Daniel Kiper
2024-03-18  6:21   ` Michael Chang via Grub-devel
2024-03-18 11:34     ` Daniel Kiper
2024-03-19  9:34       ` Michael Chang via Grub-devel [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-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=rs62rtor5eqvz474ox4ljgqjvwfmnny4dmo43b66jc5pd2y7ul@i4j7x4okpcea \
    --to=grub-devel@gnu.org \
    --cc=dkiper@net-space.pl \
    --cc=mchang@suse.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).