1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00
freebsd/sys/i386
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
..
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 Add the rr232x driver to the default kernels. 2006-04-27 20:58:24 +00:00
cpufreq Add frequency-voltage tables for Intel 778, 758, 773, 753, and 733J 2006-02-25 04:55:38 +00:00
i386 Interim fix for pmap problems I introduced with my last commit. 2006-04-28 19:05:08 +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