All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] efi: Increase default memory allocation to 32MB
@ 2022-09-19 14:30 Daniel Axtens
  2022-09-22 15:59 ` Daniel Kiper
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Axtens @ 2022-09-19 14:30 UTC (permalink / raw)
  To: grub-devel; +Cc: Daniel Axtens

We have multiple reports of things being slower with a 1MB initial static
allocation, and a report (more difficult to nail down) of a boot failure
as a result of the smaller initial allocation.

Make the initial memory allocation 32MB.

Signed-off-by: Daniel Axtens <dja@axtens.net>
---
 grub-core/kern/efi/mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
index d290c9a76270..3705b8b1b465 100644
--- a/grub-core/kern/efi/mm.c
+++ b/grub-core/kern/efi/mm.c
@@ -39,7 +39,7 @@
 #define MEMORY_MAP_SIZE	0x3000
 
 /* The default heap size for GRUB itself in bytes.  */
-#define DEFAULT_HEAP_SIZE	0x100000
+#define DEFAULT_HEAP_SIZE	0x2000000
 
 static void *finish_mmap_buf = 0;
 static grub_efi_uintn_t finish_mmap_size = 0;
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] efi: Increase default memory allocation to 32MB
  2022-09-19 14:30 [PATCH] efi: Increase default memory allocation to 32MB Daniel Axtens
@ 2022-09-22 15:59 ` Daniel Kiper
  2022-09-25 14:03   ` Patrick Steinhardt
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Kiper @ 2022-09-22 15:59 UTC (permalink / raw)
  To: Daniel Axtens
  Cc: grub-devel, droidbittin, glin, heinrich.schuchardt, jim945,
	langner.marcel, marcan, ps, zhangboyang.id

Adding some folks who may be interested in this thing too...

On Tue, Sep 20, 2022 at 12:30:30AM +1000, Daniel Axtens wrote:
> We have multiple reports of things being slower with a 1MB initial static
> allocation, and a report (more difficult to nail down) of a boot failure
> as a result of the smaller initial allocation.
>
> Make the initial memory allocation 32MB.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

However, I think we should consider [1] patch set too. I will be
looking at it in the following days.

Daniel

[1] https://lists.gnu.org/archive/html/grub-devel/2022-09/msg00080.html

> ---
>  grub-core/kern/efi/mm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
> index d290c9a76270..3705b8b1b465 100644
> --- a/grub-core/kern/efi/mm.c
> +++ b/grub-core/kern/efi/mm.c
> @@ -39,7 +39,7 @@
>  #define MEMORY_MAP_SIZE	0x3000
>
>  /* The default heap size for GRUB itself in bytes.  */
> -#define DEFAULT_HEAP_SIZE	0x100000
> +#define DEFAULT_HEAP_SIZE	0x2000000
>
>  static void *finish_mmap_buf = 0;
>  static grub_efi_uintn_t finish_mmap_size = 0;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] efi: Increase default memory allocation to 32MB
  2022-09-22 15:59 ` Daniel Kiper
@ 2022-09-25 14:03   ` Patrick Steinhardt
  2022-09-27 12:46     ` Daniel Axtens
  0 siblings, 1 reply; 4+ messages in thread
From: Patrick Steinhardt @ 2022-09-25 14:03 UTC (permalink / raw)
  To: Daniel Kiper
  Cc: Daniel Axtens, grub-devel, droidbittin, glin,
	heinrich.schuchardt, jim945, langner.marcel, marcan,
	zhangboyang.id

[-- Attachment #1: Type: text/plain, Size: 1698 bytes --]

On Thu, Sep 22, 2022 at 05:59:34PM +0200, Daniel Kiper wrote:
> Adding some folks who may be interested in this thing too...
> 
> On Tue, Sep 20, 2022 at 12:30:30AM +1000, Daniel Axtens wrote:
> > We have multiple reports of things being slower with a 1MB initial static
> > allocation, and a report (more difficult to nail down) of a boot failure
> > as a result of the smaller initial allocation.
> >
> > Make the initial memory allocation 32MB.
> >
> > Signed-off-by: Daniel Axtens <dja@axtens.net>
> 
> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
> 
> However, I think we should consider [1] patch set too. I will be
> looking at it in the following days.
> 
> Daniel
> 
> [1] https://lists.gnu.org/archive/html/grub-devel/2022-09/msg00080.html

Agreed, we should definitely merge some form of fixes to improve the
page request patterns. I'm also happy with bumping the default heap size
in addition.

Out of curiosity: do we have any kind of minimum system requirements
documented somewhere that would allow us to come up with a default heap
size?

Patrick

> 
> > ---
> >  grub-core/kern/efi/mm.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
> > index d290c9a76270..3705b8b1b465 100644
> > --- a/grub-core/kern/efi/mm.c
> > +++ b/grub-core/kern/efi/mm.c
> > @@ -39,7 +39,7 @@
> >  #define MEMORY_MAP_SIZE	0x3000
> >
> >  /* The default heap size for GRUB itself in bytes.  */
> > -#define DEFAULT_HEAP_SIZE	0x100000
> > +#define DEFAULT_HEAP_SIZE	0x2000000
> >
> >  static void *finish_mmap_buf = 0;
> >  static grub_efi_uintn_t finish_mmap_size = 0;

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] efi: Increase default memory allocation to 32MB
  2022-09-25 14:03   ` Patrick Steinhardt
@ 2022-09-27 12:46     ` Daniel Axtens
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Axtens @ 2022-09-27 12:46 UTC (permalink / raw)
  To: Patrick Steinhardt, Daniel Kiper
  Cc: grub-devel, droidbittin, glin, heinrich.schuchardt, jim945,
	langner.marcel, marcan, zhangboyang.id

Patrick Steinhardt <ps@pks.im> writes:

> On Thu, Sep 22, 2022 at 05:59:34PM +0200, Daniel Kiper wrote:
>> Adding some folks who may be interested in this thing too...
>> 
>> On Tue, Sep 20, 2022 at 12:30:30AM +1000, Daniel Axtens wrote:
>> > We have multiple reports of things being slower with a 1MB initial static
>> > allocation, and a report (more difficult to nail down) of a boot failure
>> > as a result of the smaller initial allocation.
>> >
>> > Make the initial memory allocation 32MB.
>> >
>> > Signed-off-by: Daniel Axtens <dja@axtens.net>
>> 
>> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
>> 
>> However, I think we should consider [1] patch set too. I will be
>> looking at it in the following days.
>> 
>> Daniel
>> 
>> [1] https://lists.gnu.org/archive/html/grub-devel/2022-09/msg00080.html
>
> Agreed, we should definitely merge some form of fixes to improve the
> page request patterns. I'm also happy with bumping the default heap size
> in addition.

Agreed also.
>
> Out of curiosity: do we have any kind of minimum system requirements
> documented somewhere that would allow us to come up with a default heap
> size?
>
Heh. That'd be nice, and I think valuable, but my experience trying to
drop HFS suggests that it might be very controversial.

Kind regards,
Daniel
> Patrick
>
>> 
>> > ---
>> >  grub-core/kern/efi/mm.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
>> > index d290c9a76270..3705b8b1b465 100644
>> > --- a/grub-core/kern/efi/mm.c
>> > +++ b/grub-core/kern/efi/mm.c
>> > @@ -39,7 +39,7 @@
>> >  #define MEMORY_MAP_SIZE	0x3000
>> >
>> >  /* The default heap size for GRUB itself in bytes.  */
>> > -#define DEFAULT_HEAP_SIZE	0x100000
>> > +#define DEFAULT_HEAP_SIZE	0x2000000
>> >
>> >  static void *finish_mmap_buf = 0;
>> >  static grub_efi_uintn_t finish_mmap_size = 0;


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-27 12:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19 14:30 [PATCH] efi: Increase default memory allocation to 32MB Daniel Axtens
2022-09-22 15:59 ` Daniel Kiper
2022-09-25 14:03   ` Patrick Steinhardt
2022-09-27 12:46     ` Daniel Axtens

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.