Commit Graph

78 Commits

Author SHA1 Message Date
thorpej dd07e08538 Implement vm_exit(), which frees VM resources when a process finishes
exiting.
1998-09-08 23:44:41 +00:00
eeh a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +00:00
perry e6886047c9 bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 21:58:52 +00:00
kleink afeaa5bb57 Use size_t to pass the length of the memory region to operate on to chgkprot(),
kernacc(), useracc(), vslock() and vsunlock(); (unsigned) ints are not
adequate on all platforms.
1998-05-09 15:04:39 +00:00
thorpej 73863dd3c9 Pass vslock() and vsunlock() a proc *, rather than implicitly operating
on curproc.
1998-04-30 06:28:57 +00:00
thorpej 2018d40811 Allocate kernel virtual address space for the U-area before allocating
the new proc structure when performing a fork.  This makes it much
easier to abort a fork operation and return an error if we run out
of KVA space.

The U-area pages are still wired down in {,u}vm_fork(), as before.
1998-04-09 00:23:38 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
mrg 8f7ee94e13 initial import of the new virtual memory system, UVM, into -current.
UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

these are the changes to the old Mach VM system to allow both to be
available in the kernel.
1998-02-06 00:14:43 +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
thorpej 5739c88a75 Implement address space sharing (by keeping ref counts on the vmspace
structure).  Many thanks to Chuck Cranor for debugging assistence.
1998-01-03 02:53:00 +00:00
pk 98ce8ab879 Remove __FORK_BRAINDAMAGEd code; it's no longer needed. 1997-06-19 20:54:15 +00:00
thorpej 27b49a0ede XXX Kludge for PowerPC; need to use kernel vfprintf(). 1997-04-17 00:12:08 +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 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
cgd 8a3333b2a9 Fix an inconsistency that came in with Lite: setrq() was renamed to
setrunqueue(), but remrq() was never renamed.  Rename remrq() to
remrunqueue().
1996-11-06 20:19:19 +00:00
gwr f5927ca260 Minor nit in my change regarding const and non-ansi code... 1996-10-27 21:50:33 +00:00
gwr 2ada6af51b Oops, part of that last commit was not meant to go in.
The definitions of va_alist, va_dcl belong elsewhere.
1996-10-27 20:50:00 +00:00
gwr a0d9bd5bb2 The hack-ish tricks to make the ANSI-style va_start macro work in
non-ANSI mode were not quite complete.  This makes non-ANSI work.
Perhaps it would be better to eliminate this hack altogether...
1996-10-27 20:30:52 +00:00
matthias 3ff0c0553e * The kernel-stack no longer needs to be wired-down on the pc532. 1996-10-23 07:20:09 +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
ws 2da166f660 Fix p_nice vs. NZERO code.
Change NZERO to 20 to always make p_nice positive.
On Christos' suggestion make p_nice explicitly u_char.
1996-10-02 18:04:56 +00:00
pk 7acbd9511d Make v_swpin & v_swpout tick. 1996-05-29 21:20:11 +00:00
ragge 621153ce0e The unexpected remove of active kstack does happen on vax also,
not only on pc532. I've verivied that this "fix" work.
1996-05-19 10:00:38 +00:00
christos ff63e6c744 Change %r -> %: as for recursive printf's 1996-03-30 21:50:45 +00:00
mycroft 8d110517c8 We no longer need the old hack for allocating the u-area on the i386. 1996-02-18 22:53:43 +00:00
christos c048d7ba68 fix a printf warning and add pmap_page_index declaration 1996-02-12 21:51:52 +00:00
christos 03b1ad4cb4 One more cleanup pass to change %x to %p for pointers 1996-02-10 00:07:59 +00:00
christos bac60f4e4e Remove unused argument from vsunlock 1996-02-04 02:09:41 +00:00
mycroft ebfe9ee154 Minor changes. 1995-12-21 04:44:27 +00:00
mycroft fee1a345eb Only expect vm_fork() to return if __FORK_BRAINDAMAGE is defined.
Eliminate unused third arg to vm_fork().
1995-12-09 04:28:16 +00:00
mycroft 67daa4706d Add PHOLD() and PRELE() macros, used to hold a process in core and release it. 1995-08-13 09:04:43 +00:00
cgd 0b2ce5d881 delete some cruft, don't swap if BROKEN_SWAP defined, call cpu_swapout rather than #ifdef 1995-05-05 03:35:39 +00:00
mycroft 68c8c80929 kernel_pmap --> pmap_kernel() 1995-04-10 16:48:27 +00:00
cgd b1f6bfa080 kill extraneous label 1995-01-09 01:30:46 +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 2f710a54ee Convert process, file, and namei lists and hash tables to use queue.h. 1994-08-30 03:04:28 +00:00
deraadt 72b3d408b9 replace "ctob(UPAGES)" and "UPAGES * NBPG" with "USPACE" 1994-08-23 22:07:42 +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
mycroft 0d8affb278 Turn P_NOSWAP and P_PHYSIO into a hold count, as suggested by a comment. 1994-06-15 19:59:21 +00:00
cgd 3495827959 new VM code, from 4.4-Lite 1994-05-23 03:11:20 +00:00
cgd 207339d53d define maxdmap and maxsmap 1994-05-19 08:08:46 +00:00
cgd c6abdc2054 setrq -> setrunqueue, sched -> scheduler 1994-05-13 00:50:41 +00:00
cgd 0f2ecb72f6 lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around.  kill some unnecessary type and macro
definitions.  standardize clock handling.  More changes than you'd want.
1994-05-05 05:40:40 +00:00
cgd 4bbabd8e7a Rename a lot of process flags. 1994-05-04 03:41:12 +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
mycroft 19065b312a Fix a compiler warning. 1994-01-08 05:58:21 +00:00
mycroft 8955aeedd5 #include vm_user.h. 1994-01-08 04:15:41 +00:00