Print this page
remove whole-process swapping
Long before Unix supported paging, it used process swapping to reclaim
memory.  The code is there and in theory it runs when we get *extremely* low
on memory.  In practice, it never runs since the definition of low-on-memory
is antiquated. (XXX: define what antiquated means)
You can check the number of swapout/swapin events with kstats:
$ kstat -p ::vm:swapin ::vm:swapout
remove xhat
The xhat infrastructure was added to support hardware such as the zulu
graphics card - hardware which had on-board MMUs.  The VM used the xhat code
to keep the CPU's and Zulu's page tables in-sync.  Since the only xhat user
was zulu (which is gone), we can safely remove it simplifying the whole VM
subsystem.
Assorted notes:
- AS_BUSY flag was used solely by xhat

*** 123,160 **** uchar_t a_updatedir; /* mappings changed, rebuild a_objectdir */ timespec_t a_updatetime; /* time when mappings last changed */ vnode_t **a_objectdir; /* object directory (procfs) */ size_t a_sizedir; /* size of object directory */ struct as_callback *a_callbacks; /* callback list */ - void *a_xhat; /* list of xhat providers */ proc_t *a_proc; /* back pointer to proc */ size_t a_resvsize; /* size of reserved part of address space */ }; #define AS_PAGLCK 0x80 #define AS_CLAIMGAP 0x40 #define AS_UNMAPWAIT 0x20 #define AS_NEEDSPURGE 0x10 /* mostly for seg_nf, see as_purge() */ #define AS_NOUNMAPWAIT 0x02 - #define AS_BUSY 0x01 /* needed by XHAT framework */ #define AS_ISPGLCK(as) ((as)->a_flags & AS_PAGLCK) #define AS_ISCLAIMGAP(as) ((as)->a_flags & AS_CLAIMGAP) #define AS_ISUNMAPWAIT(as) ((as)->a_flags & AS_UNMAPWAIT) - #define AS_ISBUSY(as) ((as)->a_flags & AS_BUSY) #define AS_ISNOUNMAPWAIT(as) ((as)->a_flags & AS_NOUNMAPWAIT) #define AS_SETPGLCK(as) ((as)->a_flags |= AS_PAGLCK) #define AS_SETCLAIMGAP(as) ((as)->a_flags |= AS_CLAIMGAP) #define AS_SETUNMAPWAIT(as) ((as)->a_flags |= AS_UNMAPWAIT) - #define AS_SETBUSY(as) ((as)->a_flags |= AS_BUSY) #define AS_SETNOUNMAPWAIT(as) ((as)->a_flags |= AS_NOUNMAPWAIT) #define AS_CLRPGLCK(as) ((as)->a_flags &= ~AS_PAGLCK) #define AS_CLRCLAIMGAP(as) ((as)->a_flags &= ~AS_CLAIMGAP) #define AS_CLRUNMAPWAIT(as) ((as)->a_flags &= ~AS_UNMAPWAIT) - #define AS_CLRBUSY(as) ((as)->a_flags &= ~AS_BUSY) #define AS_CLRNOUNMAPWAIT(as) ((as)->a_flags &= ~AS_NOUNMAPWAIT) #define AS_TYPE_64BIT(as) \ (((as)->a_userlimit > (caddr_t)UINT32_MAX) ? 1 : 0) --- 123,155 ----
*** 286,296 **** int as_gap_aligned(struct as *as, size_t minlen, caddr_t *basep, size_t *lenp, uint_t flags, caddr_t addr, size_t align, size_t redzone, size_t off); int as_memory(struct as *as, caddr_t *basep, size_t *lenp); - size_t as_swapout(struct as *as); int as_incore(struct as *as, caddr_t addr, size_t size, char *vec, size_t *sizep); int as_ctl(struct as *as, caddr_t addr, size_t size, int func, int attr, uintptr_t arg, ulong_t *lock_map, size_t pos); int as_pagelock(struct as *as, struct page ***ppp, caddr_t addr, --- 281,290 ----