[net.unix-wizards] How do I calculate UPAGES?

speck@cit-vax.ARPA (08/29/84)

From:  Don Speck <speck@cit-vax.ARPA>

    Long ago, 4.2bsd on our vax was recompiled for 16 megabytes data
segment size.  It seems to have been accomplished by changing three
#define's:
		    old 	new	    file
	NDMAP	    16		36	/sys/h/dmap.h
	MAXDSIZ   12K-64      32K-64	/sys/vax/vmparam.h
	UPAGES	     8		10	/sys/vax/param.h

    MAXDSIZ is obvious (number of 512-byte pages), and NDMAP can be
figured out (4 entries for the 32K, 64K, 128K, 256K swap slots, plus
one entry for each 512K thereafter).  But the relationship between
UPAGES (pages of u-area?) and sizeof(struct user) is unclear.  Does
anyone know how this is supposed to be calculated?  What value of
UPAGES should I use when I raise NDMAP to 84 (40 Mb virtual memory)?

    Don Speck	speck@cit-vax.arpa  decvax!cithep!cit-vax!speck

dbj@RICE.ARPA (09/04/84)

From:  Dave Johnson <dbj@RICE.ARPA>

UPAGES is the sizeof a struct user plus whatever amount of space you
want or need to have available for the kernel stack.  UPAGES is in units
of NBPG bytes, which is defined to be 512 under both 4.2 and 4.1.
Under 4.2, the user structure is 1904 bytes long, and UPAGES is defined
to be 8.  Back under 4.1, the user structure was only 1172 bytes long,
but UPAGES was also defined to be 8 so there was more kernel stack space
available under 4.1 than 4.2.  Interesting...

                                        Dave Johnson
                                        Dept. of Computer Science
                                        Rice University
                                        dbj@rice.ARPA