freebsd-skq/sys/i386/include
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
..
pc Make the facility for recognizing BIOS-signatures more general 2005-07-21 09:48:37 +00:00
_bus.h Break out the definition of bus_space_{tag,handle}_t and a few other types 2005-04-18 21:45:34 +00:00
_inttypes.h
_limits.h Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename 2005-08-20 16:44:41 +00:00
_stdint.h
_types.h By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT into 2006-01-09 06:05:57 +00:00
acpica_machdep.h Move the code for halting the CPU (acpi_cpu_c1) into machdep files. 2004-10-11 05:39:15 +00:00
apicreg.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
apicvar.h Rework how we wire up interrupt sources to CPUs: 2006-02-28 22:24:55 +00:00
apm_bios.h Move pc98 specific parts to the pc98 specific file. 2005-04-03 23:27:11 +00:00
apm_segments.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
asm.h
asmacros.h - Move PUSH_FRAME and POP_FRAME into machine/asmacros.h. 2005-12-05 21:44:47 +00:00
atomic.h Use wrapper macros for atomic pointer operations in order to perform the 2006-03-28 14:34:48 +00:00
bootinfo.h
bus_dma.h Refactor the bus_dma header files so that the interface is described in 2005-03-14 16:46:28 +00:00
bus.h Fix -Wundef warnings found when compiling i386 LINT, GENERIC and 2005-12-05 11:58:35 +00:00
clock.h Tweak how the MD code calls the fooclock() methods some. Instead of 2005-12-22 22:16:09 +00:00
cpu.h Tweak how the MD code calls the fooclock() methods some. Instead of 2005-12-22 22:16:09 +00:00
cpufunc.h Add a knob for disabling/enabling HTT, "machdep.hyperthreading_allowed". 2005-05-13 00:10:56 +00:00
cputypes.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
cserial.h Prepare for sconfig(8) update. 2006-01-30 13:34:57 +00:00
db_machdep.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
elan_mmcr.h Expand indirect reference to BSD license with the current one. 2005-01-06 22:05:28 +00:00
elf.h Add definitions for TLS relocations. 2004-08-02 19:12:17 +00:00
endian.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
exec.h Use a common multi-inclusion protection, and add such a 2005-02-19 21:16:48 +00:00
float.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
floatingpoint.h The file machine/ieeefp.h needs sys/cdefs.h on amd64 and i386 after my 2005-04-02 17:31:42 +00:00
frame.h Tweak how the MD code calls the fooclock() methods some. Instead of 2005-12-22 22:16:09 +00:00
gdb_machdep.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
i4b_cause.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
i4b_debug.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
i4b_ioctl.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
i4b_rbch_ioctl.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
i4b_tel_ioctl.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
i4b_trace.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
ieeefp.h Remove fpsetsticky(). This was added for SysV compatibility, but due 2005-03-15 15:53:39 +00:00
if_wl_wavelan.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
in_cksum.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
intr_machdep.h Rework how we wire up interrupt sources to CPUs: 2006-02-28 22:24:55 +00:00
ioctl_bt848.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
ioctl_meteor.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
iodev.h Break out the MI part of the /dev/[k]mem and /dev/io drivers into 2004-08-01 11:40:54 +00:00
kdb.h Eliminate HAVE_STOPPEDPCBS. On ia64 the PCPU holds a pointer to the 2006-04-03 22:51:47 +00:00
legacyvar.h Expose legacy_pcib_alloc_resource, and use it in the mptable pci bus 2005-09-17 23:57:53 +00:00
limits.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
md_var.h Merge minidumps from amd64 where they were originally developed. 2006-04-21 04:28:43 +00:00
memdev.h Break out the MI part of the /dev/[k]mem and /dev/io drivers into 2004-08-01 11:40:54 +00:00
metadata.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
minidump.h Merge minidumps from amd64 where they were originally developed. 2006-04-21 04:28:43 +00:00
mp_watchdog.h Add an "options MP_WATCHDOG" to i386. This option allows one of the 2004-08-15 18:02:09 +00:00
mptable.h guard function decls with _KERNEL so user code can include this file 2006-02-22 21:38:33 +00:00
mutex.h
npx.h - Move the NPX_DEBUG option to options.{i386,pc98} and use opt_npx.h. 2005-05-12 12:47:41 +00:00
param.h By popular demand, move __HAVE_ACPI and __PCI_REROUTE_INTERRUPT into 2006-01-09 06:05:57 +00:00
pcaudioio.h
pcb_ext.h Explicitly switch to the new TSS by updating the current CPU's TSS selector 2005-09-15 17:30:08 +00:00
pcb.h Remove pcb_switchout, it has not been used for a long time. 2005-12-29 13:23:48 +00:00
pci_cfgreg.h Move pc98 specific parts to the pc98 specific file. 2005-04-03 23:27:11 +00:00
pcpu.h Move global variable private_tss into per-cpu area. 2005-12-26 00:07:19 +00:00
pcvt_ioctl.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
pecoff_machdep.h
perfmon.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
pmap.h MFamd64: shrink pv entries from 24 bytes to about 12 bytes. (336 pv entries 2006-04-26 21:49:20 +00:00
pmc_mdep.h MFP4: 2005-06-09 19:45:09 +00:00
ppireg.h - Move timerreg.h to <arch>/include and split i8253 specific defines into 2005-05-14 09:10:02 +00:00
privatespace.h
proc.h Divorce critical sections from spinlocks. Critical sections as denoted by 2005-04-04 21:53:56 +00:00
profile.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
psl.h
ptrace.h Add support for XMM registers in GDB for x86 processors that support 2005-05-31 09:43:04 +00:00
reg.h Add support for XMM registers in GDB for x86 processors that support 2005-05-31 09:43:04 +00:00
reloc.h
resource.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
runq.h /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 22:18:23 +00:00
segments.h Change the segment limits to 4GB, we set the user accessible bit on all 2005-04-13 22:57:17 +00:00
setjmp.h
sf_buf.h Implement support for CPU private mappings within sf_buf_alloc(). 2005-02-13 06:23:13 +00:00
sigframe.h
signal.h Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename 2005-08-20 16:44:41 +00:00
smapi.h
smp.h Tweak how the MD code calls the fooclock() methods some. Instead of 2005-12-22 22:16:09 +00:00
speaker.h Add /dev/speaker support to amd64. 2005-11-11 09:57:32 +00:00
specialreg.h - Print number of physical/logical cores and more CPUID info. 2005-10-14 22:52:01 +00:00
stdarg.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
sysarch.h Change the segment limits to 4GB, we set the user accessible bit on all 2005-04-13 22:57:17 +00:00
timerreg.h Change the spkr_set_pitch() function to a macro to fix low level profiling. 2005-05-28 13:40:27 +00:00
trap.h Add POSIX siginfo_t's si_code, this is for upcoming POSIX realtime signal 2005-10-14 03:01:14 +00:00
tss.h
ucontext.h MFamd64: use register_t's. 2005-09-12 03:34:05 +00:00
varargs.h netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
vm86.h
vmparam.h Increase the scaling of VM_KMEM_SIZE_MAX. 2004-08-16 08:35:22 +00:00
xbox.h Committed the xbox syscons(8)-able console driver. 2006-03-03 14:52:57 +00:00