pk
9bec4e7918
Don't hold on to object and queue locks while sleeping.
1997-09-07 20:41:59 +00:00
pk
0c386233d4
Adapt a diagnostic to big-endian machines.
...
(Not that it actually works on little-endians, but we can easily make it not
work on big-endians all the same).
1997-09-07 20:39:23 +00:00
pk
fff424c798
Add missing `unlock(&vm_object_list_lock);'
1997-09-07 19:31:52 +00:00
mrg
66d1e506df
remove last vestigates of __FORK_BRAINDAMANGE
1997-08-27 02:35:38 +00:00
drochner
448446ec38
Don't make coredump of areas which are mmap()ed from a device.
...
This can have bad side effects.
Closes PR kern/3252.
1997-07-22 10:06:43 +00:00
fvdl
933d4afe84
Make vm_map_clear_recursive behave exactly like the old lock_clear_recursive.
...
This doesn't make a difference in the way that it's currently being called,
but it's more intuitive.
1997-07-20 23:23:45 +00:00
fvdl
5a4803bc55
XXX - some userland code includes this, needing <sys/time.h>, so
...
include it, for the time being.
1997-07-07 10:57:34 +00:00
fvdl
206e9582ef
Move lock.h and kern_lock.c to their rightful places, as in Lite2. Make
...
the VM code use the new interface.
1997-07-06 12:38:25 +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
thorpej
657f118b7f
Update the status of a couple of items here... specifically, more aggressive
...
object collapse (DONE), machine-dependent hook for virtual memory allocation
(DONE - PMAP_PREFER()), and better coherency between page and buffer
caches (A LITTLE BETTER - we sync up the vnode pager in the sync(2)
system call now).
1997-06-26 01:02:07 +00:00
mrg
781dfea84f
back out previous. look in unistd.h.
1997-06-23 01:15:03 +00:00
christos
796badce6b
PR/3772: Matthias Scheler: Missing swapctl prototype.
1997-06-22 19:35:55 +00:00
pk
98ce8ab879
Remove __FORK_BRAINDAMAGEd code; it's no longer needed.
1997-06-19 20:54:15 +00:00
thorpej
3bd11220b6
Don't print a message if the user attempts SWAP_OFF. Return an error
...
instead.
1997-06-17 03:37:07 +00:00
thorpej
c61704d37c
Remove the code that sets dumpdev, for two reasons:
...
- It was incorrect. A dev_t should _never_ be compared against
NULL, as 0 is a valid value (major 0, minor 0).
- The operator mave have _intentionally_ set dumpdev to "none"
(i.e. NODEV), and setting it the first time a VBLK swap device
is added would break the semantics.
setroot() deals with all dump device selection. Dumps and swap are now
in no way related.
1997-06-16 20:21:55 +00:00
mrg
c78d0720ff
- set dumpdev if not already set
...
- don't use nocoalease (from thorpej).
- fix priority list management (from pk).
- update comment for swapoff.
- free swap device extent name safely (from thorpej).
1997-06-16 13:35:17 +00:00
pk
e5b0a8820b
As long as we actually use `swapdev_vp', initialize it.
1997-06-13 15:37:17 +00:00
mrg
21cc3ddfd5
bring mrg-vm-swap2 onto mainilne.
1997-06-12 14:51:20 +00:00
thorpej
433c3cae0f
Pull thorpej-bus-dma branch into mainline.
1997-06-06 23:10:23 +00:00
gwr
09da7e273e
Eliminate vmspace.vm_pmap and all references to it unless
...
__VM_PMAP_HACK is defined (for temporary compatibility).
The __VM_PMAP_HACK code should be removed after all the
ports that define it have removed all vm_pmap references.
1997-05-16 21:39:50 +00:00
thorpej
e73580920d
Change to not require including <sys/dmap.h>
1997-04-17 00:12:50 +00:00
thorpej
27b49a0ede
XXX Kludge for PowerPC; need to use kernel vfprintf().
1997-04-17 00:12:08 +00:00
thorpej
90ece8ebcb
Declare dmmin, dmmax, swapmap, and nswapmap here.
1997-04-17 00:08:50 +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
mycroft
700dee447e
DTRT if vm_object_lookup() returns NULL. This may happen while an object is
...
being created or destroyed.
1997-02-27 17:49:05 +00:00
tls
fad978b853
a mutex on vnode_pager_sync avoids another race condition, only possible if sync were called again while we were sleeping. This should be the last of this nest of bugs. From mycroft.
1997-02-26 02:26:19 +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
a49641e340
vm_map_copy_entry(): Don't set "needs_copy" on a zero-fill entry.
...
From Charles Hannum <mycroft@netbsd.org>
1997-02-25 23:27:08 +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
82f19ac36c
lite2
1997-02-23 09:58:53 +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
mrg
8eba4aeacb
don't clean fading objects. from mycroft.
1997-02-23 08:56:57 +00:00
thorpej
a49beaa16a
Possesive, Jason... possesive....
1997-02-22 04:36:48 +00:00
thorpej
75be8504f4
More good stuff from Charles:
...
Eliminate a nasty race condition in vnode_pager_sync() by making
two passes. First, find all of the objects to be cleaned and reference
them. Second, traverse this list objects, cleaning them if there are
references other than us.
1997-02-22 04:11:42 +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
thorpej
235a2d71f7
Use vm_object_paging() to test if an object has pages in transit.
...
From Charles Hannum <mycroft@netbsd.org>
1997-02-21 20:27:21 +00:00
thorpej
dd8d0f1f00
Define a macro to test if an object has pages in transit. Clarify
...
some arithmetic, and nuke an unneeded prototype.
From Charles Hannum <mycroft@netbsd.org>.
1997-02-21 20:26:03 +00:00
thorpej
17b60fc6e9
In vnode_pager_sync(), we need to vm_object_deallocate() after cleaning
...
pages. Noticed by Thor Simon <tls@netbsd.org>, confirmed by
Charles Hannum <mycroft@netbsd.org>
1997-02-21 20:22:39 +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
tls
127c6b54e7
Sigh. I initially had this exactly backwards: the object needs to be locked, the vnode does *not*. Avoids panic: locking against myself quickly reported by Charles.
1997-02-17 13:10:28 +00:00
tls
a507fda378
vnode_pager_sync bugs: A) must lock the object, not just the vnode. B) Don't remove the object from paging queues, because we'd have to put it back on one. The pagedaemon will eventually take care of this for us anyway. This was causing us to *lose track of pages completely* every time vnode_pager_sync() was called... sigh. Credit goes to mycroft for untangling this mess.
1997-02-17 06:22:52 +00:00
tls
4b1213d27c
sync needs to clean VM objects backed by vnode pagers
1997-02-13 02:54:06 +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
thorpej
593fdd462d
NFSCLIENT -> NFS
1997-01-31 03:06:06 +00:00
thorpej
b7a5b84750
Treat the nswdev == 0 case like the nswap == 0 case; don't panic, just
...
report no swap space. Suggested by Leo Weppleman <leo@netbsd.org>.
1997-01-22 07:28:21 +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
mrg
f3d9c468e1
minor KNF changes.
1997-01-03 18:00:25 +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
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
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
perry
9ab047883b
Fix unused variable -Wxxx failure when MINIROOTSIZE defined.
1996-10-21 01:32:38 +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
mrg
2fc2b98d83
make pageout sleep on vm_pages_needed rather than lbolt. this stops
...
pathological behaviour (freezes) when running short of free pages. see
PR#2755 for a more detailed explanation (from jonathan).
thanks to john dyson for the first cut of this change.
1996-09-18 02:04:50 +00:00
cgd
62034405e6
allow kmem_malloc to return NULL if canwait is set and there's no map space
...
left, rather than panic()ing. This allows callers to set their own policy
for how to handle the shortage. Add a few comments.
1996-06-13 16:52:06 +00:00
pk
7acbd9511d
Make v_swpin & v_swpout tick.
1996-05-29 21:20:11 +00:00
mrg
047dfa8524
count pagein faults in struct user. (from kenneth stailey pr#1397])
1996-05-20 17:40:02 +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
a818b81625
Added missing prototypes from <sys/cpu.h>
1996-04-23 12:25:23 +00:00
pk
37a292dea0
Make prototyping of most functions conditional on `PMAP_EXCLUDE_DECLS'.
...
This allows MD pmap.h to implement access to those functions via pointers.
1996-03-31 22:15:32 +00:00
christos
ff63e6c744
Change %r -> %: as for recursive printf's
1996-03-30 21:50:45 +00:00
christos
3cc52443b5
Fix vm_offset_t (unsigned long) and vm_size_t (unsigned long) printf arguments
...
to %lx and %ld instead of %x and %d.
1996-03-16 23:15:18 +00:00
gwr
f6925cfbf3
Replace vm_object_prefer with PMAP_PREFER.
1996-02-28 22:39:13 +00:00
gwr
fdb309615e
Remove vm_object_prefer. VM code now calls PMAP_PREFER directly.
1996-02-28 22:35:35 +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
d0fd3d7e62
Don't declare pmap_page_index for now. It will break the arm port.
...
This clearly needs to be fixed. I would like to declare it:
__pure u_int pmap_page_index __P((vm_offset_t));
but at least the arm port wants it signed [since it tests for -1 all over
the place]. Can we have this fixed please?
1996-02-10 00:30:39 +00:00
christos
b7b8db60ac
change pmap_page_index to return __pure u_int, like in the majority of
...
the ports
1996-02-10 00:20:09 +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
fbb022ab48
Trivial change for consistency.
1996-01-31 03:11:16 +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
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
mycroft
2dd293d3c3
Add hooks for COMPAT_FREEBSD, from Noriyuki Soda.
1995-10-10 01:26:36 +00:00
mycroft
245f292fed
Prefix names of system call implementation functions with `sys_'.
1995-10-07 06:25:19 +00:00
thorpej
fbbf585f72
Remove spurious (and incorrect) prototype for swapon(), pointed out
...
by Chris Demetriou.
1995-09-27 20:30:17 +00:00
thorpej
7160dfc805
Make system calls conform to a standard prototype and bring those
...
prototypes into scope.
1995-09-19 21:57:36 +00:00
gwr
5520ccdbf9
Preserve miniroot when (swdevt[i].sw_vp == rootvp)
1995-09-18 21:21:00 +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
4ec7eec85b
don't forget the 'dev' argument to physio(). pointed out by der Mouse
...
and others.
1995-07-19 13:04:02 +00:00
pk
7ac7bdf204
Unlock internal objects too in vm_object_terminate().
1995-07-13 12:35:29 +00:00
cgd
21d1e8d60f
fix bug in load average calculation that prevented processes which were
...
uninterruptibly sleeping for a short period from being counted.
1995-07-08 03:12:22 +00:00
mycroft
7263209ce6
Make each disk and tape driver define its own read and write functions.
...
Deprecate rawread() and rawwrite() completely. Remove d_strategy from cdevsw to
force the abstraction barrier.
1995-07-04 07:15:28 +00:00
cgd
cfbb9c7cfe
no longer needs machine/cpu.h, and use new name for the 'broken swap' define
1995-06-28 02:58:51 +00:00
leo
f205966027
The atari specific code can be removed now it is using MACHINE_NONCONTIG.
1995-06-26 14:40:11 +00:00
cgd
7bd5b4bfa8
oops; vm_pageout.c should include machine/cpu.h, _not_ vm_pager.c
1995-05-07 19:27:27 +00:00
cgd
cf08de5cf0
needs machine/cpu.h
1995-05-07 16:22:40 +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
5f41ce9281
Correct checks for NULLs in pagertab.
1995-04-15 05:11:35 +00:00
mycroft
68c8c80929
kernel_pmap --> pmap_kernel()
1995-04-10 16:48:27 +00:00
briggs
6efcd1b6d4
KERNEL -> _KERNEL
1995-03-29 21:57:43 +00:00
cgd
9141ec70a1
change needed for atari; recycle some code for the i386 that was in Lite
...
that we don't use, but is used by the atari now. (it should change
to MACHINE_NONCONTIG, too...)
1995-03-27 09:09:05 +00:00
jtc
f76f1f89ad
KERNEL -> _KERNEL
1995-03-26 20:35:13 +00:00
mycroft
57e6889435
Make memory map syscalls consistently use size_t.
1995-03-09 17:28:28 +00:00
cgd
94d77171f9
need compat_43_getpagesize on COMPAT_OSF1
1995-03-08 01:46:53 +00:00
mycroft
3d869b0608
Fix two off-by-one errors.
1995-01-09 17:36:48 +00:00
cgd
70f70a3122
make grow's arguments type-correct.
1995-01-09 02:48:03 +00:00
cgd
4b5b562e89
turn spaces to tabs
1995-01-09 02:47:38 +00:00
cgd
d158991669
don't wrap lines
1995-01-09 02:47:23 +00:00
cgd
1af9a586a5
fix vm_page_startup's return type, kill an odd 'register'
1995-01-09 02:46:41 +00:00
cgd
86095ef7e6
no need to have two lines of arguments here.
1995-01-09 02:45:47 +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
2d8771217f
can move FALSE up a line.
1995-01-09 01:33:17 +00:00
cgd
b1f6bfa080
kill extraneous label
1995-01-09 01:30:46 +00:00
pk
3e4bf211c6
Use vm_object_prefer() to find a good range of virtual addresses to
...
map a memory object to.
1994-12-10 11:48:12 +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
mycroft
331b95bd8a
Garbage collect unneeded variable.
1994-12-01 15:39:17 +00:00
gwr
1a7920257d
Make sure vm_mmap creates mappings with page-aligned file offsets.
...
Handle non-aligned file offsets in the mmap/munmap system calls.
1994-12-01 00:23:11 +00:00
gwr
0a0c02cd38
Allow vm_page_array to have holes in it so systems that use
...
MACHINE_NONCONTIG can use a fast, simple pmap_page_index().
1994-12-01 00:19:57 +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
cgd
4eb752cd51
make the "wait on swbuf" message SDB_IO -- it's I/O related, and it's
...
not at all anomalous (and bloody annoying!) on 4M machines.
1994-10-18 06:42:28 +00:00
mycroft
ab9caa0e9a
Fix the munmapfd() prototype, too.
1994-09-16 02:01:49 +00:00
mycroft
d5fdf729f2
All of the users of munmapfd() expect to pass it
...
two args. Make it work correctly.
1994-09-16 01:57:57 +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
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
mycroft
fe18d806d2
Don't panic if primary swap device is not configured.
1994-07-21 07:12:13 +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
e4c9e4b2cd
these were supposed to be written in C; they should follow its syntax
1994-06-27 04:03:15 +00:00
pk
bccc2c3c1b
straighten out diskless swap code somewhat.
1994-06-22 14:01:45 +00:00
cgd
bf43549e44
fix a thinko that kept msync from working if no size specified.
1994-06-20 00:17:28 +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
pk
11ebd2e9c8
#ifdef FIFO's
1994-06-13 16:31:54 +00:00
pk
5d4bd29314
Check for all NFS related vnode ops.
1994-06-10 20:01:20 +00:00
mycroft
264b874c14
Update to 4.4-Lite fs code, with local changes.
1994-06-08 11:41:58 +00:00
mycroft
9eb7a8a711
Fix minor NFS glitch introduced with new VM code.
1994-05-30 13:10:06 +00:00
pk
7672b8b95b
New style core dumps.
1994-05-25 10:56:56 +00:00
cgd
0094e3719e
change warnings
1994-05-24 01:07:50 +00:00
mycroft
5a9d09c5d5
Clean up deleted files.
1994-05-23 03:12:14 +00:00
cgd
3495827959
new VM code, from 4.4-Lite
1994-05-23 03:11:20 +00:00
cgd
11b6c06344
no need to include <sys/vmmeter.h>
1994-05-21 04:00:13 +00:00
mycroft
72edd4b918
For MAP_ANON, force the file offset to 0. I can't think of any any bad side
...
effects of this, and it fixes an interesting bug.
1994-05-19 18:03:04 +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
6fea3fab9a
oops; spaces at ends of lines, etc.
1994-05-11 01:01:03 +00:00