From owner-freebsd-current@FreeBSD.ORG Thu Apr 4 18:01:47 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 86E59243; Thu, 4 Apr 2013 18:01:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9E9205F7; Thu, 4 Apr 2013 18:01:46 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA12167; Thu, 04 Apr 2013 21:01:45 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <515DC008.9060108@FreeBSD.org> Date: Thu, 04 Apr 2013 21:01:44 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130313 Thunderbird/17.0.4 MIME-Version: 1.0 To: John Baldwin Subject: Re: gptzfsboot problem on HP P410i Smart Array References: <201303191220.34088.jhb@freebsd.org> <515DA760.8000101@FreeBSD.org> <201304041316.12617.jhb@freebsd.org> In-Reply-To: <201304041316.12617.jhb@freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Apr 2013 18:01:47 -0000 on 04/04/2013 20:16 John Baldwin said the following: > On Thursday, April 04, 2013 12:16:32 pm Andriy Gapon wrote: >> 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. >> > > We should really use the same algorithm in boot2 and gptboot as well. Yes, this is just something to start with. BTW, all other components use bios_getmem from sys/boot/i386/libi386/biosmem.c ? > I think though that in this case you can just use the last 3MB of heap > rather than half of the extended memory as heap. I thought the more the better? :-) I've kept the block of code that tries to make high_heap_size at least 3MB. -- Andriy Gapon