Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1od9zK-0008MX-Ip for mharc-grub-devel@gnu.org; Tue, 27 Sep 2022 08:47:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od9zI-0008Kc-Fv for grub-devel@gnu.org; Tue, 27 Sep 2022 08:47:00 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:36697) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1od9zG-0006yU-Jo for grub-devel@gnu.org; Tue, 27 Sep 2022 08:47:00 -0400 Received: by mail-pg1-x52a.google.com with SMTP id s206so9327265pgs.3 for ; Tue, 27 Sep 2022 05:46:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=31psIEw5hVm1iJTlePck1ubLd31ubYriATY7NLdo7yA=; b=SmXjK6BzfTORnQKFVzD0cEJhDvy3tWy6HAU4tx1ynXVTkQ9s2kY6FqExPU7UhGgY2Z ah1dbzNub2yMbAqB+wfH6EVGvG94Gsu8hVE460YYHkj9schBBTGg9Mxi37e0CS/096Ce 28N88uLHeZunXxvXxJb2eyQBosCZWtET33Shg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=31psIEw5hVm1iJTlePck1ubLd31ubYriATY7NLdo7yA=; b=YJKuLtw6g1EITAY3YpzuKjtVa9Hb3oIebriCulEOpZM1NzvTQfCqr5LogrCarjZHI6 YYn1MkdJmZhQn5NO/xQms20cP/4+k4cU4qDao/zd1kgyCaZxYsGzxQG3uNdRO8HzFzxf dfm3J1MzOxoJEFEJ2JFz1oajQsKkw88GByb0kGPa6Th1+T8loG0e6VG965qQseYjWbZB 0gzcnbrzHx3yHKDd5r7DFTWWdjs+rMW0wqFRDJZJY2jU6MB1FA5KLPt9AQsV7GIkOpS0 CZ4beikIbJh3ZnruBIMCEouZvpqLPjMqyO4wW4O6QkTjAH50Jx9Wx0XzVo+nvAkKGnN4 scbg== X-Gm-Message-State: ACrzQf12TR6xuk5dHnlk0bdgVGweClRgIixStyew9csqsO34P+vXN7kV DPcswFdp92F7cimkqK2LusgqQA== X-Google-Smtp-Source: AMsMyM6uyVBJoRBLIuuk8nw+lgKwVal1ekprAt+ICqPBvrTozgC27JU8dwtU+2MfOk0yeoH0c01riQ== X-Received: by 2002:a05:6a00:1a8d:b0:541:15a0:2cf7 with SMTP id e13-20020a056a001a8d00b0054115a02cf7mr29325248pfv.70.1664282816991; Tue, 27 Sep 2022 05:46:56 -0700 (PDT) Received: from localhost ([2001:4479:e300:5b00:81a4:b2e3:21d9:93c6]) by smtp.gmail.com with ESMTPSA id x15-20020a170902a38f00b0016dbe37cebdsm1382715pla.246.2022.09.27.05.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Sep 2022 05:46:56 -0700 (PDT) From: Daniel Axtens To: Patrick Steinhardt , Daniel Kiper Cc: grub-devel@gnu.org, droidbittin@gmail.com, glin@suse.com, heinrich.schuchardt@canonical.com, jim945@mail.ru, langner.marcel@myiq.de, marcan@marcan.st, zhangboyang.id@gmail.com Subject: Re: [PATCH] efi: Increase default memory allocation to 32MB In-Reply-To: References: <20220919143030.355141-1-dja@axtens.net> <20220922155934.7eyw2e6a3pgvmikv@tomti.i.net-space.pl> Date: Tue, 27 Sep 2022 22:46:53 +1000 Message-ID: <875yh9kmrm.fsf@dja-thinkpad.axtens.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=dja@axtens.net; helo=mail-pg1-x52a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2022 12:47:00 -0000 Patrick Steinhardt 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 >> >> Reviewed-by: Daniel Kiper >> >> 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;