Commit Graph

58 Commits

Author SHA1 Message Date
ragge 6c0c8e1049 Change the pmap to use 512-byte pages as user page table pages instead of
PAGE_SIZE pages (4k). An average small program uses ~6 4k pages (24k),
while the same program only uses ~20 512 byte pages (10k), so it will be
a small memory usage improvement. The large improvement will be the upcoming
ability to share page table pages between processes for shared libraries.

Remaining: should be able to give back ptp pages to the system.
2003-03-02 22:19:06 +00:00
ragge 21d5b938d7 Enable USE_TOPDOWN_VM. This also makes it possible to use large address
spaces, so bump MAXDSIZ to 1GB.
2003-02-26 21:54:35 +00:00
chs c081614ea2 it really helps to get the stub right before cutting + pasting it 27 times.
alas, I did not.  doh.
2002-09-22 07:53:39 +00:00
chs 55e1f79335 add pmap_remove_all() hook (empty on most platforms so far). 2002-09-22 07:17:08 +00:00
matt 5916ff65fd Eliminate commons. 2002-05-13 21:11:23 +00:00
ragge c034dd5209 Inline functions that mostly do not need to be called. Partly
rearrange/change the code to be able to avoid some inefficient functions.
Profiling shows that the time spent in pmap now is decreased by 20%. (!)
2002-03-21 22:08:08 +00:00
ragge fe503fb96f Major update of the vax pmap:
- Reinstall the "dynamic page table length" that was removed some
	  years ago.
	- Limit the user page table submap to max 5% of available memory.
	- Free the page table space when a process is swapped out.
	- If the UPT submap runs out of space, throw away pmap mappings
	  using the same algorithm as for swapping processes.

As a result of this, 4MB machines are useable again and it's even possible
to compile a kernel for 2MB machines (but it will be slow... :-)

Still to do:
	- Multiprocessor fixes.
	- More profiling.
2002-03-10 22:32:31 +00:00
ragge 16cd24dea4 usrptsize was not correct calculated, fixed.
Add space to system page table for the UVM kernel area.
This fixes the KVM usage problem that Manuel Bouyer reported a while ago.
2002-03-01 23:55:10 +00:00
matt 28b1aa2b30 Move .s files to .S files. (and .s.o rules in boot/Makefile.inc)
Put in register prefixes everywhere.
2002-02-24 01:04:23 +00:00
chs 3628675acf implement pmap_wired_count(). 2001-09-24 01:48:15 +00:00
chris 0e7661f023 Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
2001-09-10 21:19:08 +00:00
simonb 023bdd2bf2 Use comments around the token after a #endif. 2001-08-31 04:44:54 +00:00
ragge 30e020fbaa The beginning of pmap locks. While here, some cleaning and KNF. 2001-06-04 15:36:00 +00:00
chs 11a9651c8f replace vm_page_t with struct vm_page *. 2001-05-26 21:27:10 +00:00
thorpej 69abdbf60c Undo a misguided previous change to the pmap_update() API. 2001-04-22 23:19:26 +00:00
thorpej 4738622712 Give pmap_update() an argument (a pmap_t) so that it knows which
pmap it should be updating.
2001-04-22 00:33:59 +00:00
thorpej 15f731ee94 pmap_update() should not be equated with "flush entire TLB", it is
used to process deferred pmap operations.  Since these pmaps don't
defer anything, pmap_update() is a noop.
2001-04-21 17:25:01 +00:00
chs 2116915a30 eliminate TRUNC_PAGE() and ROUND_PAGE() in favor of their
lowercase counterparts.  also, a little misc cleanup.
2000-11-21 05:49:07 +00:00
ragge d254a73539 Remove some unneccessary TBIA's. Keep track of wired pages.
Fix PR#8503 (refcount error).
2000-08-08 19:06:52 +00:00
ragge f9f885519d First cut of multiprocessor support for vax. Still much to do before
other CPUs than the master can spin up.
2000-03-19 14:56:52 +00:00
matt e0df4ffcae expunge vm_offset_t and vm_size_t.
add bus_dma support for the vs4000 dma translation map (sgmap).
enhance the vsbus for the lance to work with it.
remove the sgmap init code from ka46/48/49.c
2000-03-04 07:27:47 +00:00
ragge 8f9615d62c A bunch of changes:
- Free pte pages not in use anymore.
- Inline pmap_extract().
- Fix annoying page reference/modify bug. Fixes PR#7858 & PR#7859.
1999-08-01 13:48:06 +00:00
ragge 1647688f0d Use pmap_steal_memory() for early memory allocation. 1999-06-30 19:31:33 +00:00
thorpej 0288ffb53a pmap_change_wiring() -> pmap_unwire(). 1999-06-17 19:23:20 +00:00
thorpej f5a527bb4e Remove pmap_pageable(); no pmap implements it, and it is not really useful,
because pmap_enter()/pmap_change_wiring() (soon to be pmap_unwire())
communicate the information in greater detail.
1999-06-17 18:21:21 +00:00
ragge 71a57b22eb Use the pool allocator for mbufs instead of a separate submap. 1999-04-14 23:42:00 +00:00
mrg d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
ragge bef0af5311 Allocate (almost) all interrupt vectors dynamically. Simplifies much
work when adding support for new machines and devices.
1999-01-19 21:04:47 +00:00
ragge d0e7a99a8a Giant change: NBPG now set to 4k and CLSIZE == 1 for vax. This change
made a whole bunch of annoying bugs disappear; mostly depending on
bad use of NBPG in non-MD code. The VAX port was the only port that
used this historical "feature".

The CL* macros should probably go away totally, there is no reason
at all to keep them.
1999-01-01 21:43:17 +00:00
ragge 015d31ae8d - Save R/M bits after a page is unmapped.
- Keep track of mapping count (for statistics).
- vm_offset_t -> vaddr_t/paddr_t.
- Move away counting of available memory.
1998-11-29 14:55:04 +00:00
ragge b3574d3923 VAX logical page size increased to 4k. 1998-08-21 13:41:09 +00:00
ragge 9aea445d54 Remove the ancient kernel-stack area at top of P1 region. Make PMAP_NEW
almost work. Also Wall cleaning.
1998-05-03 13:02:22 +00:00
cgd 3bbb7f7d45 Move pmap_map() function definition to MD headers, as appropriate. It's
an internal function, and the VM system shouldn't try to prototype it.
(Note that some ports _don't_ prototype it.)
1998-02-18 02:05:32 +00:00
ragge a355d0bc1b Re-implement page reference bit emulation by using the (otherwise unused)
valid bit. This is faster than the "unmap all" solution that were described
in that Mach paper _and_ it eliminates the need for checking the wired bit.
As a result of this; swapping started working again on vax :-)
1998-01-31 12:17:34 +00:00
ragge afb1a37379 Fix page size initialisation. 1998-01-18 22:07:50 +00:00
thorpej b9f1b716f3 Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
1998-01-03 01:12:59 +00:00
thorpej 172a9381b6 - Remove the PCB pointer from the pmap structure. Instead, store the
page {0,1} base and length registers in the pmap structure.  They will
  be loaded in to the PCB when the process's address space is activated
  by way of pmap_activate().
- Remove pmap_pinit() macro; it's now a real function.
- Prototypes for pmap_pinit(), pmap_activate(), pmap_deactivate().
1998-01-03 00:28:43 +00:00
thorpej cc1f5b65c9 asm -> __asm__ 1997-11-05 04:23:35 +00:00
ragge ae27edc757 Major rewriting, optimization and simplifying of the pmap code:
- Map in all physical memory first in system space. This reduces
  pmap_copy_page() and pmap_zero_page to 3 resp. 2 instructions.
- Have fized position user page tables. Makes the pv_table smaller
  and all reverse references faster (and simpler).
- Remove the wiring code. Nobody doesn't even know what a DR32 is anymore.
- Simulate page reference bit by setting page invalid, as suggested by
  Rich Draves in a paper for 1991 Mach Usenix Symposium.

This reduced the time spent in the pmap module to between 70-75% of
the previous; and made process startup _much_ faster.
1997-11-02 14:25:19 +00:00
ragge 759763742b Remove __VM_PMAP_HACK. 1997-07-06 22:38:22 +00:00
gwr e2a58b69f7 Add #define __VM_PMAP_HACK as a temporary measure. 1997-05-16 21:35:30 +00:00
ragge caff7b03d4 Numerous changes to be able to put Bertram Barth's VAXstation support in.
(Some) Support for VAXstation 2000/MicroVAX 2000, VAXstation 3100/76.
1996-07-20 17:58:12 +00:00
ragge a24af7a7c2 Added prototypes to everything. Made all files compile with -Wall. 1996-04-08 18:32:26 +00:00
ragge f01a5dd8cc We lost declaration of kernel_pmap_store somewhere, put it back. 1996-03-09 23:39:51 +00:00
ragge 6e51b1e47e Support for VAX 8600/8650 added. Works with lots of Unibus adapters,
and will probably work with Massbus adapters as well. (Not tested,
but it's the same code as for 11/780). Ubareset's may cause crashes
on 8600 also like 11/780, but they are more uncommon. No support
for console RL02 yet, but it's likely to come.
1996-03-07 23:22:34 +00:00
ragge 4cafd3d7d2 PAGE_SIZE should be PAGE_SHIFT. Really ugly bug! 1996-02-11 13:46:23 +00:00
mycroft 9d9a70a5a2 Fix #includes. 1996-02-02 18:05:36 +00:00
ragge 763fd0a011 Macros for locore mapping added. 1995-11-12 14:41:41 +00:00
jtc 8aa6c376b6 KERNEL -> _KERNEL 1995-05-11 16:52:54 +00:00
ragge 29a5673f41 BROKEN_SWAP removed, swapping verified OK.
pmap_collect(pmap) added as null define.
1995-05-05 14:13:01 +00:00