Subject: UVM aobj: Large VM objects.
To: None <tech-kern@netbsd.org>
From: Cherry G.Mathew <cherry@mahiti.org>
List: port-ia64
Date: 03/06/2006 12:33:45
Hi,

The Kernel aobject (kernel_object_store) spans (VM_MAX_ADDRESS -
VM_MIN_ADDRESS) on all ports. On ia64, the kernel VM range is
determined by the size of an IA64 "region". This was inherited from
FreeBSD MD code. 

The maximum number of pages required to map this size overflows type
int, even with 16KB page sizes. Would the following ( and possibly
more like this to come ) affect other areas of UVM ?

Thanks,

Cherry.

---------------------------------------------------------------------
*** uvm_aobj.c	05 Mar 2006 11:24:26 +0530	1.1.1.1
--- uvm_aobj.c	06 Mar 2006 12:19:49 +0530	
***************
*** 152,158 ****
  
  struct uvm_aobj {
  	struct uvm_object u_obj; /* has: lock, pgops, memq, #pages, #refs */
! 	int u_pages;		 /* number of pages in entire object */
  	int u_flags;		 /* the flags (see uvm_aobj.h) */
  	int *u_swslots;		 /* array of offset->swapslot mappings */
  				 /*
--- 152,158 ----
  
  struct uvm_aobj {
  	struct uvm_object u_obj; /* has: lock, pgops, memq, #pages, #refs */
! 	long u_pages;		 /* number of pages in entire object */
  	int u_flags;		 /* the flags (see uvm_aobj.h) */
  	int *u_swslots;		 /* array of offset->swapslot mappings */
  				 /*
***************
*** 476,482 ****
  {
  	static struct uvm_aobj kernel_object_store;
  	static int kobj_alloced = 0;
! 	int pages = round_page(size) >> PAGE_SHIFT;
  	struct uvm_aobj *aobj;
  	int refs;
  
--- 476,482 ----
  {
  	static struct uvm_aobj kernel_object_store;
  	static int kobj_alloced = 0;
! 	long pages = round_page(size) >> PAGE_SHIFT;
  	struct uvm_aobj *aobj;
  	int refs;