Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Feb 2023 20:07:36 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 9fb276ea8001 - main - kboot: Trim initial allocation to 64MB
Message-ID:  <202302022007.312K7akx036070@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=9fb276ea800171b2065994b532931eb684777120

commit 9fb276ea800171b2065994b532931eb684777120
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-02-02 20:03:28 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-02-02 20:04:05 +0000

    kboot: Trim initial allocation to 64MB
    
    We only need 64MB to read off ZFS pools. Since Linux doesn't do
    ovecommit by default, the extra 64MB is 64MB less we can allocate for
    things like RAM disks.
    
    Sponsored by:           Netflix
    Reviewed by:            kevans, andrew
    Differential Revision:  https://reviews.freebsd.org/D38268
---
 stand/kboot/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/stand/kboot/main.c b/stand/kboot/main.c
index 52c135f78582..7144f081e4dd 100644
--- a/stand/kboot/main.c
+++ b/stand/kboot/main.c
@@ -151,7 +151,7 @@ int
 main(int argc, const char **argv)
 {
 	void *heapbase;
-	const size_t heapsize = 128*1024*1024;
+	const size_t heapsize = 64*1024*1024;
 	const char *bootdev;
 
 	archsw.arch_getdev = kboot_getdev;
@@ -167,7 +167,7 @@ main(int argc, const char **argv)
 	do_init();
 
 	/*
-	 * Setup the heap 15MB should be plenty
+	 * Setup the heap, 64MB is minimum for ZFS booting
 	 */
 	heapbase = host_getmem(heapsize);
 	setheap(heapbase, heapbase + heapsize);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302022007.312K7akx036070>