summaryrefslogtreecommitdiffstats
path: root/sys/vm
Commit message (Collapse)AuthorAgeFilesLines
* $Id$ -> $FreeBSD$peter1999-08-2834-34/+34
|
* Simplify the handling of VCHR and VBLK vnodes using the new dev_t:phk1999-08-261-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the alias list a SLIST. Drop the "fast recycling" optimization of vnodes (including the returning of a prexisting but stale vnode from checkalias). It doesn't buy us anything now that we don't hardlimit vnodes anymore. Rename checkalias2() and checkalias() to addalias() and addaliasu() - which takes dev_t and udev_t arg respectively. Make the revoke syscalls use vcount() instead of VALIASED. Remove VALIASED flag, we don't need it now and it is faster to traverse the much shorter lists than to maintain the flag. vfs_mountedon() can check the dev_t directly, all the vnodes point to the same one. Print the devicename in specfs/vprint(). Remove a couple of stale LFS vnode flags. Remove unimplemented/unused LK_DRAINED;
* When the SYSINIT() was removed, it was replaced with a make_dev on-demandgreen1999-08-241-1/+2
| | | | | | | | | | | creation of /dev/drum via calling swapon. However, the make_dev has a bogus (insofar that it hasn't been added yet) cdevsw, so later we end up crashing with a null pointer dereference on the swap vp's specinfo. The specinfo points to a dev_t with a major of 254 (uninitialized), and we get a crash on its d_strategy being called. The simple solution to this is to call cdevsw_add before the make_dev is ever used. This fixes the panic which occurred upon swapping.
* Use devtoname to print dev_t's instead of casting them to u_long forbde1999-08-231-6/+7
| | | | | | misprinting with %lx. Cast pointers to intptr_t instead of casting them to long. Cosmetic.
* Convert DEVFS hooks in (most) drivers to make_dev().phk1999-08-231-33/+6
| | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev().
* Correct the inconsistent formatting in struct vm_map.alc1999-08-231-2/+2
| | | | Addendum to rev 1.47: submitted by dillon.
* struct vm_map:alc1999-08-231-2/+9
| | | | | | The lock structure cannot be the first element of the vm_map because this can result in livelock between two or more system processes trying to kmem_alloc_wait.
* Remove two unused variable declarations.alc1999-08-221-3/+1
|
* vm_page_alloc and contigmalloc1:alc1999-08-201-3/+3
| | | | | | Verify that free pages are not dirty. Submitted by: dillon
* Update for run queue code.peter1999-08-191-2/+2
|
* Fix breakage - an extra brace got inserted where DIAGNOSTIC was definedmjacob1999-08-181-2/+1
| | | | but MAP_LOCK_DIAGNOSTIC wasn't.
* Unbreak the nfs KLD_MODULE. It needs a bit more of vm_page.h than wasgreen1999-08-171-3/+5
| | | | | exported (notably vm_page_undirty()). Also, let vm_page_dirty() work in a KLD.
* vm_page_free_toq:alc1999-08-171-10/+2
| | | | | Update the comment to reflect the demise of PQ_ZERO and remove a (now) useless test.
* Correct an accidental omission of one "vm_page_undirty" replacementalc1999-08-171-2/+2
| | | | from the previous commit.
* vm_page_free_toq:alc1999-08-171-1/+2
| | | | | | | Clear the dirty bit mask (vm_page_undirty) before adding the page to the free page queue. Submitted by: dillon
* Add the (inline) function vm_page_undirty for clearing the dirty bitmaskalc1999-08-173-6/+18
| | | | | | | | of a vm_page. Use it. Submitted by: dillon
* vm_pageout_clean:alc1999-08-171-27/+1
| | | | | | Remove dead code. Submitted by: dillon
* vm_map_lock*:alc1999-08-161-41/+52
| | | | | | | | Remove semicolons or add "do { } while (0)" as necessary to enable the use of these macros in arbitrary statements. (There are no functional changes.) Submitted by: dillon
* Remove the declarations for "vm_map_t io_map". It's been unusedalc1999-08-153-7/+3
| | | | since i386/i386/machdep rev 1.310, i.e., the demise of BOUNCE_BUFFERS.
* Remove the declarations for "vm_map_t u_map". It's been unusedalc1999-08-153-7/+3
| | | | since i386/i386/pmap rev 1.190. (The alpha never used it.)
* contigmalloc1 (currently) depends on PQ_FREE and PQ_CACHE not being 0alc1999-08-151-2/+2
| | | | | to tell a valid "struct vm_page" from an invalid one in the vm_page_array. This isn't a very robust method.
* Add back in old definitions if we're compiling for alpha.mjacob1999-08-151-1/+10
|
* Don't create a "struct vpgqueues" for PQ_NONE.alc1999-08-141-7/+7
|
* vm_map_madvise:alc1999-08-131-60/+85
| | | | | | | | | A complete rewrite by dillon and myself to separate the implementation of behaviors that effect the vm_map_entry from those that effect the vm_object. A result of this change is that madvise(..., MADV_FREE); is much cheaper.
* The bdevsw() and cdevsw() are now identical, so kill the former.phk1999-08-131-4/+4
|
* Make the default page coloring parameters match a (non-Xeon) Pentium II/III.alc1999-08-121-2/+8
| | | | | | | | | | This setting is also acceptable for Celerons and Pentium Pros with less than 1MB L2 caches. Note: PQ_L2_SIZE is a misnomer. The correct number of colors is a function of the cache's degree of associativity as well as its size. Submitted by: bde and alc
* vm_object_madvise:alc1999-08-121-6/+16
| | | | | | Update the comments to match the implementation. Submitted by: dillon
* vm_object_madvise:alc1999-08-121-9/+11
| | | | | | | Support MADV_DONTNEED and MADV_WILLNEED on object types besides OBJT_DEFAULT and OBJT_SWAP. Submitted by: dillon
* contigmalloc1:alc1999-08-111-7/+5
| | | | | If a page is found in the wrong queue, panic instead of silently ignoring the problem.
* Add a contigfree() as a corollary to contigmalloc() as it's not clearpeter1999-08-101-1/+10
| | | | | which free routine to use and people are tempted to use free() (which doesn't work)
* vm_map_madvise:alc1999-08-101-17/+3
| | | | | | | | Now that behaviors are stored in the vm_map_entry rather than the vm_object, it's no longer necessary to instantiate a vm_object just to hold the behavior. Reviewed by: dillon
* Merge the cons.c and cons.h to the best of my ability. alpha may orphk1999-08-091-2/+2
| | | | may not compile, I can't test it.
* Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,phk1999-08-082-7/+3
| | | | | | a few lines into <sys/vnode.h>. Add a few fields to struct specinfo, paving the way for the fun part.
* Move the memory access behavior information provided by madvisealc1999-08-015-19/+34
| | | | | | from the vm_object to the vm_map. Submitted by: dillon
* Change the type of vpgqueues::lcnt from "int *" to "int". The indirectionalc1999-07-312-20/+18
| | | | served no purpose.
* vm_page_queue_init:alc1999-07-311-9/+4
| | | | | | | | | | | | Remove the initialization of PQ_NONE's cnt and lcnt. They aren't used. vm_page_insert: Remove an unnecessary dereference. vm_page_wire: Remove the one and only (and thus pointless) reference to PQ_NONE's lcnt.
* Reduce the number of "magic constants" used for page coloringalc1999-07-221-7/+1
| | | | | by one: PQ_PRIME2 and PQ_PRIME3 are used to accomplish the same thing at different places in the kernel. Drop PQ_PRIME3.
* Fix the following problem:alc1999-07-213-3/+8
| | | | | | | | | | | | | | | | 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 a dev2budev() function, and use it. This refixes pstat (working, broken,green1999-07-201-2/+2
| | | | | | | working, broken, working) and savecore (working, working, broken, working, working). Sorta Reviewed by: phk
* Convert a "page not busy" warning to an assertion.alc1999-07-201-7/+3
| | | | Submitted by: dillon@backplane.com
* Add a field to struct swdevt to avoid a bogus udev2dev() call.phk1999-07-171-2/+3
|
* I have not one single time remembered the name of this function correctlyphk1999-07-171-2/+2
| | | | so obviously I gave it the wrong name. s/umakedev/makeudev/g
* Remove vm_object::last_read. It is used by the old swap pager, butalc1999-07-163-6/+3
| | | | | | not by the new one, i.e., vm/swap_pager.c rev 1.108. Reviewed by: dillon@backplane.com
* Cleanup OBJ_ONEMAPPING management.alc1999-07-112-15/+5
| | | | | | | | | | | | vm_map.c: Don't set OBJ_ONEMAPPING on arbitrary vm objects. Only default and swap type vm objects should have it set. vm_object_deallocate already handles these cases. vm_object.c: If OBJ_ONEMAPPING isn't already clear in vm_object_shadow, we are in trouble. Instead of clearing it, make it an assertion that it is already clear.
* Change the data type used to represent page color in the vm_objectalc1999-07-101-2/+2
| | | | | to be the same as that used in the vm_page. (This change also shrinks the vm_object.)
* Remove unused function prototypes.alc1999-07-101-3/+1
|
* add unused argument to udev2dev() to make kernel compiledache1999-07-071-2/+2
|
* Reinstate the previous fix for the broken export of a dev_t in sw_dev, convertmsmith1999-07-071-3/+3
| | | | back to a dev_t when the value is actually used.
* Back out previous commit. It was wrong, and caused panics.green1999-07-071-1/+1
|
* swdevt should contain a udev_t not a devt. This resulted in bogusmsmith1999-07-061-2/+2
| | | | | | swap device name reporting. Submitted by: Bill Swingle <unfurl@freebsd.org>
OpenPOWER on IntegriCloud