summaryrefslogtreecommitdiffstats
path: root/sys/vm/pmap.h
Commit message (Collapse)AuthorAgeFilesLines
* KSE Milestone 2julian2001-09-121-1/+6
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Unrevert the pmap_map() changes. They weren't broken on x86.jhb2001-03-071-1/+1
| | | | Sense beaten into me by: peter
* Back out the pmap_map() change for now, it isn't completely stable on thejhb2001-03-071-1/+1
| | | | i386.
* - Rework pmap_map() to take advantage of direct-mapped segments onjhb2001-03-061-1/+1
| | | | | | | | | | | | | | | | | | | supported architectures such as the alpha. This allows us to save on kernel virtual address space, TLB entries, and (on the ia64) VHPT entries. pmap_map() now modifies the passed in virtual address on architectures that do not support direct-mapped segments to point to the next available virtual address. It also returns the actual address that the request was mapped to. - On the IA64 don't use a special zone of PV entries needed for early calls to pmap_kenter() during pmap_init(). This gets us in trouble because we end up trying to use the zone allocator before it is initialized. Instead, with the pmap_map() change, the number of needed PV entries is small enough that we can get by with a static pool that is used until pmap_init() is complete. Submitted by: dfr Debugging help: peter Tested by: me
* Implement write combining for crashdumps. This is useful whenps2000-10-171-1/+1
| | | | | | | | | | | | | | | | | | write caching is disabled on both SCSI and IDE disks where large memory dumps could take up to an hour to complete. Taking an i386 scsi based system with 512MB of ram and timing (in seconds) how long it took to complete a dump, the following results were obtained: Before: After: WCE TIME WCE TIME ------------------ ------------------ 1 141.820972 1 15.600111 0 797.265072 0 65.480465 Obtained from: Yahoo! Reviewed by: peter
* Brucify the pmap_enter_temporary() changes.dfr2000-05-291-1/+1
|
* Add a new pmap entry point, pmap_enter_temporary() to be used duringdfr2000-05-281-0/+1
| | | | | | | dumps to create temporary page mappings. This replaces the use of CADDR1 which is fairly x86 specific. Reviewed by: dillon
* Implement an optimization of the VM<->pmap API. Pass vm_page_t's directlypeter2000-05-211-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to various pmap_*() functions instead of looking up the physical address and passing that. In many cases, the first thing the pmap code was doing was going to a lot of trouble to get back the original vm_page_t, or it's shadow pv_table entry. Inspired by: John Dyson's 1998 patches. Also: Eliminate pv_table as a seperate thing and build it into a machine dependent part of vm_page_t. This eliminates having a seperate set of structions that shadow each other in a 1:1 fashion that we often went to a lot of trouble to translate from one to the other. (see above) This happens to save 4 bytes of physical memory for each page in the system. (8 bytes on the Alpha). Eliminate the use of the phys_avail[] array to determine if a page is managed (ie: it has pv_entries etc). Store this information in a flag. Things like device_pager set it because they create vm_page_t's on the fly that do not have pv_entries. This makes it easier to "unmanage" a page of physical memory (this will be taken advantage of in subsequent commits). Add a function to add a new page to the freelist. This could be used for reclaiming the previously wasted pages left over from preloaded loader(8) files. Reviewed by: dillon
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-2/+2
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix the following problem:alc1999-07-211-1/+2
| | | | | | | | | | | | | | | | When creating new processes (or performing exec), the new page directory is initialized too early. The kernel might grow before p_vmspace is initialized for the new process. Since pmap_growkernel doesn't yet know about the new page directory, it isn't updated, and subsequent use causes a failure. The fix is (1) to clear p_vmspace early, to stop pmap_growkernel from stomping on memory, and (2) to defer part of the initialization of new page directories until p_vmspace is initialized. PR: kern/12378 Submitted by: tegge Reviewed by: dfr
* Make pmap_collect() an official pmap interface.dt1999-04-231-1/+2
|
* Catch a case spotted by Tor where files mmapped could leave garbage in thejulian1999-04-051-1/+2
| | | | | | | | | | | | unallocated parts of the last page when the file ended on a frag but not a page boundary. Delimitted by tags PRE_MATT_MMAP_EOF and POST_MATT_MMAP_EOF, in files alpha/alpha/pmap.c i386/i386/pmap.c nfs/nfs_bio.c vm/pmap.h vm/vm_page.c vm/vm_page.h vm/vnode_pager.c miscfs/specfs/spec_vnops.c ufs/ufs/ufs_readwrite.c kern/vfs_bio.c Submitted by: Matt Dillon <dillon@freebsd.org> Reviewed by: Alan Cox <alc@freebsd.org>
* Notify pmap when a page is freed on the alpha to allow it to clean updfr1998-07-261-1/+4
| | | | its emulated modified/referenced bits.
* Forward declare more structs that are used in prototypes here - don'tbde1998-02-011-1/+4
| | | | depend on <sys/types.h> forward declaring common ones.
* VM level code cleanups.dyson1998-01-221-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Start using TSM. Struct procs continue to point to upages structure, after being freed. Struct vmspace continues to point to pte object and kva space for kstack. u_map is now superfluous. 2) vm_map's don't need to be reference counted. They always exist either in the kernel or in a vmspace. The vmspaces are managed by reference counts. 3) Remove the "wired" vm_map nonsense. 4) No need to keep a cache of kernel stack kva's. 5) Get rid of strange looking ++var, and change to var++. 6) Change more data structures to use our "zone" allocator. Added struct proc, struct vmspace and struct vnode. This saves a significant amount of kva space and physical memory. Additionally, this enables TSM for the zone managed memory. 7) Keep ioopt disabled for now. 8) Remove the now bogus "single use" map concept. 9) Use generation counts or id's for data structures residing in TSM, where it allows us to avoid unneeded restart overhead during traversals, where blocking might occur. 10) Account better for memory deficits, so the pageout daemon will be able to make enough memory available (experimental.) 11) Fix some vnode locking problems. (From Tor, I think.) 12) Add a check in ufs_lookup, to avoid lots of unneeded calls to bcmp. (experimental.) 13) Significantly shrink, cleanup, and make slightly faster the vm_fault.c code. Use generation counts, get rid of unneded collpase operations, and clean up the cluster code. 14) Make vm_zone more suitable for TSM. This commit is partially as a result of discussions and contributions from other people, including DG, Tor Egge, PHK, and probably others that I have forgotten to attribute (so let me know, if I forgot.) This is not the infamous, final cleanup of the vnode stuff, but a necessary step. Vnode mgmt should be correct, but things might still change, and there is still some missing stuff (like ioopt, and physical backing of non-merged cache files, debugging of layering concepts.)
* After one of my analysis passes to evaluate methods for SMP TLB mgmt, Idyson1997-12-141-1/+2
| | | | | | | | | | | noticed some major enhancements available for UP situations. The number of UP TLB flushes is decreased much more than significantly with these changes. Since a TLB flush appears to cost minimally approx 80 cycles, this is a "nice" enhancement, equiv to eliminating between 40 and 160 instructions per TLB flush. Changes include making sure that kernel threads all use the same PTD, and eliminate unneeded PTD switches at context switch time.
* Fixed the commit botch that was causing crashes soon after systemdyson1997-08-051-1/+2
| | | | | startup. Due to the error, the initialization of the zone for pv_entries was missing. The system should be usable again.
* Fix some bugs, document vm_zone better. Add copyright to vm_zone.h. Usedyson1997-08-051-2/+1
| | | | | the new zone code in pmap.c so that we can get rid of the ugly ad-hoc allocations in pmap.c.
* Modify pmap to use our new memory allocator. Also, change the vm_map_entrydyson1997-08-051-1/+2
| | | | allocations to be interrupt safe.
* Add support for 4MB pages. This includes the .text, .data, .data partsdyson1997-07-171-1/+2
| | | | | | | | of the kernel, and also most of the dynamic parts of the kernel. Additionally, 4MB pages will be allocated for display buffers as appropriate (only.) The 4MB support for SMP isn't complete, but doesn't interfere with operation either.
* Fully implement vfork. Vfork is now much much faster than even ourdyson1997-04-131-1/+2
| | | | | | | | | | | | | | | | | fork. (On my machine, fork is about 240usecs, vfork is 78usecs.) Implement rfork(!RFPROC !RFMEM), which allows a thread to divorce its memory from the other threads of a group. Implement rfork(!RFPROC RFCFDG), which closes all file descriptors, eliminating possible existing shares with other threads/processes. Implement rfork(!RFPROC RFFDG), which divorces the file descriptors for a thread from the rest of the group. Fix the case where a thread does an exec. It is almost nonsense for a thread to modify the other threads address space by an exec, so we now automatically divorce the address space before modifying it.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Prepare better for multi-platform by eliminating another requireddyson1997-01-111-2/+1
| | | | | pmap routine (pmap_is_referenced.) Upper level recoded to use pmap_ts_referenced.
* Move much of the machine dependent code from vm_glue.c intodyson1996-10-151-1/+5
| | | | | pmap.c. Along with the improved organization, small proc fork performance is now about 5%-10% faster.
* Addition of page coloring support. Various levels of coloring are afforded.dyson1996-09-081-1/+2
| | | | | | The default level works with minimal overhead, but one can also enable full, efficient use of a 512K cache. (Parameters can be generated to support arbitrary cache sizes also.)
* Backed out the recent changes/enhancements to the VM code. Thedyson1996-07-301-5/+5
| | | | | | | problem with the 'shell scripts' was found, but there was a 'strange' problem found with a 486 laptop that we could not find. This commit backs the code back to 25-jul, and will be re-entered after the snapshot in smaller (more easily tested) chunks.
* Clean up some lint.dyson1996-07-271-3/+3
|
* Missing (prototype) change from the previous commit.dyson1996-07-271-2/+2
|
* Several bugfixes/improvements:dyson1996-06-171-1/+2
| | | | | | | | | | | | | | | | | | | | 1) Make it much less likely to miss a wakeup in vm_page_free_wakeup 2) Create a new entry point into pmap: pmap_ts_referenced, eliminates the need to scan the pv lists twice in many cases. Perhaps there is alot more to do here to work on minimizing pv list manipulation 3) Minor improvements to vm_pageout including the use of pmap_ts_ref. 4) Major changes and code improvement to pmap. This code has had several serious bugs in page table page manipulation. In order to simplify the problem, and hopefully solve it for once and all, page table pages are no longer "managed" with the pv list stuff. Page table pages are only (mapped and held/wired) or (free and unused) now. Page table pages are never inactive, active or cached. These changes have probably fixed the hold count problems, but if they haven't, then the code is simpler anyway for future bugfixing. 5) The pmap code has been sorely in need of re-organization, and I have taken a first (of probably many) steps. Please tell me if you have any ideas.
* Initial support for mincore and madvise. Both are almost fullydyson1996-05-191-2/+5
| | | | | supported, except madvise does not page in with MADV_WILLNEED, and MADV_DONTNEED doesn't force dirty pages out.
* Add a function prototype for pmap_prefault.dyson1996-03-281-1/+3
|
* Cleaned up prototypes in pmap headers: removed ones for nonexistentbde1995-12-171-41/+36
| | | | | functions; moved misplaced ones; restored most of KNFish formatting from 4.4lite version; removed bogus __BEGIN/END_DECLS.
* Fixed 1TB filesize changes. Some pindexes had bogus names and typesbde1995-12-171-1/+3
| | | | but worked because vm_pindex_t is indistinuishable from vm_offset_t.
* These changes embody the support of the fully coherent merged VM buffer cache,dg1995-01-091-41/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | much higher filesystem I/O performance, and much better paging performance. It represents the culmination of over 6 months of R&D. The majority of the merged VM/cache work is by John Dyson. The following highlights the most significant changes. Additionally, there are (mostly minor) changes to the various filesystem modules (nfs, msdosfs, etc) to support the new VM/buffer scheme. vfs_bio.c: Significant rewrite of most of vfs_bio to support the merged VM buffer cache scheme. The scheme is almost fully compatible with the old filesystem interface. Significant improvement in the number of opportunities for write clustering. vfs_cluster.c, vfs_subr.c Upgrade and performance enhancements in vfs layer code to support merged VM/buffer cache. Fixup of vfs_cluster to eliminate the bogus pagemove stuff. vm_object.c: Yet more improvements in the collapse code. Elimination of some windows that can cause list corruption. vm_pageout.c: Fixed it, it really works better now. Somehow in 2.0, some "enhancements" broke the code. This code has been reworked from the ground-up. vm_fault.c, vm_page.c, pmap.c, vm_object.c Support for small-block filesystems with merged VM/buffer cache scheme. pmap.c vm_map.c Dynamic kernel VM size, now we dont have to pre-allocate excessive numbers of kernel PTs. vm_glue.c Much simpler and more effective swapping code. No more gratuitous swapping. proc.h Fixed the problem that the p_lock flag was not being cleared on a fork. swap_pager.c, vnode_pager.c Removal of old vfs_bio cruft to support the past pseudo-coherency. Now the code doesn't need it anymore. machdep.c Changes to better support the parameter values for the merged VM/buffer cache scheme. machdep.c, kern_exec.c, vm_glue.c Implemented a seperate submap for temporary exec string space and another one to contain process upages. This eliminates all map fragmentation problems that previously existed. ffs_inode.c, ufs_inode.c, ufs_readwrite.c Changes for merged VM/buffer cache. Add "bypass" support for sneaking in on busy buffers. Submitted by: John Dyson and David Greenman
* pmap.h:bde1994-11-141-1/+3
| | | | | | | | | | | | | Disable the bogus declaration of pmap_bootstrap(). Since its arg list is machine-dependent, it must be declared in a machine-dependent header. vm_page.h: Change `inline' to `__inline' and old-style function parameter lists for inlined functions to new-style. `inline' and old-style function parameter lists should never be used in system headers, even in very machine-dependent ones, because they cause warnings from gcc -Wreally-all.
* Removed all vestiges of tlbflush(). Replaced them with calls to pmap_update().dg1994-09-021-2/+1
| | | | Made pmap_update an inline assembly function.
* Fixed various prototype problems with the pmap functions and the subsequentdg1994-08-061-31/+31
| | | | problems that fixing them caused.
* Added $Id$dg1994-08-021-1/+3
|
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+122
OpenPOWER on IntegriCloud