Commit Graph

53 Commits

Author SHA1 Message Date
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
ross c297f000b7 NFS swap fix. Most files here are modified purely to add a tsleep() wmesg
string. The actual functional changes are:

	1. in vm_page_alloc(), restore some long lost code by Paul Kranenburg
	that reserves the last few pages for kernel objects, adding an
	additional escape for the pageout daemon.

	2. In vm_wait() (replaces VM_WAIT), recognize the amusing fatal
	deadlock where the pagedemon sleeps on a channel that only it ever
	wakes up, and add a timeout and printf. Mod 1 should generally
	prevent this from happening in any case.

	3. Fix a livelock in vm_pageout_page() caused by a pre-wakeup of
	page consumers prior to the pageout, which can easily fail over
	memory issues in NFS and IP code. Also, ++ cnt.v_pageouts only
	if the pageout succeeded.
1998-01-31 04:02:39 +00:00
pk 9f1374779b Remove a comment that's incorrect since last commit. 1997-09-10 18:26:33 +00:00
pk 2d8fd853ae Unlocking the target object within vm_object_overlay() is safe, since
the backing object is protected the OBJ_FADING flag.

In vm_object_deallocate(), gain a reference to the object we try to
collapse (per Manuel Bouyer).
1997-09-08 21:23:22 +00:00
pk c5d6596b7c vm_object_deallocate():
Unlock the object cache before looking for collapse candidates.
	Use vm_object_lock_try() to obtain a lock on a collapse candidate.
	This avoids a deadlock due to recursively entering
	vm_object_deallocate() in case a backing object goes away.

vm_object_collapse() and helper functions:
	The object passed in is locked; make sure it is locked when
	we leave vm_object_collapse().

   XXX: Currently, the object is not unlocked during while we possibly
	wait for pager data. We need to consider the effects of
	simultaneous calls to vm_object_collapse() on the same object
	in case unlocking is necessary.
1997-09-07 21:19:41 +00:00
mycroft 448427b7ba Document a requirement of vm_object_bypass(). 1997-04-08 22:35:49 +00:00
mycroft 69e0aacce3 Remove the `backing_object still referenced' panic, since there's an expected
race with vnode_pager_sync().
1997-04-07 01:57:14 +00:00
mycroft 3a474fa002 Remove a printf() that's no longer needed. 1997-03-03 20:56:12 +00:00
thorpej cbb4319fb9 vm_object_shadow(): Add a DIAGNOSTIC check for shadowing a null object.
From Charles Hannum <mycroft@netbsd.org>
1997-02-25 23:28:09 +00:00
thorpej 7327c8cf62 From Charles Hannum:
During a collapse, abort if the object is paging; the pagedaemon can
trigger a collapse, causing deadlock.  (XXX)
1997-02-24 22:19:26 +00:00
mrg 3b9c3fff2e restructure vm_object_overlay() to collapse objects in more cases.
change one diag panic() to a diag printf().  from mycroft.
1997-02-23 09:01:37 +00:00
thorpej 255b9d74d8 Rewrite the object chain collapse code. Bugs fixed are too numerous
to describe here.  This should fix the problems with "hanging processes"
people have seen since the original object collapse code was committed.

From Charles Hannum <mycroft@netbsd.org>
1997-02-21 20:30:49 +00:00
mrg 42ae012452 This is all from mycroft:
Create macros (with names borrowed from Mach 3) to manipulate
object->paging_in_progress, and use them.  When decreasing the
paging count, always make sure to wake up anyone waiting.
Fixes `vospgc', `vosca1', and `vosca2' hangs.
1997-02-18 13:39:31 +00:00
mrg 491e8af174 minor KNF from jason. 1997-02-05 08:26:25 +00:00
mrg eadd7792d9 add thread_sleep_msg() that takes a wait message, and change thread_sleep()
into a macro for backwards compat.  alter vm_object_sleep() to take advantage
of this.
1997-02-05 08:09:45 +00:00
mrg 85328f7b35 KNF. 1997-02-05 07:48:42 +00:00
mrg 4f2a217c2b pull up vm_object_collapse() fix from mrg_vm_object_collapse branch.
many thanks to niklas hallqvist (niklas@appli.se) for this.
1997-01-03 18:03:14 +00:00
christos 3dc7953eec back out previous kprintf changes 1996-10-12 21:50:05 +00:00
christos de1b2b437e printf -> kprintf, sprintf -> ksprintf 1996-10-10 17:16:17 +00:00
gwr fdb309615e Remove vm_object_prefer. VM code now calls PMAP_PREFER directly. 1996-02-28 22:35:35 +00:00
christos 03b1ad4cb4 One more cleanup pass to change %x to %p for pointers 1996-02-10 00:07:59 +00:00
christos bcabcefdcd VM prototype changes 1996-02-05 01:53:47 +00:00
pk 785c98a0cc Oops. 1995-12-06 00:38:11 +00:00
pk 801712f01a Extend use of vm_object_prefer() to vm_allocate_with_pager().
Make vm_object_prefer() call MD aligner for "pageless" objects too,
so we can have more control over the virtual address to be used.

Implementation could be simpler if we by-pass the object to mapped, but
we'd loose the ability to adapt alignment to objects that were previously
mmap'ed with MAP_FIXED on.
1995-12-05 22:54:36 +00:00
pk 7ac7bdf204 Unlock internal objects too in vm_object_terminate(). 1995-07-13 12:35:29 +00:00
pk d114baba9a Introduce vm_object_prefer(), which interrogates the PMAP layer in search
for an optimal virtual address for a given object.
1994-12-10 11:46:25 +00:00
cgd 0a930e5ce6 redo that last change, correctly. (suggested by mycroft.) 1994-10-30 19:11:09 +00:00
cgd aa151f86b3 change some strategic casts to (*long) from (*int). 1994-10-29 07:35:04 +00:00
mycroft 6dd2f9eed2 vm_object_page_clean() expects to be able to use vm_page_deactivate() on a
locked page.  Make that work.  This also obviates the need for vm_fault() to
bogusly activate a page before deactivating it.  Finally, make sure the
semantics of vm_object_deactive_pages() don't change.
1994-09-07 20:25:07 +00:00
cgd fccfa11af5 New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:39:25 +00:00
cgd 9608c5b657 clean up slightly; change RCS ID's to be minimally intrusive 1994-06-27 04:55:46 +00:00
cgd 3495827959 new VM code, from 4.4-Lite 1994-05-23 03:11:20 +00:00
cgd 3dda0064a5 Convert mount, vnode, and buf structs to use <sys/queue.h>. Also,
some knf and structure frobbing to do along with it.
1994-04-21 07:47:31 +00:00
cgd ee3e1168b7 undo a mistaken deletion. at least i found it... 1994-04-20 21:46:15 +00:00
cgd ad6c540f90 cancel some of my stupidity, thanks to charles. 1994-04-15 22:49:15 +00:00
cgd e937bc9bfd convert vm system to use new queues. I'll never write code w/queues again. 1994-04-15 07:04:03 +00:00
cgd 70dabb7d43 don't be so agressive w/renaming, clean for consistency, types in one place. 1994-03-17 02:51:57 +00:00
cgd e69c297456 do not clean fictitious pages. from WS (sent a long time ago...) 1994-01-15 02:39:58 +00:00
mycroft 9c9af600ee Make some functions static. 1994-01-08 04:59:08 +00:00
mycroft 287956ae88 Yet more prototypes. 1994-01-08 04:38:16 +00:00
mycroft d77a163cac Kill third arg to thread_sleep(). It's always false and isn't used anyway. 1994-01-07 22:22:20 +00:00
mycroft 1b184192e1 Add some explicit return types, and make vm_object_print #ifdef DDB | DEBUG. 1994-01-07 19:15:44 +00:00
cgd c26286a5c1 bring changes down from magnum 1993-12-20 12:39:55 +00:00
mycroft b4d3382694 Canonicalize all #includes. 1993-12-17 07:56:32 +00:00
mycroft 00e8bf23cd Add `#ifdef DIAGNOSTIC' around check for dirty pages in persistent objects. 1993-09-23 22:20:29 +00:00
brezak b4940ad7a0 Wrap iprintf, vm_object_print, vm_map_print to allow passing a printf function. 1993-09-13 14:10:35 +00:00
cgd acf8d8b584 deal with ddb bogosities 1993-08-07 06:03:02 +00:00
pk 36a6e635b3 Committing in src/sys/vm
Modified Files:
	vm_object.c

call vm_object_remove() to remove an object from the hashtable when
vm_object_collapse() starts fiddling with pagers.
1993-07-28 00:00:01 +00:00
brezak 9d7e246a03 Cleanup pretty printers for maps and objects. 1993-07-22 13:03:36 +00:00
andrew 7a0e26cd13 Paul Kranenburg's VM deadlock patches (from patchkit 00147, parts 3 & 4).
Prevent dirty objects from being cached, and prevent vm_page_alloc() from
allocating too much memory to non-kernel objects.
1993-06-30 03:48:25 +00:00