opnsense-src/sys/alpha
Alan Cox de6c3db01f Simplify the reference counting of page table pages. Specifically, use
the page table page's wired count rather than its hold count to contain
the reference count.  My rationale for this change is based on several
factors:

1. The machine-independent and pmap layers used the same hold count field
   in subtly different ways.  The machine-independent layer uses the hold
   count to implement a form of ephemeral wiring that is used by pipes,
   physio, etc.  In other words, subsystems where we wish to temporarily
   block a page from being swapped out while it is mapped into the kernel's
   address space.  Such pages are never removed from the page queues.
   Instead, the page daemon recognizes a non-zero hold count to mean "hands
   off this page."  In contrast, page table pages are never in the page
   queues; they are wired from birth to death.  The hold count was being
   used as a kind of reference count, specifically, the number of valid
   page table entries within the page.  Not surprisingly, these two
   different uses imply different synchronization rules: in the machine-
   independent layer access to the hold count requires the page queues
   lock; whereas in the pmap layer the pmap lock is required.  Thus,
   continued use by the pmap layer of vm_page_unhold(), which asserts that
   the page queues lock is held, made no sense.

2. _pmap_unwire_pte_hold() was too forgiving in its handling of the wired
   count.  An unexpected wired count on a page table page was ignored and
   the underlying page leaked.

3. In a word, microoptimization.  Using the wired count exclusively, rather
   than a combination of the wired and hold counts, makes the code slightly
   smaller and faster.

Reviewed by: tegge@
2004-09-19 21:20:01 +00:00
..
alpha Simplify the reference counting of page table pages. Specifically, use 2004-09-19 21:20:01 +00:00
compile Don't need the .keep_me files. Obrien and I committed past each other. 2001-07-01 23:35:44 +00:00
conf Add nge. (I've used one for about a week in an XP1000.) 2004-09-11 07:26:50 +00:00
include The previous commit, roughly one and a half years ago removed the 2004-09-10 05:00:27 +00:00
isa Add new a function isa_dma_init() which returns an errno when it fails 2004-09-15 12:09:50 +00:00
linux Give setrunqueue() and sched_add() more of a clue as to 2004-09-01 02:11:28 +00:00
mcbus Catch up with __RMAN_RESOURCE_VISIBLE enough to get GENERIC to build 2004-07-01 15:07:27 +00:00
osf1 Regenerate after fcntl() wrappers were marked MP safe. 2004-08-24 20:24:34 +00:00
pci In alpha_pci_alloc_resource(), when allocating a memory resource, 2004-08-29 19:07:14 +00:00
tlsb Allocate tty at attach time instead of open time. 2004-09-17 11:04:57 +00:00
Makefile Add a dopey makefile to do the tags dance, which is probably not perfect 2000-12-31 23:26:34 +00:00