Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 1995 00:43:17 -0700
From:      David Greenman <davidg@Root.COM>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        CVS-commiters@freefall.freebsd.org, cvs-sys@freefall.freebsd.org
Subject:   Re: cvs commit: src/sys/vm vm_glue.c vm_map.c vm_page.c vm_pageout.c 
Message-ID:  <199510230743.AAA01697@corbin.Root.COM>
In-Reply-To: Your message of "Mon, 23 Oct 95 17:23:09 %2B1000." <199510230723.RAA17572@godzilla.zeta.org.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
>>   NBPG _should_ refer to the hardware page size. PAGE_SIZE should refer to
>>the "software" page size - the size that the independant portion of the VM
>>system uses. CLBYTES is a historical thing that should probably go away.
>>   NBPG should probably only be used in the machine-dependant portion of the
>>sources on architectures where NBPG != PAGE_SIZE...in the case of the i386, I
>>personally would prefer that PAGE_SIZE be used everywhere - especially when
>>it's not clear what is 'managed' by the higher VM system layer.
>
>The VM layer currently seems to manage bothe PAGE_SIZE and NBPG.  I think it
>should manage only higher level pages but don't like the name `PAGE_SIZE'
>since it's not clear whether that means a hardware page size, a software
>page size, or the size of a cluster of hardware pages (actually it clearly
>doesn't mean the cluster size, but it should be thought of as a cluster
>size in the clustering layer.  OTOH, the i386 code should be aware that
>the software page size is the same as the hardware pages size and have a
>null clustering layer.  I think it should still use NBPG for h/w pages and
>PAGE_SIZE as little as possible.

   The VM layer is wrong, and that's partially what John is correcting.
I disagree about PAGE_SIZE. The general principle is that to all but the
lowest management functions in the pmap layer, the "page size" is a constant
and may or may not be made up of a collection of smaller hardware pages. In
fact, it may not even be a constant at the hardware level for a given
architecture. The hardware page size might be different with different models
of a specific CPU type (Sparc, for instance, is 4K on some, 8K on others) or
may even be dynamically variable. Thus, "NBPG" becomes quite meaningless and
it's generally only useful to speak about the machine-independant constant. I
think PAGE_SIZE is quite unambiguous. It's inherited from Mach and I plan for
it to stay. :-)

-DG



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