summaryrefslogtreecommitdiffstats
path: root/sys/vm
Commit message (Collapse)AuthorAgeFilesLines
* Fix some style(9) and formatting problems. tabsize 4 formatting doesn'tpeter1997-09-212-104/+122
| | | | | | look too great with 'more' etc. Approved by: dyson (with a minor grumble :-)
* Change the M_NAMEI allocations to use the zone allocator. This changedyson1997-09-215-26/+125
| | | | | | | | plus the previous changes to use the zone allocator decrease the useage of malloc by half. The Zone allocator will be upgradeable to be able to use per CPU-pools, and has more intelligent usage of SPLs. Additionally, it has reasonable stats gathering capabilities, while making most calls inline.
* Update select -> poll in drivers.peter1997-09-141-2/+2
|
* Print correct function name in panicspeter1997-09-131-4/+4
|
* Do not consider VM_PROT_OVERRIDE_WRITE to be part of the protectionjlemon1997-09-121-2/+3
| | | | | | | | entry when handling a fault. This is set by procfs whenever it wants to write to a page, as a means of overriding `r-x COW' entries, but causes failures in the `rwx' case. Submitted by: bde
* Removed yet more vestiges of config-time swap configuration and/orbde1997-09-071-12/+12
| | | | cleaned up nearby cruft.
* Removed unused #includes.bde1997-09-0115-66/+15
|
* Some staticized variables were still declared to be extern.bde1997-09-012-6/+4
|
* Print a device number in hex instead of decimal.bde1997-09-011-2/+2
|
* Change the 0xdeadb hack to a flag called VDOOMED.phk1997-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | Introduce VFREE which indicates that vnode is on freelist. Rename vholdrele() to vdrop(). Create vfree() and vbusy() to add/delete vnode from freelist. Add vfree()/vbusy() to keep (v_holdcnt != 0 || v_usecount != 0) vnodes off the freelist. Generalize vhold()/v_holdcnt to mean "do not recycle". Fix reassignbuf()s lack of use of vhold(). Use vhold() instead of checking v_cache_src list. Remove vtouch(), the vnodes are always vget'ed soon enough after for it to have any measuable effect. Add sysctl debug.freevnodes to keep track of things. Move cache_purge() up in getnewvnodes to avoid race. Decrement v_usecount after VOP_INACTIVE(), put a vhold() on it during VOP_INACTIVE() Unmacroize vhold()/vdrop() Print out VDOOMED and VFREE flags (XXX: should use %b) Reviewed by: dyson
* Allow non-page aligned file offset mmap's, providing that the system ispeter1997-08-301-23/+47
| | | | | | | | | | allowed to choose the address, or that the MAP_FIXED address has the same remainder when modulo PAGE_SIZE as the file offset. Apparently this is posix1003.1b specified behavior. SVR4 and the other *BSD's allow it too. It costs us nothing to support and means we don't get EINVAL on some mmap code that works perfectly elsewhere. Obtained from: NetBSD
* Fixed type mismatches for functions with args of type vm_prot_t and/orbde1997-08-258-92/+44
| | | | | | | | | vm_inherit_t. These types are smaller than ints, so the prototypes should have used the promoted type (int) to match the old-style function definitions. They use just vm_prot_t and/or vm_inherit_t. This depends on gcc features to work. I fixed the definitions since this is easiest. The correct fix may be to change the small types to u_int, to optimize for time instead of space.
* This is a trial improvement for the vnode reference count while on the vnodedyson1997-08-221-2/+1
| | | | | | free list problem. Also, the vnode age flag is no longer used by the vnode pager. (It is actually incorrect to use then.) Constructive feedback welcome -- just be kind.
* #include <machine/limits.h> explicitly in the few places that it is required.bde1997-08-211-1/+3
|
* Added includes of smp.h for SMP.fsmp1997-08-182-2/+10
| | | | This eliminates a bazillion warnings about implicit s_lock & friends.
* Fix kern_lock so that it will work. Additionally, clean-up some of thedyson1997-08-182-17/+66
| | | | | | | | VM systems usage of the kernel lock (lockmgr) code. This is a first pass implementation, and is expected to evolve as needed. The API for the lock manager code has not changed, but the underlying implementation has changed significantly. This change should not materially affect our current SMP or UP code without non-standard parameters being used.
* The "cutsie" register parameter passing that I had mistakenly used breaksdyson1997-08-101-10/+10
| | | | | profiling. Since it doesn't really improve perf much, I have backed it out.
* More vm_zone cleanup. The sysctl now accounts for items better, anddyson1997-08-072-5/+15
| | | | counts the number of allocations.
* Add exposure of some vm_zone allocation stats by sysctl. Also, changedyson1997-08-063-6/+77
| | | | | the initialization parameters of some zones in VM map. This contains only optimizations and not bugfixes.
* Fixed the commit botch that was causing crashes soon after systemdyson1997-08-052-2/+4
| | | | | startup. Due to the error, the initialization of the zone for pv_entries was missing. The system should be usable again.
* Another attempt at cleaning up the new memory allocator.dyson1997-08-053-76/+167
|
* Fix some bugs, document vm_zone better. Add copyright to vm_zone.h. Usedyson1997-08-052-6/+4
| | | | | 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-052-4/+6
| | | | allocations to be interrupt safe.
* A very simple zone allocator.dyson1997-08-052-0/+309
|
* Get rid of the ad-hoc memory allocator for vm_map_entries, in lieu ofdyson1997-08-056-162/+45
| | | | | a simple, clean zone type allocator. This new allocator will also be used for machine dependent pmap PV entries.
* Removed unused #includes.bde1997-08-023-11/+3
|
* Add the ability for the pageout daemon to measure stats on memory usage beforedyson1997-07-271-14/+122
| | | | | | | | | the system is out of memory. The daemon does a minimal amount of work that increases as the system becomes more likely to run out of memory and page in/out. The default tuning is fairly low in background CPU usage, and sysctl variables have been added to enable flexable operation. This is an experimental feature that will likely be changed and improved over time.
* Fix a very subtile problem that causes unnessary numbers of objects backingdyson1997-07-271-17/+48
| | | | | a single logical object. Submitted by: Alan Cox <alc@cs.rice.edu>
* Add support for 4MB pages. This includes the .text, .data, .data partsdyson1997-07-172-5/+10
| | | | | | | | 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.
* Don't try upgrading an existing exclusive lock in vm_map_user_pageable.tegge1997-06-231-16/+3
| | | | | | This should close PR kern/3180. Also remove a bogus unconditional call to vm_map_unlock_read in vm_map_lookup.
* Kill some stale leftovers from the earlier attempts at SMP per-cpu pagespeter1997-06-223-14/+3
|
* Remove a window during running down a file vnode. Also, the OBJ_DEADdyson1997-06-221-1/+4
| | | | | | flag wasn't being respected during vref(), et. al. Note that this isn't the eventual fix for the locking problem. Fine grained SMP in the VM and VFS code will require (lots) more work.
* Correct the return code for the mlock system call. Also add the stubsdyson1997-06-151-2/+32
| | | | for mlockall and munlockall.
* Fix a reference problem with maps. Only appears to manifest itself whendyson1997-06-151-1/+5
| | | | sharing address spaces.
* Update the #include "opt_smpxxx.h" includes - opt_smp.h isn't neededpeter1997-05-292-3/+3
| | | | very much in the generic parts of the kernel now.
* Fix a few bugs with NFS and mmap caused by NFS' use of b_validoffdfr1997-05-192-3/+8
| | | | | | | | and b_validend. The changes to vfs_bio.c are a bit ugly but hopefully can be tidied up later by a slight redesign. PR: kern/2573, kern/2754, kern/3046 (possibly) Reviewed by: dyson
* Check the correct queue for waking up the pageout daemon. Specifically,dyson1997-05-011-2/+2
| | | | | | the pageout daemon wasn't always being waken up appropriately when the (cache + free) queues were depleted. Submitted by: David S. Miller <davem@jenolan.rutgers.edu>
* Man the liferafts! Here comes the long awaited SMP -> -current merge!peter1997-04-264-4/+17
| | | | | | | | | | | | | | | | There are various options documented in i386/conf/LINT, there is more to come over the next few days. The kernel should run pretty much "as before" without the options to activate SMP mode. There are a handful of known "loose ends" that need to be fixed, but have been put off since the SMP kernel is in a moderately good condition at the moment. This commit is the result of the tinkering and testing over the last 14 months by many people. A special thanks to Steve Passe for implementing the APIC code!
* Send this to the Attic so there's no mixups over which kern_lock.c is inpeter1997-04-211-377/+0
| | | | use in -current.
* Unused variable (upobj is now purely handled within pmap)peter1997-04-141-2/+1
|
* Fully implement vfork. Vfork is now much much faster than even ourdyson1997-04-134-8/+65
| | | | | | | | | | | | | | | | | 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.
* The biggie: Get rid of the UPAGES from the top of the per-process addresspeter1997-04-074-24/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | space. (!) Have each process use the kernel stack and pcb in the kvm space. Since the stacks are at a different address, we cannot copy the stack at fork() and allow the child to return up through the function call tree to return to user mode - create a new execution context and have the new process begin executing from cpu_switch() and go to user mode directly. In theory this should speed up fork a bit. Context switch the tss_esp0 pointer in the common tss. This is a lot simpler since than swithching the gdt[GPROC0_SEL].sd.sd_base pointer to each process's tss since the esp0 pointer is a 32 bit pointer, and the sd_base setting is split into three different bit sections at non-aligned boundaries and requires a lot of twiddling to reset. The 8K of memory at the top of the process space is now empty, and unmapped (and unmappable, it's higher than VM_MAXUSER_ADDRESS). Simplity the pmap code to manage process contexts, we no longer have to double map the UPAGES, this simplifies and should measuably speed up fork(). The following parts came from John Dyson: Set PG_G on the UPAGES that are now in kernel context, and invalidate them when swapping them out. Move the upages object (upobj) from the vmspace to the proc structure. Now that the UPAGES (pcb and kernel stack) are out of user space, make rfork(..RFMEM..) do what was intended by sharing the vmspace entirely via reference counting rather than simply inheriting the mappings.
* Commit a typo fix that's been sitting in my tree for ages, quite forgotten.peter1997-04-061-2/+2
| | | | | | | | | The typo was detected once apon a time with the -Wunused compile option. The result was that a block of code for implementing madvise(.. MADV_SEQUENTIAL..) behavior was "dead" and unused, probably negating the effect of activating the option. Reviewed by: dyson
* Make vm_map_protect be more complete about map simplification. Thisdyson1997-04-061-2/+4
| | | | | | is useful when a process changes it's page range protections very much. Submitted by: Alan Cox <alc@cs.rice.edu>
* Correction to the prototype for vm_fault.dyson1997-04-061-2/+2
|
* Fix the gdb executable modify problem. Thanks to the detective workdyson1997-04-064-17/+31
| | | | | | | | | | | | by Alan Cox <alc@cs.rice.edu>, and his description of the problem. The bug was primarily in procfs_mem, but the mistake likely happened due to the lack of vm system support for the operation. I added better support for selective marking of page dirty flags so that vm_map_pageable(wiring) will not cause this problem again. The code in procfs_mem is now less bogus (but maybe still a little so.)
* Removed potentially harmful garbage <vm/lock.h> and fixed bogusbde1997-04-011-117/+0
| | | | | | use of it. It was actually harmless because the use was null due to fortuitous include orders and identical (wrong) idempotency macros.
* Changed the way that the exec image header is read to be filesystem-dg1997-03-312-4/+2
| | | | | | | centric rather than VM-centric to fix a problem with errors not being detectable when the header is read. Killed exech_map as a result of these changes. There appears to be no performance difference with this change.
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-03-232-3/+4
| | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all.
* Fix a significant error in the accounting for pre-zeroed pages. Thisdyson1997-03-231-5/+6
| | | | is a candidate for RELENG_2_2...
OpenPOWER on IntegriCloud