freebsd-nq/sys
Peter Wemm 7eeda22793 Interim fix for pmap problems I introduced with my last commit.
Remove the code to dyanmically change the pv_entry limits.  Go back
to a single fixed kva reservation for pv entries, like was done
before when using the uma zone.  Go back to never freeing pages
back to the free pool after they are no longer used, just like
before.

This stops the lock order reversal due to aquiring the kernel map
lock while pmap was locked.

This fixes the recursive panic if invariants are enabled.

The problem was that allocating/freeing kva causes vm_map_entry
nodes to be allocated/freed.  That can recurse back into pmap as
new pages are hooked up to kvm and hence all the problem.
Allocating/freeing kva indirectly allocate/frees memory.

So, by going back to a single fixed size kva block and an index,
we avoid the recursion panics and the LOR.

The problem is that now with a linear block of kva, we have no
mechanism to track holes once pages are freed.  UMA has the same
problem when using custom object for a zone and a fixed reservation
of kva.  Simple solutions like having a bitmap would work, but would
be very inefficient when there are hundreds of thousands of bits
in the map.  A first-free pointer is similarly flawed because pages
can be freed at random and the first-free pointer would be rewinding
huge amounts.  If we could allocate memory for tree strucures or
an external freelist, that would work.  Except we cannot allocate/free
memory here because we cannot allocate/free address space to use
it in.  Anyway, my change here reverts back to the UMA behavior of
not freeing pages for now, thereby avoiding holes in the map.

ups@ had a truely evil idea that I'll investigate.  It should allow
freeing unused pages again by giving us a no-cost way to track the
holes in the kva block.  But in the meantime,  this should get people
booting with witness and/or invariants again.

Footnote: amd64 doesn't have this problem because of the direct map
access method.  I'd done all my witness/invariants testing there.  I'd
never considered that the harmless-looking kmem_alloc/kmem_free calls
would cause such a problem and it didn't show up on the boot test.
2006-04-28 19:05:08 +00:00
..
alpha Move AHC_REG_PRETTY_PRINT and AHD_REG_PRETTY_PRINT below 2006-04-24 08:44:34 +00:00
amd64 Enable the rr232x driver for amd64. 2006-04-28 05:23:10 +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 Enable the rr232x driver for amd64. 2006-04-28 05:23:10 +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 Sort includes. 2006-04-27 22:09:18 +00:00
dev Implement the ipend() method of the serdev I/F. 2006-04-28 18:29:23 +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 - Don't hold the device sx lock when going to sleep. 2006-04-28 12:18:03 +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 Interim fix for pmap problems I introduced with my last commit. 2006-04-28 19:05:08 +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 - Add a BO_NEEDSGIANT flag to the bufobj. This flag forces all child 2006-04-28 01:05:31 +00:00
libkern Convert function declarations to ANSI C. 2006-01-22 00:46:40 +00:00
modules Enable the rr232x driver for amd64. 2006-04-28 05:23:10 +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 The sk(4) driver has moved to /sys/dev/sk 2006-04-27 00:14:02 +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 Uncomment sk(4) as it's now working. 2006-04-27 06:03:17 +00:00
sys - Add a BO_NEEDSGIANT flag to the bufobj. This flag forces all child 2006-04-28 01:05:31 +00:00
tools Fix a leftover "iwi_boot" string. 2006-01-30 16:32:08 +00:00
ufs Fix a typo. 2006-04-28 04:39:50 +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