Skip to contentSkip to conversation

Slow loading and GRUB work after commit 938c3760b

DISCUSSION jim945 3 participants 7 messages Sep 10, 2022 – Sep 12, 2022

lore
Share & tools
lore

jim945

author
#0 lore raw

Hi,

I am compiling grubx64.efi with modulescpio exfat ext2 fat gzio iso9660 loopback lzopio newc normal ntfs part_gpt part_msdos probe read search tar test configfile echo xzio squash4 sfs memdisk

The prefix is stored in the sfs container.

After applying patch 938c3760b, the boot time before the menu appears reaches 15-20 minutes. The work is very slow.

And in Qemu this problem does not appear.

#1 lore raw

Hi

Quoted 10 lines · On 2022/9/10 14:33, jim945 via Grub-devel wrote:

Hi,

I am compiling grubx64.efi with modulescpio exfat ext2 fat gzio iso9660 loopback lzopio newc normal ntfs part_gpt part_msdos probe read search tar test configfile echo xzio squash4 sfs memdisk

The prefix is stored in the sfs container.

After applying patch 938c3760b, the boot time before the menu appears reaches 15-20 minutes. The work is very slow.

And in Qemu this problem does not appear.

I'm not sure if this can help, could you please test if swapping "case 0:" and "case 1:" at this position can reduce the problem? "https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/kern/mm.c?id=d9b4638c50b16d4722e66d334e2c1a674b4a45cc#n443"

It seems GRUB is likely to try freeing disk cache first before requesting new pages. Although I'm not sure, but I think swapping "case 0:" and "case 1:" may fix this problem.

Best Regards,
Zhang Boyang

author
#2 lore raw

10.09.2022 17:51, Zhang Boyang пишет:

Quoted 14 lines

Hi

Quoted 10 lines · On 2022/9/10 14:33, jim945 via Grub-devel wrote:

Hi,

I am compiling grubx64.efi with modulescpio exfat ext2 fat gzio iso9660 loopback lzopio newc normal ntfs part_gpt part_msdos probe read search tar test configfile echo xzio squash4 sfs memdisk

The prefix is stored in the sfs container.

After applying patch 938c3760b, the boot time before the menu appears reaches 15-20 minutes. The work is very slow.

And in Qemu this problem does not appear.

Quoted 7 lines

I'm not sure if this can help, could you please test if swapping "case 0:" and "case 1:" at this position can reduce the problem? "https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/kern/mm.c?id=d9b4638c50b16d4722e66d334e2c1a674b4a45cc#n443"

It seems GRUB is likely to try freeing disk cache first before requesting new pages. Although I'm not sure, but I think swapping "case 0:" and "case 1:" may fix this problem.

Best Regards,
Zhang Boyang

After swapping "case 0:" and "case 1:" works fine.

author
#3 lore raw

12.09.2022 14:29, jim945 пишет:

Quoted 28 lines

10.09.2022 17:51, Zhang Boyang пишет:

Quoted 14 lines

Hi

Quoted 10 lines · On 2022/9/10 14:33, jim945 via Grub-devel wrote:

Hi,

I am compiling grubx64.efi with modulescpio exfat ext2 fat gzio iso9660 loopback lzopio newc normal ntfs part_gpt part_msdos probe read search tar test configfile echo xzio squash4 sfs memdisk

The prefix is stored in the sfs container.

After applying patch 938c3760b, the boot time before the menu appears reaches 15-20 minutes. The work is very slow.

And in Qemu this problem does not appear.

Quoted 7 lines

I'm not sure if this can help, could you please test if swapping "case 0:" and "case 1:" at this position can reduce the problem? "https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/kern/mm.c?id=d9b4638c50b16d4722e66d334e2c1a674b4a45cc#n443"

It seems GRUB is likely to try freeing disk cache first before requesting new pages. Although I'm not sure, but I think swapping "case 0:" and "case 1:" may fix this problem.

Best Regards,
Zhang Boyang

After swapping "case 0:" and "case 1:" works fine.

#4 lore raw
In reply to jim945
Quoted 4 lines · On 2022/9/12 19:29, jim945 wrote:

After swapping "case 0:" and "case 1:" works fine.

Thanks for the information! I wrote a (better) patch based on the result.

Best Regards,
Zhang Boyang

#5 lore raw
In reply to jim945
Quoted 6 lines · On Sat, Sep 10, 2022 at 09:33:47AM +0300, jim945 via Grub-devel wrote:

Hi,

I am compiling grubx64.efi with modulescpio exfat ext2 fat gzio iso9660 loopback lzopio newc normal ntfs part_gpt part_msdos probe read search tar test configfile echo xzio squash4 sfs memdisk

Quoted 6 lines

The prefix is stored in the sfs container.

After applying patch 938c3760b, the boot time before the menu appears reaches 15-20 minutes. The work is very slow.

And in Qemu this problem does not appear.

Sounds a similar problem discussed in another thread.
https://lists.gnu.org/archive/html/grub-devel/2022-09/msg00005.html

Maybe you could try to increase DEFAULT_HEAP_SIZE to 0x2000000 or some other larger value and see if the loadiing time is improved or not.
https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/kern/efi/mm.c#n42

Gary Lin

author
#6 lore raw

12.09.2022 05:15, Gary Lin пишет:

Quoted 13 lines · On Sat, Sep 10, 2022 at 09:33:47AM +0300, jim945 via Grub-devel wrote:
Quoted 6 lines

Hi,

I am compiling grubx64.efi with modulescpio exfat ext2 fat gzio iso9660 loopback lzopio newc normal ntfs part_gpt part_msdos probe read search tar test configfile echo xzio squash4 sfs memdisk

Quoted 6 lines

The prefix is stored in the sfs container.

After applying patch 938c3760b, the boot time before the menu appears reaches 15-20 minutes. The work is very slow.

And in Qemu this problem does not appear.

Quoted 8 lines

Sounds a similar problem discussed in another thread.
https://lists.gnu.org/archive/html/grub-devel/2022-09/msg00005.html

Maybe you could try to increase DEFAULT_HEAP_SIZE to 0x2000000 or some other larger value and see if the loadiing time is improved or not.
https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/kern/efi/mm.c#n42

Gary Lin

This fix reduces the time before the menu appears to 8-10 minutes.

If important. The size grubx64.efi - 604K, prefix.sfs - 2M