1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00
freebsd/sys/i386
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
..
acpica If the XSDT address in the RSDP for an ACPI 2.0 machine is NULL, then fall 2006-03-27 15:59:48 +00:00
bios Fix build (including both asm.h and asmacros.h is evil). 2005-07-22 15:01:07 +00:00
compile
conf Move AHC_REG_PRETTY_PRINT and AHD_REG_PRETTY_PRINT below 2006-04-24 08:44:34 +00:00
cpufreq Add frequency-voltage tables for Intel 778, 758, 773, 753, and 733J 2006-02-25 04:55:38 +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
ibcs2 Regenerate. 2006-02-06 22:15:00 +00:00
include MFamd64: shrink pv entries from 24 bytes to about 12 bytes. (336 pv entries 2006-04-26 21:49:20 +00:00
isa Correct a local information leakage bug affecting AMD FPUs. 2006-04-19 07:00:19 +00:00
linux regen 2006-03-18 20:49:01 +00:00
pci - Make pcib_devclass private to sys/dev/pci/pci_pci.c and change all the 2006-01-06 19:22:19 +00:00
svr4 Use svr4_si_{addr,code,errno,signo,trap} in preference to si_{...}. 2005-10-19 14:59:54 +00:00
xbox Committed the xbox syscons(8)-able console driver. 2006-03-03 14:52:57 +00:00
Makefile