freebsd-nq/sys
Peter Wemm 041a991fa7 MFamd64: shrink pv entries from 24 bytes to about 12 bytes. (336 pv entries
per page = effectively 12.19 bytes per pv entry after overheads).
Instead of using a shared UMA zone for 24 byte pv entries (two 8-byte tailq
nodes, a 4 byte pointer, and a 4 byte address), we allocate a page at a
time per process.  This provides 336 pv entries per process (actually, per
pmap address space) and eliminates one of the 8-byte tailq entries since
we now can track per-process pv entries implicitly.  The pointer to
the pmap can be eliminated by doing address arithmetic to find the metadata
on the page headers to find a single pointer shared by all 336 entries.
There is an 11-int bitmap for the freelist of those 336 entries.

This is mostly a mechanical conversion from amd64, except:
* i386 has to allocate kvm and map the pages, amd64 has them outside of kvm
* native word size is smaller, so bitmaps etc become 32 bit instead of 64
* no dump_add_page() etc stuff because they are in kvm always.
* various pmap internals tweaks because pmap uses direct map on amd64 but
  on i386 it has to use sched_pin and temporary mappings.

Also, sysctl vm.pmap.pv_entry_max and vm.pmap.shpgperproc are now
dynamic sysctls.  Like on amd64, i386 can now tune the pv entry limits
without a recompile or reboot.

This is important because of the following scenario.   If you have a 1GB
file (262144 pages) mmap()ed into 50 processes, that requires 13 million
pv entries.  At 24 bytes per pv entry, that is 314MB of ram and kvm, while
at 12 bytes it is 157MB.  A 157MB saving is significant.

Test-run by:  scottl (Thanks!)
2006-04-26 21:49:20 +00:00
..
alpha Move AHC_REG_PRETTY_PRINT and AHD_REG_PRETTY_PRINT below 2006-04-24 08:44:34 +00:00
amd64 Move vm.pmap.pv_entry_count out from the PV_STATS ifdefs. It is always 2006-04-26 21:34:07 +00:00
arm MFother arches : 2006-04-22 22:51:32 +00:00
boot Use PTOV() to convert physical addresses to appropriate virtual addresses 2006-04-25 18:42:22 +00:00
bsm Update src/sys/bsm for OpenBSM 1.0 alpha 5 changes: 2006-03-04 16:54:21 +00:00
cam Actually check to see if XPT_CALC_GEOMETRY had an error 2006-04-18 22:01:59 +00:00
coda CODA_COMPAT_5 may not be defined unconditionally in the coda5 module. 2006-02-27 12:04:13 +00:00
compat Annotate uses of fgetsock() with indications that they should rely 2006-04-01 15:25:01 +00:00
conf make BGE_FAKE_AUTONEG a tunable. 2006-04-25 15:56:52 +00:00
contrib fix "ipf -Z" reporting rubbish and possibly panic'ing box 2006-04-18 13:24:14 +00:00
crypto padlock(4) doesn't support explicitly provided keys yet. 2006-04-20 06:31:44 +00:00
ddb - Overhaul the 'ps' command in ddb to be mostly readable again. :) It is 2006-04-25 20:34:04 +00:00
dev o Add 2 NEC cards 2006-04-26 21:31:31 +00:00
doc
fs Remove unused prototypes. 2006-04-12 12:17:29 +00:00
gdb add support for copying console messages to a remote gdb 2006-03-23 23:06:14 +00:00
geom geli(8) provides keys on newsession time, so remove CRD_F_KEY_EXPLICIT flag 2006-04-20 06:33:46 +00:00
gnu Repair ext2fs writes. 2006-04-13 19:37:32 +00:00
i4b Fix -Wundef warnings found when compiling i386 LINT, GENERIC and 2005-12-05 11:58:35 +00:00
i386 MFamd64: shrink pv entries from 24 bytes to about 12 bytes. (336 pv entries 2006-04-26 21:49:20 +00:00
ia64 In nexus_teardown_intr(), actually remove the handler. 2006-04-21 16:12:28 +00:00
isa Committed the xbox syscons(8)-able console driver. 2006-03-03 14:52:57 +00:00
isofs/cd9660 When encountering a ISO_SUSP_CFLAG_ROOT element in Rock Ridge 2006-03-13 22:32:33 +00:00
kern move remaining sysctl into the kern.sched tree... 2006-04-26 19:42:38 +00:00
libkern Convert function declarations to ANSI C. 2006-01-22 00:46:40 +00:00
modules Import ACPI Dock Station support. Note that this is still very young. 2006-04-15 12:31:34 +00:00
net Use ANSI C function protypes and declarations for if_arcsubr. 2006-04-12 07:44:31 +00:00
net80211 back out public safety-specific channel number mapping; we can't do 2006-04-26 16:00:37 +00:00
netatalk White space consistency with kasserts. Minor style tweaks. 2006-04-01 16:54:37 +00:00
netatm Chance protocol switch method pru_detach() so that it returns void 2006-04-01 15:42:02 +00:00
netgraph o Replace disappeared URLs to Cisco docs by new ones, style. 2006-04-25 20:01:50 +00:00
netinet In in_pcbdrop(), fix !INVARIANTS build. 2006-04-25 23:23:13 +00:00
netinet6 Move lock assertions to top of in6_pcbladdr(): we still want them to run 2006-04-25 12:09:58 +00:00
netipsec Hide net.inet.ipsec.test_{replay,integrity} sysctls under #ifdef REGRESSION. 2006-04-10 15:04:36 +00:00
netipx Make this compile without INVARIANTS. 2006-04-11 23:15:47 +00:00
netkey In raw and raw-derived socket types, maintain and enforce invariant that 2006-04-01 15:55:44 +00:00
netnatm style(9) treatment following fixups. 2006-04-23 16:33:56 +00:00
netncp In ncp_sysctl_connstat(), the SLIST_FOREACH() logic to check 'error' 2006-01-14 11:40:32 +00:00
netsmb Retire NETSMBCRYPTO as a kernel option and make its functionality 2006-03-05 22:52:17 +00:00
nfs
nfs4client Use nfs4_disconnect for connections opened with nfs4_connect. 2006-01-19 22:48:31 +00:00
nfsclient Keep track of the number of in-progress async direct IO writes in the nfsnode. 2006-04-06 01:20:30 +00:00
nfsserver Bump up the NFS server dupreq cache limit to 2K (from 64). With a small 2006-04-25 00:21:56 +00:00
opencrypto Be sure to wakeup the crypto thread when new request was queued. 2006-04-11 18:01:04 +00:00
pc98 o Move ISA specific code from ppc.c to ppc_isa.c -- a bus front- 2006-04-24 23:31:51 +00:00
pccard I don't believe these are used at all, and can be safely removed 2006-01-15 06:49:28 +00:00
pci Add support for RTL8111B chip, that can be found on some mainboards, 2006-03-22 07:33:03 +00:00
posix4 Use proc lock to prevent a thread from exiting, Giant was no longer used to 2006-04-10 04:55:59 +00:00
powerpc Set the rid for any resource obtained from rman_resource_reserve. 2006-04-20 04:19:10 +00:00
rpc Fix up some cut-n-paste damage and some out-of-date comments. 2006-01-20 15:20:41 +00:00
security Reconstitute struct mac_policy_ops by breaking out individual function 2006-04-26 14:18:55 +00:00
sparc64 Move AHC_REG_PRETTY_PRINT and AHD_REG_PRETTY_PRINT below 2006-04-24 08:44:34 +00:00
sys Reconstitute struct mac_policy_ops by breaking out individual function 2006-04-26 14:18:55 +00:00
tools Fix a leftover "iwi_boot" string. 2006-01-30 16:32:08 +00:00
ufs Revert previous to this file before an actual request is made. 2006-04-22 04:22:15 +00:00
vm Add synchronization to vm_pageq_add_new_page() so that it can be called 2006-04-25 17:27:24 +00:00
Makefile Reimplementation of world/kernel build options. For details, see: 2006-03-17 18:54:44 +00:00