Date: Thu, 04 Apr 2013 19:16:32 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org> Cc: Bjorn Larsson <bjwela@gmail.com>, freebsd-current@FreeBSD.org, Sergey Dyatko <sergey.dyatko@gmail.com> Subject: Re: gptzfsboot problem on HP P410i Smart Array Message-ID: <515DA760.8000101@FreeBSD.org> In-Reply-To: <201303191220.34088.jhb@freebsd.org> References: <CAAG5QCs0G1ztH715j5pnsFmne30xZwUT5o_YkQW9k1dDc-=-Nw@mail.gmail.com> <CAJ0WZYBQcujPbW%2BiZVkPMY=voGgHQnuVLLi=DKb%2BL-%2B1OW_Arw@mail.gmail.com> <51483621.2060503@FreeBSD.org> <201303191220.34088.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
on 19/03/2013 18:20 John Baldwin said the following: > Yes, we likely could start using that, we would just need to ensure it has some > sort of minimum size. However, maybe it would always have that minimum size as you > are only going to have additional ranges if you have more than 4GB of RAM anyway. > I think though that there were some odd BIOSes that would place a hole at 15-16MB, > and for those the memory region at 1MB is too small. A minimum size of 16MB might > handle that case correctly while using the first extended region in the common > case. How about something like this? Author: Andriy Gapon <avg@icyb.net.ua> Date: Wed Apr 3 11:48:34 2013 +0300 [test] zfsboot: bios_getmem prefer extmem over another random chunk of high memory If the extended memory region is sufficiently large. diff --git a/sys/boot/i386/zfsboot/zfsboot.c b/sys/boot/i386/zfsboot/zfsboot.c index 82402b6..12ceeb0 100644 --- a/sys/boot/i386/zfsboot/zfsboot.c +++ b/sys/boot/i386/zfsboot/zfsboot.c @@ -374,6 +374,16 @@ bios_getmem(void) } /* + * If extended memory is at least twice as large as the largest + * region of higher memory, then carve the high heap out of + * extended memory. + */ + if (bios_extmem > 2 * high_heap_size) { + high_heap_base = 0x100000 + bios_extmem / 2; + high_heap_size = bios_extmem / 2; + } + + /* * If we have extended memory and did not find a suitable heap * region in the SMAP, use the last 3MB of 'extended' memory as a * high heap candidate. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?515DA760.8000101>