Date: Sun, 26 May 2024 09:29:08 +0200 From: =?UTF-8?Q?Bojan_Novkovi=C4=87?= <bnovkov@freebsd.org> To: Ryan Libby <rlibby@freebsd.org>, Nuno Teixeira <eduardo@freebsd.org> Cc: Tomoaki AOKI <junchoon@dec.sakura.ne.jp>, FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: main cadd2ca217 doesn't boot Message-ID: <2450aa9c-7c4d-467e-9156-f5bfefc8cce0@freebsd.org> In-Reply-To: <CAHgpiFx%2B%2B6K=dqt7Uzqr%2BqN4htF9v2irNy%2BvDW=FvDMJFh7pTA@mail.gmail.com> References: <CAFDf7ULsNvfmxwAunE1AzqjoCt2o=XSnzVbkMu3G4StiYU_0FA@mail.gmail.com> <20240526094658.eb49ee3046a7ea21c9329d60@dec.sakura.ne.jp> <CAHgpiFx%2B%2B6K=dqt7Uzqr%2BqN4htF9v2irNy%2BvDW=FvDMJFh7pTA@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] Hi, da76d349b6b1 replaced a UMA-related symbol but missed three instances where the old one was used, ultimately causing the wrong UMA page allocator to get selected and crashing the machine. I tested this patch as a part of a bigger series where it works fine, so this slipped through cracks without getting noticed. I've attached a patch with a fix, I can boot an amd64 VM with it applied. Could you please give it a try and let me know if it fixes the issue? Bojan [-- Attachment #2 --] diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 59066eb96ae9..516ac2c2965a 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -2523,7 +2523,7 @@ keg_ctor(void *mem, int size, void *udata, int flags) * If we haven't booted yet we need allocations to go through the * startup cache until the vm is ready. */ -#ifdef UMA_MD_SMALL_ALLOC +#ifdef UMA_USE_DMAP if (keg->uk_ppera == 1) keg->uk_allocf = uma_small_alloc; else @@ -2536,7 +2536,7 @@ keg_ctor(void *mem, int size, void *udata, int flags) keg->uk_allocf = contig_alloc; else keg->uk_allocf = page_alloc; -#ifdef UMA_MD_SMALL_ALLOC +#ifdef UMA_USE_DMAP if (keg->uk_ppera == 1) keg->uk_freef = uma_small_free; else @@ -5221,7 +5221,7 @@ uma_zone_reserve_kva(uma_zone_t zone, int count) keg->uk_kva = kva; keg->uk_offset = 0; zone->uz_max_items = pages * keg->uk_ipers; -#ifdef UMA_MD_SMALL_ALLOC +#ifdef UMA_USE_DMAP keg->uk_allocf = (keg->uk_ppera > 1) ? noobj_alloc : uma_small_alloc; #else keg->uk_allocf = noobj_alloc;help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2450aa9c-7c4d-467e-9156-f5bfefc8cce0>
