On 17.03.2011, at 02:03, David Gibson <da...@gibson.dropbear.id.au> wrote:
> On Wed, Mar 16, 2011 at 04:03:47PM +0100, Alexander Graf wrote: >> On 03/16/2011 05:56 AM, David Gibson wrote: > [snip] >>> @@ -248,6 +261,16 @@ static void ppc_spapr_init(ram_addr_t ram_size, >>> ram_offset = qemu_ram_alloc(NULL, "ppc_spapr.ram", ram_size); >>> cpu_register_physical_memory(0, ram_size, ram_offset); >>> >>> + /* allocate hash page table */ >>> + htab_size = 1ULL<< (pteg_shift + 7); >> >> Linux makes the htab size depend on the provided amount of ram. >> Shouldn't we do the same? > > Well... maybe. In fact the guidelines for hash allocation tend to be > rather larger than really necessary for a Linux guest, so generally > 16mb for the hash will be fine. This does also correspond to the > allocation for the guest hash we use in our experimental kvm code > (making the hash exactly one hugepage makes the necessary contiguous > allocation easier). Hrm - ok :). Alex