Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Apr 2013 21:01:44 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: gptzfsboot problem on HP P410i Smart Array
Message-ID:  <515DC008.9060108@FreeBSD.org>
In-Reply-To: <201304041316.12617.jhb@freebsd.org>
References:  <CAAG5QCs0G1ztH715j5pnsFmne30xZwUT5o_YkQW9k1dDc-=-Nw@mail.gmail.com> <201303191220.34088.jhb@freebsd.org> <515DA760.8000101@FreeBSD.org> <201304041316.12617.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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