Commit Graph

46 Commits

Author SHA1 Message Date
thorpej 3f176180d5 Garbage collect thread_sleep()/thread_wakeup() left over from the old
Mach VM code.  Also nuke iprintf(), which was no longer used anywhere.

Add proclist locking where appropriate.
1999-07-22 22:58:38 +00:00
thorpej c10a926030 Allow the caller to specify a stack for the child process. If NULL,
the child inherits the stack pointer from the parent (traditional
behavior).  Like the signal stack, the stack area is secified as
a low address and a size; machine-dependent code accounts for stack
direction.

This is required for clone(2).
1999-05-13 21:58:32 +00:00
drochner d79282e281 rip out some old-vm specific definitions and prototypes for address space
sanity
1999-04-10 13:52:11 +00:00
mrg d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
thorpej dd07e08538 Implement vm_exit(), which frees VM resources when a process finishes
exiting.
1998-09-08 23:44:41 +00:00
thorpej 77d0a69569 Add a waitok boolean argument to the VM system's pool page allocator backend. 1998-08-28 20:05:48 +00:00
eeh a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +00:00
thorpej 55bf1fd9ad Allow an alternate splimp-protected map to be specified in the pool page
allocator routines.
1998-07-31 20:46:36 +00:00
thorpej 6127f55620 Implement kmem_{alloc,free}_poolpage(). These functions use pmap hooks to
map/unmap pool pages if provided by the pmap layer.
1998-07-24 20:27:26 +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
mycroft 0652b9af01 Mark scheduler() and uvm_scheduler() as never returning. 1998-03-30 06:24:42 +00:00
thorpej 6e89972d82 Split vmspace_alloc() into vmspace_alloc() and vmspace_init(). The latter
can be used for initializing a pre-allocated vmspace.
1998-03-27 01:46:20 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
mrg d90485202c - add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.
1998-02-10 14:08:44 +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
thorpej a322314f51 Split out the code that prepares a VM space for exec into a new
vmspace_exec() function.
1997-12-31 07:47:41 +00:00
mrg 66d1e506df remove last vestigates of __FORK_BRAINDAMANGE 1997-08-27 02:35:38 +00:00
drochner 8c0a9bab00 Don't cast 64bit (off_t) file sizes to vm_offset_t (32bit on many
architectures), truncate them intelligently instead.
The truncation is done centralized in vnode_pager.c.
This prevents from wrap-over effects when parts of large (>2^32 byte) files
are mmapped.
Don't allow to mmap above the numerical range of vm_offset_t.
This is considered a temporary solution until the vm system handles the
object sizes/offsets more cleanly.
1997-07-04 20:22:09 +00:00
pk 98ce8ab879 Remove __FORK_BRAINDAMAGEd code; it's no longer needed. 1997-06-19 20:54:15 +00:00
tls 4b1213d27c sync needs to clean VM objects backed by vnode pagers 1997-02-13 02:54:06 +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 ee08818e7a Fix an inconsistency that came in with Lite: setrq() was renamed to
setrunqueue(), but remrq() was never renamed.  Rename remrq() to
remrunqueue().  Also, move remrunqueue() prototype from vm/vm_extern.h
to sys/proc.h, so that it's in the same place as the setrunqueue() prototype
and other related prototypes.
1996-11-06 19:33:39 +00:00
christos a818b81625 Added missing prototypes from <sys/cpu.h> 1996-04-23 12:25:23 +00:00
christos 03b1ad4cb4 One more cleanup pass to change %x to %p for pointers 1996-02-10 00:07:59 +00:00
christos 46d49e500e Account for __FORK_BRAINDAMAGE.. 1996-02-05 20:32:25 +00:00
christos bcabcefdcd VM prototype changes 1996-02-05 01:53:47 +00:00
christos bac60f4e4e Remove unused argument from vsunlock 1996-02-04 02:09:41 +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
thorpej fbbf585f72 Remove spurious (and incorrect) prototype for swapon(), pointed out
by Chris Demetriou.
1995-09-27 20:30:17 +00:00
jtc f76f1f89ad KERNEL -> _KERNEL 1995-03-26 20:35:13 +00:00
cgd 688a174a72 move munmapfd into the correct section, make grow take a proper argument. 1995-01-09 02:45:29 +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
cgd 6b86130410 update for new syscall args description mechanism 1994-10-20 04:22:35 +00:00
mycroft ab9caa0e9a Fix the munmapfd() prototype, too. 1994-09-16 02:01:49 +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 d0a066a438 functions soon to be added 1994-05-06 22:45:29 +00:00
cgd 10b63d74bc SHUT UP! 1994-04-28 03:51:58 +00:00
cgd 95fcf16b66 add sequential swap device support, supplied by hibler many moons ago.
(Note that it needs config support, too, which isn't there yet, but
might be soon...)  Also, general cleanup.  use NODEV to terminate swdevt,
so that sparc port (and future) is happy.
1994-04-25 23:53:51 +00:00
cgd ece66170de somehow, these didn't get committed!!! 1994-04-15 08:14:27 +00:00