summaryrefslogtreecommitdiffstats
path: root/sys/vm
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate some dead code. (Any possible use for this code died withalc2002-12-231-4/+0
| | | | | | vm/vm_page.c revision 1.220.) Submitted by: bde
* The UP -current was not properly counting the per-cpu VM stats in thedillon2002-12-221-0/+3
| | | | | | | sysctl code. This makes 'systat -vm 1's syscall count work again. Submitted by: Michal Mertl <mime@traveller.cz> Note: also slated for 5.0
* Increase the scope of the kmem_object locking in kmem_malloc().alc2002-12-201-3/+5
|
* Add a mutex to struct vm_object. Initialize and destroy that mutexalc2002-12-202-2/+11
| | | | | at appropriate times. For the moment, the mutex is only used on the kmem_object.
* Remove the hash_rand field from struct vm_object. As of revision 1.215 ofalc2002-12-192-13/+1
| | | | vm/vm_page.c, it is unused.
* - Remove vm_page_sleep_busy(). The transition to vm_page_sleep_if_busy(),alc2002-12-192-35/+2
| | | | | | which incorporates page queue and field locking, is complete. - Assert that the page queue lock rather than Giant is held in vm_page_flag_set().
* - Hold the page queues lock when performing vm_page_busy() oralc2002-12-191-1/+7
| | | | | | vm_page_flag_set(). - Replace vm_page_sleep_busy() with proper page queues locking and vm_page_sleep_if_busy().
* - Hold the page queues lock when performing vm_page_busy().alc2002-12-181-2/+5
| | | | | - Replace vm_page_sleep_busy() with proper page queues locking and vm_page_sleep_if_busy().
* Hold the page queues lock when performing vm_page_flag_set().alc2002-12-182-1/+9
|
* Hold the page queues lock when performing vm_page_flag_set().alc2002-12-172-1/+3
|
* Change the way ELF coredumps are handled. Instead of unconditionallydillon2002-12-161-0/+1
| | | | | | | | | | | | | | | | | | | skipping read-only pages, which can result in valuable non-text-related data not getting dumped, the ELF loader and the dynamic loader now mark read-only text pages NOCORE and the coredump code only checks (primarily) for complete inaccessibility of the page or NOCORE being set. Certain applications which map large amounts of read-only data will produce much larger cores. A new sysctl has been added, debug.elf_legacy_coredump, which will revert to the old behavior. This commit represents collaborative work by all parties involved. The PR contains a program demonstrating the problem. PR: kern/45994 Submitted by: "Peter Edwards" <pmedwards@eircom.net>, Archie Cobbs <archie@dellroad.org> Reviewed by: jdp, dillon MFC after: 7 days
* Perform vm_object_lock() and vm_object_unlock() on kmem_objectalc2002-12-151-0/+4
| | | | around vm_page_lookup() and vm_page_free().
* This is David Schultz's swapoff code which I am finally able to commit.dillon2002-12-155-8/+339
| | | | | | | This should be considered highly experimental for the moment. Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU> MFC after: 3 weeks
* Fix a refcount race with the vmspace structure. In order to preventdillon2002-12-152-8/+19
| | | | | | | | | | | | | | | | | | resource starvation we clean-up as much of the vmspace structure as we can when the last process using it exits. The rest of the structure is cleaned up when it is reaped. But since exit1() decrements the ref count it is possible for a double-free to occur if someone else, such as the process swapout code, references and then dereferences the structure. Additionally, the final cleanup of the structure should not occur until the last process referencing it is reaped. This commit solves the problem by introducing a secondary reference count, calling 'vm_exitingcnt'. The normal reference count is decremented on exit and vm_exitingcnt is incremented. vm_exitingcnt is decremented when the process is reaped. When both vm_exitingcnt and vm_refcnt are 0, the structure is freed for real. MFC after: 3 weeks
* As per the comments, vm_object_page_remove() now expects its caller to lockalc2002-12-151-8/+2
| | | | the object (i.e., acquire Giant).
* Perform vm_object_lock() and vm_object_unlock() aroundalc2002-12-151-2/+8
| | | | vm_object_page_remove().
* Perform vm_object_lock() and vm_object_unlock() aroundalc2002-12-151-0/+2
| | | | vm_object_page_remove().
* Assert that the page queues lock is held in vm_page_unhold(),alc2002-12-151-2/+4
| | | | vm_page_remove(), and vm_page_free_toq().
* Hold the page queues lock when calling pmap_protect(); it updates fieldsalc2002-12-011-7/+22
| | | | | | | of the vm_page structure. Make the style of the pmap_protect() calls consistent. Approved by: re (blanket)
* Hold the page queues lock when calling pmap_protect(); it updates fieldsalc2002-12-011-3/+5
| | | | | | | of the vm_page structure. Nearby, remove an unnecessary semicolon and return statement. Approved by: re (blanket)
* Increase the scope of the page queue lock in vm_pageout_scan().alc2002-12-011-2/+2
| | | | Approved by: re (blanket)
* Lock page field accesses in mincore().alc2002-11-281-0/+2
| | | | Approved by: re (blanket)
* Hold the page queues lock when performing pmap_clear_modify().alc2002-11-271-0/+4
| | | | Approved by: re (blanket)
* Hold the page queues lock while performing pmap_page_protect().alc2002-11-271-2/+4
| | | | Approved by: re (blanket)
* Acquire and release the page queues lock around calls to pmap_protect()alc2002-11-251-0/+4
| | | | | | because it updates flags within the vm page. Approved by: re (blanket)
* Extend the scope of the page queues/fields locking in vm_freeze_copyopts()alc2002-11-241-1/+3
| | | | | | to cover pmap_remove_all(). Approved by: re
* Hold the page queues/flags lock when calling vm_page_set_validclean().alc2002-11-232-1/+5
| | | | Approved by: re
* Assert that the page queues lock rather than Giant is held inalc2002-11-231-2/+3
| | | | | | vm_pageout_page_free(). Approved by: re
* Add page queue and flag locking in vnode_pager_setsize().alc2002-11-231-0/+2
| | | | Approved by: re
* - Add an event that is triggered when the system is low on memory. This isjeff2002-11-211-1/+9
| | | | | | | | | intended to be used by significant memory consumers so that they may drain some of their caches. Inspired by: phk Approved by: re Tested on: x86, alpha
* - Wakeup the correct address when a zone is no longer full.jeff2002-11-181-1/+1
| | | | Spotted by: jake
* Remove vm_page_protect(). Instead, use pmap_page_protect() directly.alc2002-11-185-30/+8
|
* - Don't forget the flags value when using boot pages.jeff2002-11-161-0/+1
| | | | Reported by: grehan
* Now that pmap_remove_all() is exported by our pmap implementationsalc2002-11-165-19/+19
| | | | use it directly.
* Remove dead code that hasn't been needed since the demise of share mapsalc2002-11-132-26/+0
| | | | in various revisions of vm/vm_map.c between 1.148 and 1.153.
* Move pmap_collect() out of the machine-dependent code, rename italc2002-11-132-2/+33
| | | | | | | | to reflect its new location, and add page queue and flag locking. Notes: (1) alpha, i386, and ia64 had identical implementations of pmap_collect() in terms of machine-independent interfaces; (2) sparc64 doesn't require it; (3) powerpc had it as a TODO.
* Remove extra #include<sys/vmmeter.h>.cognet2002-11-111-1/+0
|
* atomic_set_8 isn't MI. Instead, follow Jake's suggestions aboutmjacob2002-11-113-5/+7
| | | | ZONE_LOCK.
* - Clear the page's PG_WRITEABLE flag in the i386's pmap_changebit()alc2002-11-111-0/+1
| | | | | | if we're removing write access from the page's PTEs. - Export pmap_remove_all() on alpha, i386, and ia64. (It's already exported on sparc64.)
* Use atomic_set_8 on the us_freelist maps as they are not otherwisemjacob2002-11-101-2/+2
| | | | | | protected. Furthermore, in some RISC architectures with no normal byte operations, the surrounding 3 bytes are also affected by the read-modify-write that has to occur.
* When prot is VM_PROT_NONE, call pmap_page_protect() directly rather thanalc2002-11-105-19/+19
| | | | | | | | | indirectly through vm_page_protect(). The one remaining page flag that is updated by vm_page_protect() is already being updated by our various pmap implementations. Note: A later commit will similarly change the VM_PROT_READ case and eliminate vm_page_protect().
* Fix an error case in vm_map_wire(): unwiring of an entry during cleanupalc2002-11-091-2/+2
| | | | | | after a user wire error fails when the entry is already system wired. Reported by: tegge
* In vm_page_remove(), avoid calling vm_page_splay() if the object's memqalc2002-11-091-10/+13
| | | | is empty.
* Move the definitions of the hw.physmem, hw.usermem and hw.availpagestmm2002-11-071-0/+2
| | | | | | | | | | | sysctls to MI code; this reduces code duplication and makes all of them available on sparc64, and the latter two on powerpc. The semantics by the i386 and pc98 hw.availpages is slightly changed: previously, holes between ranges of available pages would be included, while they are excluded now. The new behaviour should be more correct and brings i386 in line with the other architectures. Move physmem to vm/vm_init.c, where this variable is used in MI code.
* Better printf() formats.mux2002-11-071-8/+7
|
* Some more printf() format fixes.mux2002-11-071-9/+7
|
* Correctly print vm_offset_t types.mux2002-11-071-6/+5
|
* Export the function vm_page_splay().alc2002-11-042-1/+2
|
* - Remove the memory allocation for the object/offset hash tablealc2002-11-031-45/+2
| | | | | | | | because it's no longer used. (See revision 1.215.) - Fix a harmless bug: the number of vm_page structures allocated wasn't properly adjusted when uma_bootstrap() was introduced. Consequently, we were allocating 30 unused vm_page structures. - Wrap a long line.
* Remove the vm page buckets mutex. As of revision 1.215 of vm/vm_page.c,alc2002-11-021-2/+0
| | | | it is unused.
OpenPOWER on IntegriCloud