grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Re: [PATCH] disk: Prioritize OS disk devices over memdisk and pr


From: Michael Chang
Subject: Re: Re: Re: [PATCH] disk: Prioritize OS disk devices over memdisk and procfs
Date: Tue, 19 Mar 2024 17:34:01 +0800

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]