Subject: Proposal: CL* macros removal.
To: None <tech-kern@netbsd.org>
From: Anders Magnusson <ragge@ludd.luth.se>
List: tech-kern
Date: 11/20/1999 13:40:24
History: 20 years ago there was a new VM system in BSD, that could handle
"clustering" of pages on VAXen. By tradition the physical page size have
been defined as NBPG, and therefore the new clustered page size got 
called CLBYTES, CLSIZE etc... All code that needed the page size should
use CLBYTES, CLSIZE*NBPG or similar. This wasn't a problem, everything 
was a VAX at that time.
Almost 10 years ago a new VM system saw the light in BSD, which worked in
another way and in practise outdated the CL* macros. It instead declared
that the physical page size should never be visible to the MI code (which
is the correct way). The same is true for UVM.

The CL* macros still exist, but CLSIZE must always be equal to 1 otherwise
lots of strange things will happen. VAX was the only port that had CLSIZE
to something else that 1, and this was a constant source of problem. VAX
has now changed and uses CLSIZE==1 as other ports, and everything is fine.

Proposal: Remove all existance of the CL* macros from the kernel. The
page size shown to the MI code should be the NBPG/PGSHIFT/etc... macros.
If someone wants to use a bigger logical page size than physical, do
like VAX and hide it in the MD code. If someone has a variable page size,
do like sparc and hide it in the MD code. The CL* macros should never
be used outside the kernel, if they are then that code is broken.

If noone has any reasonable objections to this, I will nuke all existance
of the CL* macros in a week or so.

-- Ragge