Skip to content

Commit

Permalink
Try reserving less ram...
Browse files Browse the repository at this point in the history
In 005a0aa, we switched from reserving
one quarter of the available free memory to three quarters.  Apparently
this has some unfortunate side-affects for some workloads, and has
negatively effected chainloading[0] as well as Fedora CoreOS[1].

This patch changes it to reserve /half/ of available memory, in hopes
that this is a working compromise.

[0] https://bugzilla.redhat.com/show_bug.cgi?id=2115202
[1] coreos/fedora-coreos-tracker#1271

Signed-off-by: Peter Jones <pjones@redhat.com>
  • Loading branch information
vathpela authored and frozencemetery committed Aug 8, 2022
1 parent 0837dcd commit 8739990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grub-core/kern/efi/mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ grub_efi_mm_init (void)
/* By default, request three quarters of the available memory. */
total_pages = get_total_pages (filtered_memory_map, desc_size,
filtered_memory_map_end);
required_pages = (total_pages >> 1) + (total_pages >> 2);
required_pages = (total_pages >> 1);
if (required_pages < BYTES_TO_PAGES (MIN_HEAP_SIZE))
required_pages = BYTES_TO_PAGES (MIN_HEAP_SIZE);
else if (required_pages > BYTES_TO_PAGES (MAX_HEAP_SIZE))
Expand Down

0 comments on commit 8739990

Please sign in to comment.