summaryrefslogtreecommitdiffstats
path: root/sys/vm
Commit message (Collapse)AuthorAgeFilesLines
* Implemented zero-copy TCP/IP extensions via sendfile(2) - send adg1998-11-051-3/+1
| | | | | | | | | | | file to a stream socket. sendfile(2) is similar to implementations in HP-UX, Linux, and other systems, but the API is more extensive and addresses many of the complaints that the Apache Group and others have had with those other implementations. Thanks to Marc Slemko of the Apache Group for helping me work out the best API for this. Anyway, this has the "net" result of speeding up sends of files over TCP/IP sockets by about 10X (that is to say, uses 1/10th of the CPU cycles) when compared to a traditional read/write loop.
* Add John Dyson's SYSCTL descriptions, and an export of more stats topeter1998-10-313-16/+118
| | | | | a sysctl hierarchy (vm.stats.*). SYSCTL descriptions are only present in source, they do not get compiled into the binaries taking up memory.
* Use TAILQ macros for clean/dirty block list processing. Set b_xflagspeter1998-10-312-5/+5
| | | | rather than abusing the list next pointer with a magic number.
* Fixed wrong comments in and about vm_page_deactivate().dg1998-10-281-13/+3
|
* Added a second argument, "activate" to the vm_page_unwire() call so thatdg1998-10-283-11/+19
| | | | the caller can select either inactive or active queue to put the page on.
* Added needed splvm() protection around object page traversal indg1998-10-271-1/+4
| | | | vm_object_terminate().
* Don't follow null bdevsw pointers. The `major(dev) < nblkdev' test rottedbde1998-10-251-7/+4
| | | | | | | | | | | | when bdevsw[] became sparse. We still depend on magic to avoid having to check that (v_rdev) device numbers in vnodes are not NODEV. Removed a redundant `major(dev) < nblkdev' test instead of updating it. Don't follow a garbage bdevsw pointer for attempts to swap on empty regular files. This case currently can't happen. Swapping on regular files is ifdefed out in swapon() and isn't attempted for empty files in nfs_mountroot().
* Nitpicking and dusting performed on a train. Removes trivial warningsphk1998-10-255-23/+9
| | | | about unused variables, labels and other lint.
* Oops, revert part of last fix. vm_pager_dealloc() can't be called untildg1998-10-231-7/+8
| | | | | after the pages are removed from the object...so fix the problem by not printing the diagnostic for wired fictitious pages (which is normal).
* Fixed two bugs in recent commit: in vm_object_terminate, vm_pager_deallocdg1998-10-231-8/+10
| | | | | | | | needs to be called prior to freeing remaining pages in the object so that the device pager has an opportunity to grab its "fake" pages. Also, in the case of wired pages, the page must be made busy prior to calling vm_page_remove. This is a difference from 2.2.x that I overlooked when I brought these changes forward.
* Make the VM system handle the case where a terminating object containsdg1998-10-221-43/+31
| | | | | | legitimately wired pages. Currently we print a diagnostic when this happens, but this will be removed soon when it will be common for this to occur with zero-copy TCP/IP buffers.
* Convert fake page allocs to use the zone allocator, thus eliminating thedg1998-10-221-14/+8
| | | | private pool management code in here.
* Set m->object to NULL in dev_pager_getfake().dg1998-10-211-1/+2
|
* Nuked PG_TABLED flag. Replaced with m->object != NULL.dg1998-10-212-10/+5
|
* Add a diagnostic printf for freeing a wired page. This will eventuallydg1998-10-211-1/+2
| | | | | be turned into a panic, but I want to make sure that all cases of freeing pages with wire_count==1 (which is/was allowed) have first been fixed.
* Fixed two potentially serious classes of bugs:dg1998-10-1311-45/+47
| | | | | | | | | | | | | | | | 1) The vnode pager wasn't properly tracking the file size due to "size" being page rounded in some cases and not in others. This sometimes resulted in corrupted files. First noticed by Terry Lambert. Fixed by changing the "size" pager_alloc parameter to be a 64bit byte value (as opposed to a 32bit page index) and changing the pagers and their callers to deal with this properly. 2) Fixed a bogus type cast in round_page() and trunc_page() that caused some 64bit offsets and sizes to be scrambled. Removing the cast required adding casts at a few dozen callers. There may be problems with other bogus casts in close-by macros. A quick check seemed to indicate that those were okay, however.
* Fix a panic on SMP systems, caused by sleeping while holding ajdp1998-10-091-1/+13
| | | | | | | | | | | | | | | | | | | simple-lock. The reviewer raises the following caveat: "I believe these changes open a non-critical race condition when adding memory to the pool for the zone. I think what will happen is that you could have two threads that are simultaneously adding additional memory when the pool runs out. This appears to not be a problem, however, since the re-aquisition of the lock will protect the list pointers." The submitter agrees that the race is non-critical, and points out that it already existed for the non-SMP case. He suggests that perhaps a sleep lock (using the lock manager) should be used to close that race. This might be worth revisiting after 3.0 is released. Reviewed by: dg (David Greenman) Submitted by: tegge (Tor Egge)
* Fix a bug in which a page index was used where a byte offset wasjdp1998-10-011-2/+2
| | | | | | | | | | expected. This bug caused builds of Modula-3 to fail in mysterious ways on SMP kernels. More precisely, such builds failed on systems with kern.fast_vfork equal to 0, the default and only supported value for SMP kernels. PR: kern/7468 Submitted by: tegge (Tor Egge)
* Make #define NO_SWAPPING a normal kernel config option.abial1998-09-292-2/+4
| | | | Reviewed by: jkh
* John Dyson approved of this solution; make vnode_pager_input_old set m->validrvb1998-09-281-1/+3
|
* Be more selctive about when we clear p->valid.dg1998-09-281-3/+5
| | | | Submitted by: John Dyson <toor@dyson.iquest.net>
* Removed unused file.bde1998-09-201-46/+0
|
* Instantiate `nfs_mount_type' in a standard file so that it is presentbde1998-09-051-3/+2
| | | | | | | | when nfs is an LKM. Declare it in a header file. Don't forget to use it in non-Lite2 code. Initialize it to -1 instead of to 0, since 0 will soon be the mount type number for the first vfs loaded. NetBSD uses strcmp() to avoid this ugly global.
* Cosmetic changes to the PAGE_XXX macros to make them consistent withdfr1998-09-0410-104/+130
| | | | the other objects in vm.
* Separate wakeup conditions for page I/O count (pg_busy) and lock (PG_BUSY).wollman1998-09-011-4/+3
| | | | | | | This is not sa completely solution to the deadlock, but the additional wakeups have helped in my observation. Suggested by: John Dyson
* Fix a rounding problem that causes vnode pager to fail to remove the lastluoqi1998-08-251-11/+9
| | | | | | partially filled page during a truncation. PR: kern/7422
* Change various syscalls to use size_t arguments instead of u_int.dfr1998-08-2412-119/+143
| | | | | | | | | | Add some overflow checks to read/write (from bde). Change all modifications to vm_page::flags, vm_page::busy, vm_object::flags and vm_object::paging_in_progress to use operations which are not interruptable. Reviewed by: Bruce Evans <bde@zeta.org.au>
* Correct/clarify some comments.mckay1998-08-221-3/+3
|
* Protect all modifications to paging_in_progress with splvm().dfr1998-08-131-1/+3
|
* Protect all modifications to paging_in_progress with splvm(). The i386dfr1998-08-065-14/+25
| | | | | | | | | managed to avoid corruption of this variable by luck (the compiler used a memory read-modify-write instruction which wasn't interruptable) but other architectures cannot. With this change, I am now able to 'make buildworld' on the alpha (sfx: the crowd goes wild...)
* Fixed two spl nesting bugs. They caused (at least) the entire pageoutbde1998-07-281-2/+2
| | | | | | | daemon to run at splvm() forever after swap_pager_putpages() is called from vm_pageout_scan(). Broken in: rev.1.189 (1998/02/23)
* Notify pmap when a page is freed on the alpha to allow it to clean updfr1998-07-262-2/+9
| | | | its emulated modified/referenced bits.
* Improved pager input failure message.dg1998-07-221-3/+3
|
* There is a comment in vm_param.h which doesn't belong to thephk1998-07-221-5/+1
| | | | | | | | | code still left in there. The macros it describes disapeared some- time since 4.4BSD lite. PR: 7246 Reviewed by: phk Submitted by: Stefan Eggers <seggers@semyam.dinoco.de>
* Cast pointers to [u]intptr_t instead of to [unsigned] long.bde1998-07-151-2/+2
|
* Cast pointers to uintptr_t/intptr_t instead of to u_long/long,bde1998-07-152-5/+5
| | | | | | | respectively. Most of the longs should probably have been u_longs, but this changes is just to prevent warnings about casts between pointers and integers of different sizes, not to fix poorly chosen types.
* Print pointers using %p instead of attempting to print them bybde1998-07-141-12/+13
| | | | | | casting them to long, etc. Fixed some nearby printf bogons (sign errors not warned about by gcc, and style bugs, but not truncation of vm_ooffset_t's).
* Print pointers using %p instead of attempting to print them bybde1998-07-141-14/+17
| | | | | | | | | casting them to long, etc. Fixed some nearby printf bogons (sign errors not warned about by gcc, and style bugs, but not truncation of vm_ooffset_t's). Use slightly less bogus casts for passing pointers to ddb command functions.
* Fixed printf format errors.bde1998-07-111-2/+2
|
* Fixed printf format errors.bde1998-07-113-12/+20
|
* Fixed printf format errors.bde1998-07-114-17/+23
|
* Removed no longer valid comment about swb_block being int instead ofalex1998-07-101-2/+2
| | | | | | | daddr_t. PR: 7238 Submitted by: Stefan Eggers <seggers@semyam.dinoco.de>
* Removed unnecessary test from if/else construct.alex1998-07-101-2/+2
| | | | | PR: 7233 Submitted by: Stefan Eggers <seggers@semyam.dinoco.de>
* Don't truncate the return value of mmap to sizeof(int).dfr1998-07-051-2/+2
|
* There is no such thing any more as "struct bdevsw".julian1998-07-041-7/+23
| | | | | | | | | | | | | | | | | | There is only cdevsw (which should be renamed in a later edit to deventry or something). cdevsw contains the union of what were in both bdevsw an cdevsw entries. The bdevsw[] table stiff exists and is a second pointer to the cdevsw entry of the device. it's major is in d_bmaj rather than d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw). rawread()/rawwrite() went away as part of this though it's not strictly the same patch, just that it involves all the same lines in the drivers. cdroms no longer have write() entries (they did have rawwrite (?)). tapes no longer have support for bdev operations. Reviewed by: Eivind Eklund and Mike Smith Changes suggested by eivind.
* VOP_STRATEGY grows an (struct vnode *) argumentjulian1998-07-043-8/+8
| | | | | | as the value in b_vp is often not really what you want. (and needs to be frobbed). more cleanups will follow this. Reviewed by: Bruce Evans <bde@freebsd.org>
* document some VM paging options for cache sizes:jmg1998-06-301-1/+3
| | | | | | PQ_NOOPT no coloring PQ_LARGECACHE used for 512k/16k cache PQ_HUGECACHE used for 1024k/16k cache
* Remove bdevsw_add(), change the only two users to use bdevsw_add_generic().phk1998-06-251-13/+9
| | | | | | Extend cdevsw to be superset of bdevsw. Remove non-functional bdev lkm support. Teach wcd what the open() args mean.
* Removed unused includes.bde1998-06-213-9/+3
|
* Removed unused includes.bde1998-06-213-7/+3
|
OpenPOWER on IntegriCloud