All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Daniel Kiper <dkiper@net-space.pl>
Cc: Daniel Kiper <daniel.kiper@oracle.com>,
	 Vladimir phcoder Serbinenko <phcoder@gmail.com>,
	 grub-devel <grub-devel@gnu.org>,
	Paul Menzel <pmenzel@molgen.mpg.de>,
	 Robbie Harwood <rharwood@redhat.com>,
	 samuel thibault <samuel.thibault@ens-lyon.org>
Subject: Re: [PATCH v3] grub-mkconfig linux: Fix quadratic algorithm for sorting menu items
Date: Fri, 20 May 2022 10:33:19 -0400 (EDT)	[thread overview]
Message-ID: <698479817.63912.1653057199221.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20220520110106.dwnarpdvvgwmgv5u@tomti.i.net-space.pl>

----- On May 20, 2022, at 7:01 AM, Daniel Kiper dkiper@net-space.pl wrote:

> On Thu, May 19, 2022 at 04:52:54PM -0400, Mathieu Desnoyers wrote:
>> ----- On May 19, 2022, at 2:36 PM, Daniel Kiper dkiper@net-space.pl wrote:
>> [...]
>> >
>> > Could you do the same in util/grub.d/20_linux_xen.in? Both should be
>> > kept in sync. And you are not first one who updates 10_linux.in only.
>> > If you could make a patch which adds something like "Keep logic in sync
>> > with..." to the util/grub.d/10_linux.in and util/grub.d/20_linux_xen.in
>> > that would be perfect.
>>
>> AFAIU, 20_linux_xen.in does:
>>
>> while [ "x${xen_list}" != "x" ] ; do
>>     list="${linux_list}"
>>     current_xen=`version_find_latest $xen_list`
>>     [....]
>>     while [ "x$list" != "x" ] ; do
>>         linux=`version_find_latest $list`
>>         [...]
>>         list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
>>     done
>>     if [ x"$is_top_level" != xtrue ]; then
>>         echo '  }'
>>     fi
>>     xen_list=`echo $xen_list | tr ' ' '\n' | fgrep -vx "$current_xen" | tr '\n' ' '`
>> done
>>
>> Which adds yet another loop iterating on each item of "xen_list". For each of
>> those,
>> there is an iteration on "linux_list".
>>
>> I can do the change, like I can do the change for other OSes, but I don't have
>> the environment to test those changes. Would you be OK if I submit an untested
>> patch for someone else to try out ?
> 
> In case of Xen I think you can CC xen-devel@lists.xenproject.org and ask
> for help there.

I'll do that.

> 
>> I notice that 10_hurd.in and 10_kfreebsd.in also have the exact same inefficient
>> pattern.
> 
> I think Samuel, CC-ed, could help with Hurd. Samuel? Just CC him when
> you send next patch.

Will do.

> 
> I am not sure who could help with FreeBSD.

I'll try debian-bsd@lists.debian.org

> 
>> Would you be OK if I also change them and let the change be tested by those who
>> have
>> those environments ?
> 
> Yeah, it is OK.
> 
> FYI, I am going to push at the beginning of next week Oskari's patch
> which updates both util/grub.d/10_linux.in and util/grub.d/20_linux_xen.in.
> So, please hold on with posting your patches until then to avoid
> conflicts later.

Considering that I'll take some vacation starting end of next week, and
hoping we can get Tested-by tags on the other environment, I would prefer
to send another round of RFC patches today. I don't mind rebasing next week
to submit a final version.

By the way, after taking care of linux, linux_xen, hurd, and kfreebsd, I notice
that I can remove the helper functions version_find_latest(), version_test_gt(),
and version_test_numeric() from grub-mkconfig_lib.in as a cleanup patch. I'll
queue that as well unless anyone objects.

Thanks!

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


      reply	other threads:[~2022-05-20 14:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 14:24 [PATCH v3] grub-mkconfig linux: Fix quadratic algorithm for sorting menu items Mathieu Desnoyers
2022-05-05 15:04 ` Robbie Harwood
2022-05-05 23:02 ` Oskari Pirhonen
2022-05-19 20:29   ` Mathieu Desnoyers
2022-05-19 18:36 ` Daniel Kiper
2022-05-19 20:52   ` Mathieu Desnoyers
2022-05-20  5:00     ` Oskari Pirhonen
2022-05-20 11:01     ` Daniel Kiper
2022-05-20 14:33       ` Mathieu Desnoyers [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=698479817.63912.1653057199221.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=daniel.kiper@oracle.com \
    --cc=dkiper@net-space.pl \
    --cc=grub-devel@gnu.org \
    --cc=phcoder@gmail.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=rharwood@redhat.com \
    --cc=samuel.thibault@ens-lyon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.