Subject: RE: G4, 2GB RAM report (fwd)
To: 'Tsubai Masanari' <>
From: Cliff Neighbors <>
List: port-powerpc
Date: 08/10/2000 12:28:41
the phrase "at least" in the text Tsubai quotes below is worth 
considering.  it seems we are using the minimal page table size;
does it matter?

two aspects to consider:

1. collisions & use of secondary hashing function -- 
   is this serialized behind the primary hash resulting 
   in longer lookup?  The PEM goes on to say: "...making the 
   page table larger... reduces the frequency of collisions".
2. overflow (trap to software miss handler) -- that's got to hurt.

has anyone measured cost/benefit of larger-than-minimum
page tables?  maybe the overall effect is too dependent
on the application mix to make a gneralization?


cliff neighbors
allegro networks, inc.

-----Original Message-----
From: Tsubai Masanari []
Sent: Thursday, August 10, 2000 6:35 AM
Subject: Re: G4, 2GB RAM report (fwd)

>For folks only on port-powerpc, the current powerpc pmap doesn't size
>things well when the machine has 2GB of memory. It calculates the number
>of bytes in the system in an integer quantity. 2GB > INT_MAX, so bad
>things happen.

The Programming Environments Manual says:  Page Table Size

In a 32-bit implementation, the minimum size for a page table is 64 Kbytes
(2^10 PTEGs of 64 bytes each). However, it is recommended that the total
number of PTEGs in the page table be at least half the number of physical
page frames to be mapped. While avoidance of hash collisions cannot be ...


	if (physmem < 0x800)
		ptab_cnt = 0x400;
	else {
		ptab_cnt = HTABENTS;
		ptab_cnt = (physmem + 1) / 2;
		/* Align 2^n. */
		for (i = 0; i < 32; i++)
			if ((1U << i) >= ptab_cnt) {
				ptab_cnt = 1 << i;
#endif /* HTABENTS */