Commit Graph

182 Commits

Author SHA1 Message Date
dg
421cb9f144 Fixed a logic bug that caused the vmdaemon to not wake up when intended.
Submitted by:	John Dyson
1995-04-17 10:00:55 +00:00
dg
55264c56ce Removed obsolete/unused variable declarations. Killed externs and included
appropriate include files.
1995-04-16 14:12:15 +00:00
dg
7a85187013 Removed obsolete/unused variable declarations.
Removed some extern declarations and included the correct include files.
1995-04-16 13:58:42 +00:00
dg
a616136616 Moved some zero-initialized variables into .bss. Made code intended to be
called only from DDB #ifdef DDB. Removed some completely unused globals.
1995-04-16 12:56:22 +00:00
dg
007e9bf8a2 Removed gratuitous m->blah=0 assignments when initializing the vm_page
structs in vm_page_startup(). The vm_page structs are already completely
zeroed.
1995-04-16 11:50:45 +00:00
dg
d1c8e78413 Make "print_page_info" #ifdef DDB. 1995-04-16 09:59:16 +00:00
dg
9122e1cc39 Fixed a few bugs in vm_object_page_clean, mostly related to not syncing
pages that are in FS buffers. This fixes the (believed to already have been
fixed) problem with msync() not doing it's job...in other words, the
stuff that Andrew has continuously been complaining about.

Submitted by:	John Dyson, w/minor changes by me.
1995-04-16 03:11:28 +00:00
dg
b804a53282 Changes from John Dyson and myself:
Fixed remaining known bugs in the buffer IO and VM system.

vfs_bio.c:
Fixed some race conditions and locking bugs. Improved performance
by removing some (now) unnecessary code and fixing some broken
logic.
Fixed process accounting of # of FS outputs.
Properly handle NFS interrupts (B_EINTR).

(various)
Replaced calls to clrbuf() with calls to an optimized routine
called vfs_bio_clrbuf().

(various FS sync)
Sync out modified vnode_pager backed pages.

ffs_vnops.c:
Do two passes: Sync out file data first, then indirect blocks.

vm_fault.c:
Fixed deadly embrace caused by acquiring locks in the wrong order.

vnode_pager.c:
Changed to use buffer I/O system for writing out modified pages. This
should fix the problem with the modification date previous not getting
updated. Also dramatically simplifies the code. Note that this is
going to change in the future and be implemented via VOP_PUTPAGES().

vm_object.c:
Fixed a pile of bugs related to cleaning (vnode) objects. The performance
of vm_object_page_clean() is terrible when dealing with huge objects,
but this will change when we implement a binary tree to keep the object
pages sorted.

vm_pageout.c:
Fixed broken clustering of pageouts. Fixed race conditions and other
lockup style bugs in the scanning of pages. Improved performance.
1995-04-09 06:03:56 +00:00
bde
4f64fe43e7 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) that I didn't notice when I fixed
"all" such warnings before.
1995-03-28 07:58:53 +00:00
dg
a2d4bff195 Fixed typo...using wrong variable in page_shortage calculation. 1995-03-28 05:58:35 +00:00
dg
3fb870b9c6 Fixed "pages freed by daemon" statistic (again). 1995-03-28 05:35:29 +00:00
dg
eae6c57cbf Explicitly set page dirty if this is a write fault - reduces calls to
pmap_is_modified() later.
1995-03-27 02:41:00 +00:00
dg
d96b62fac0 Removed some obsolete flags.
Submitted by:   John Dyson
1995-03-26 23:33:14 +00:00
dg
1648fcf733 Fix logic bug I just introduced with the flags to msync(). 1995-03-25 17:44:03 +00:00
dg
fcc9f4c4df Pass syncio flag to vm_object_clean(). It remains unimplemented, however. 1995-03-25 17:36:57 +00:00
dg
28ae667091 Disallow both MS_ASYNC and MS_INVALIDATE flags being set at the same time
in msync().
1995-03-25 17:36:00 +00:00
dg
05c4d98f93 Added "flags" argument to msync, and implemented MS_ASYNC and MS_INVALIDATE.
The MS_ASYNC flag doesn't current work, and MS_INVALIDATE will only toss out
the pages in the address space (not all pages in the shadow chain).
1995-03-25 16:55:46 +00:00
dg
cb824fb34c Implemented cnt.v_reactivated and moved vm_page_activate() routine to
before vm_page_deactivate().
1995-03-25 08:47:35 +00:00
dg
0785cceb5c Removed (almost) meaningless "object cache lookups/hits" statistic. In
our framework, these numbers will usually be nearly the same, and not
because of any sort of high 'hit rate'.
1995-03-25 08:42:14 +00:00
dg
e716d0f491 Removed cnt.v_nzfod: In our current scheme of things it is not possible
to accurately track this. It isn't an indicator of resource consumption
anyway.
Removed cnt.v_kernel_pages: We don't implement this and doing so accurately
would be very difficult (and ambiguous - since process pages are often
double mapped in the kernel and the process address spaces).
1995-03-25 06:09:33 +00:00
dg
559c6d8623 Fixed warning caused by returning a value in a void function (introduced
in a recent commit by me). Relaxed checks before calling vm_object_remove;
a non-internal object always has a pager.
1995-03-23 05:19:44 +00:00
dg
4aa8152029 Removed unused fifth argument to vm_object_page_clean(). Fixed bug with
VTEXT not always getting cleared when it is supposed to. Added check to
make sure that vm_object_remove() isn't called with a NULL pager or for
a pager for an OBJ_INTERNAL object (neither of which will be on the hash
list). Clear OBJ_CANPERSIST if we decide to terminate it because of no
resident pages.
1995-03-22 12:24:11 +00:00
dg
ae4e410e30 Fixed potential sleep/wakeup race conditional with splhigh().
Submitted by:	John Dyson
1995-03-22 08:08:44 +00:00
dg
08726c6d9b Added a check for wrong object size; print a warning, but deal with it
correctly. The warning will tell us that there is a bug somewhere else
in sizing the object correctly.

Submitted by:	John Dyson
1995-03-22 05:12:18 +00:00
dg
0c24a80ae8 Fixed bug in vm_mmap() where the object that is created in some cases
was the wrong size. This is the likely cause of panics reported by
Lars Fredriksen and Paul Richards related to a -1 blkno when paging
via the swap_pager.

Submitted by:	John Dyson
1995-03-22 05:08:41 +00:00
dg
ac5103f248 Removed unused variable declaration missed in previous commit. 1995-03-21 23:09:53 +00:00
dg
276405b98d Removed do-nothing VOP_UPDATE() call. 1995-03-21 23:07:19 +00:00
dg
0d274572e3 Disallow non page-aligned file offsets in vm_mmap(). We don't support this
in either the high or low level parts of the VM system. Just return EINVAL
in this case, just like SunOS does.
1995-03-21 10:15:52 +00:00
dg
d0d2e323fa Fixed bug in the size == 0 case of msync() caused by a bogus return value
check..
1995-03-21 02:54:04 +00:00
dg
27d4af36dd Added a new boolean argument to vm_object_page_clean that causes it to
only toss out clean pages if TRUE.
1995-03-21 01:11:44 +00:00
dg
5d88c07ee1 Don't gain/lose an object reference in vnode_pager_setsize(). It will
cause vnode locking problems in vm_object_terminate().
Implement proper vnode locking in vm_object_terminate().
1995-03-20 10:20:42 +00:00
dg
ba7cc6e6a9 Fixed "objde1" hang. It was caused by a "&" where an "&&" belonged in the
expression that decides if a wakeup should occur.
1995-03-20 10:14:55 +00:00
dg
27e7e16904 Removed an unnecessary call to vinvalbuf after the page clean. 1995-03-20 02:06:09 +00:00
dg
bc768fa088 Do proper vnode locking when doing paging I/O. Removed the asynchronous
paging capability to facilitate this (we saw little or no measureable
improvement with this anyway).

Submitted by:	John Dyson
1995-03-19 23:46:25 +00:00
dg
9cd78521d8 Removed redundant newlines that were in some panic strings. 1995-03-19 14:29:26 +00:00
dg
390bfe9b40 Incorporated 4.4-lite vnode_pager_uncache() and vnode_pager_umount()
routines (and merged local changes). The changed vnode_pager_uncache
gets rids of the bogosity that you can call the routine without
having the vnode locked. The changed vnode_pager_umount properly locks
the vnode before calling vnode_pager_uncache.
1995-03-19 12:36:10 +00:00
dg
cc818c5048 In vm_page_alloc_contig: Removed a redundant semicolon and used 'm' instead
of &pga[i] in one place.
1995-03-18 01:04:36 +00:00
bde
289f11acb4 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) and most of the warnings from
`gcc -Wnested-externs'.  Fix all the bugs found.  There were no serious
ones.
1995-03-16 18:17:34 +00:00
dg
c20bdce1e0 Special cased the handling of mb_map in the M_WAITOK case. kmem_malloc()
now returns NULL and sets a global 'mb_map_full' when the map is full.
m_clalloc() has further been taught to expect this and do the right thing.
This should fix the "mb_map full" panics that several people have reported.
1995-03-15 07:52:06 +00:00
bde
257edadbd4 Move a kernel inline function inside `#ifdef KERNEL' so that including
<vm/vm.h> doesn't cause warnings about nonexistent functions called
by the inline function.  Clean up the formatting of the function.
1995-03-12 12:42:00 +00:00
dg
266265f981 Fixed obsolete comment. 1995-03-12 08:11:34 +00:00
dg
60d9c2c849 Deleted vm_object_setpager(). 1995-03-12 08:05:46 +00:00
dg
a013c3ca28 Deleted vm_object_setpager(). 1995-03-12 07:58:29 +00:00
dg
edbe52ceb3 Explicitly set object->flags = OBJ_CANPERSIST. 1995-03-12 07:56:06 +00:00
dg
d0a0d19a5f Fix completely bogus comment. 1995-03-11 22:25:20 +00:00
dg
ff36772fd1 Clear OBJ_INTERNAL flag for device pager objects and named anonymous
objects.
1995-03-11 22:25:02 +00:00
dg
22174e3f91 Set VAGE flag when pager is destroyed. This usually happens when an
object has fallen off the end of the cached list - this is likely the
last reference to the vnode and it should be reused before non file
vnodes that are already on the free list (VDIR mostly).
1995-03-07 19:04:10 +00:00
dg
ffdff08c04 Fixed object reference count problem that occurred in the MAP_PRIVATE
case after we rewrote vm_mmap(). Added some comments to make it easier
to follow the reference counts.
1995-03-07 17:27:49 +00:00
dg
964f4c0754 Don't attempt to reverse collapse non OBJ_INTERNAL objects. 1995-03-07 17:25:46 +00:00
jkh
89824ef63f Remove a gratutious cast. 1995-03-04 21:14:19 +00:00