1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-27 16:39:08 +00:00
freebsd/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
cam
coda
compat
conf make BGE_FAKE_AUTONEG a tunable. 2006-04-25 15:56:52 +00:00
contrib
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
gdb
geom geli(8) provides keys on newsession time, so remove CRD_F_KEY_EXPLICIT flag 2006-04-20 06:33:46 +00:00
gnu
i4b
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
isofs/cd9660
kern move remaining sysctl into the kern.sched tree... 2006-04-26 19:42:38 +00:00
libkern
modules
net
net80211 back out public safety-specific channel number mapping; we can't do 2006-04-26 16:00:37 +00:00
netatalk
netatm
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
netipx
netkey
netnatm style(9) treatment following fixups. 2006-04-23 16:33:56 +00:00
netncp
netsmb
nfs
nfs4client
nfsclient
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
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
pci
posix4
powerpc Set the rid for any resource obtained from rman_resource_reserve. 2006-04-20 04:19:10 +00:00
rpc
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
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