bmilekic
2763308887
Make sure that the zone destructor doesn't get called twice in
...
certain free paths.
2003-06-25 17:25:45 +00:00
alc
8ef02c4002
Remove a GIANT_REQUIRED on the kernel object that we no longer need.
2003-06-25 05:31:02 +00:00
alc
a4f8c4746a
Maintain the lock on a vm object when calling vm_page_grab().
2003-06-25 04:53:56 +00:00
alc
cbc68243ab
Assert that the vm object is locked on entry to dev_pager_getpages().
2003-06-24 19:48:34 +00:00
alc
b3592fe6d2
Assert that the vm object is locked on entry to vm_pager_get_pages().
2003-06-23 06:15:05 +00:00
alc
fa54a6610e
Maintain a lock on the vm object of interest throughout vm_fault(),
...
releasing the lock only if we are about to sleep (e.g., vm_pager_get_pages()
or vm_pager_has_pages()). If we sleep, we have marked the vm object with
the paging-in-progress flag.
2003-06-22 21:35:41 +00:00
phk
c81c59299b
Add a f_vnode field to struct file.
...
Several of the subtypes have an associated vnode which is used for
stuff like the f*() functions.
By giving the vnode a speparate field, a number of checks for the specific
subtype can be replaced simply with a check for f_vnode != NULL, and
we can later free f_data up to subtype specific use.
At this point in time, f_data still points to the vnode, so any code I
might have overlooked will still work.
2003-06-22 08:41:43 +00:00
alc
5d0aaa2a87
As vm_fault() descends the chain of backing objects, set paging-in-
...
progress on the next object before clearing it on the current object.
2003-06-22 05:36:53 +00:00
alc
17a3946774
Complete the vm object locking in vm_object_backing_scan(); specifically,
...
deal with the case where we need to sleep on a busy page with two vm object
locks held.
2003-06-22 02:35:06 +00:00
alc
752ed0a2b9
Make some style and white-space changes to the copy-on-write path through
...
vm_fault(); remove a pointless assignment statement from that path.
2003-06-22 00:00:11 +00:00
phk
42a4ac2ba1
Use a do {...} while (0); and a couple of breaks to reduce the level
...
of indentation a bit.
2003-06-21 08:27:06 +00:00
alc
ed79b4d625
Lock one of the vm objects involved in an optimized copy-on-write fault.
2003-06-21 06:31:42 +00:00
alc
ab509a1fdd
- Increase the scope of the vm object lock in vm_object_collapse().
...
- Assert that the vm object and its backing vm object are both locked in
vm_object_qcollapse().
2003-06-21 04:14:48 +00:00
alc
6106a85499
Make swap_pager_haspages() static; remove unused function prototypes.
2003-06-20 20:20:06 +00:00
phk
85ce27a435
Initialize b_saveaddr when we hand out pbufs
2003-06-20 08:35:28 +00:00
alc
893b54638f
The so-called "optimized copy-on-write fault" case should not require
...
the vm map lock. What's really needed is vm object locking, which
is (for the moment) provided Giant.
Reviewed by: tegge
2003-06-20 04:20:36 +00:00
alc
cb7655e83c
Assert that the vm object is locked in vm_page_try_to_free().
2003-06-19 01:50:14 +00:00
alc
29c6e6376c
Fix a vm object reference leak in the page-based copy-on-write mechanism
...
used by the zero-copy sockets implementation.
Reviewed by: gallatin
2003-06-19 01:40:44 +00:00
alc
cacc52e8aa
Lock the vm object when freeing a vm page.
2003-06-18 04:27:18 +00:00
phk
bd4fe20bfd
This file was ignored by CVS in my last commit for some reason:
...
Remove pointless initialization of b_spc field, which now no longer
exists.
2003-06-16 09:31:15 +00:00
phk
24cc9156fe
Add the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementations
...
to check that the buffer points to the correct vnode.
2003-06-15 18:53:00 +00:00
alc
ff1c2851e3
Remove an unnecessary forward declaration.
2003-06-15 07:28:33 +00:00
alc
a7a826b5cb
Use #ifdef __alpha__, not __alpha.
2003-06-15 00:12:42 +00:00
alc
83f108b04d
Migrate the thread stack management functions from the machine-dependent
...
to the machine-independent parts of the VM. At the same time, this
introduces vm object locking for the non-i386 platforms.
Two details:
1. KSTACK_GUARD has been removed in favor of KSTACK_GUARD_PAGES. The
different machine-dependent implementations used various combinations
of KSTACK_GUARD and KSTACK_GUARD_PAGES. To disable guard page, set
KSTACK_GUARD_PAGES to 0.
2. Remove the (unnecessary) clearing of PG_ZERO in vm_thread_new. In
5.x, (but not 4.x,) PG_ZERO can only be set if VM_ALLOC_ZERO is passed
to vm_page_alloc() or vm_page_grab().
2003-06-14 23:23:55 +00:00
alc
d20c30720b
Move the *_new_altkstack() and *_dispose_altkstack() functions out of the
...
various pmap implementations into the machine-independent vm. They were
all identical.
2003-06-14 06:20:25 +00:00
alc
d2198cef89
Extend the scope of the vm object lock in swp_pager_async_iodone() to cover
...
a vm_page_free().
2003-06-13 06:17:42 +00:00
alc
d66a37a0f2
Add vm object locking to various pagers' "get pages" methods, i386 stack
...
management functions, and a u area management function.
2003-06-13 03:02:28 +00:00
obrien
b0678d7a44
Use __FBSDID().
2003-06-11 23:50:51 +00:00
peter
fda03b7cfc
GC unused cpu_wait() function
2003-06-11 05:20:33 +00:00
alc
cad0ed280c
- Finish vm object and page locking in vnode_pager_setsize().
...
- Make some small style changes to vnode_pager_setsize(); most notably,
move two comments to a more logical place.
2003-06-10 20:28:41 +00:00
phk
07cd5a08f3
Revert last commit, I have no idea what happened.
2003-06-09 22:51:36 +00:00
phk
5411462454
A white-space nit I noticed.
2003-06-09 19:40:34 +00:00
alc
f13256329b
Hold the vm object's lock when performing vm_page_lookup().
2003-06-09 07:01:05 +00:00
alc
fd950733b7
Don't use vm_object_set_flag() to initialize the vm object's flags.
2003-06-09 06:50:02 +00:00
alc
6a3f0ec4b1
- Properly handle the paging_in_progress case on two vm objects in
...
vm_object_deallocate().
- Remove vm_object_pip_sleep().
2003-06-08 23:01:24 +00:00
alc
3812b42f43
Lock the kernel object in kmem_alloc().
2003-06-07 23:24:10 +00:00
alc
e448f32b52
Teach vm_page_grab() how to handle the vm object's lock.
2003-06-07 23:22:04 +00:00
alc
c57f179395
Assert that the vm object is locked on entry to swap_pager_freespace().
2003-06-07 20:43:16 +00:00
alc
9b7a0e2182
Pass the vm object to vm_object_collapse() with its lock held.
2003-06-07 02:29:17 +00:00
phk
760be5c8ca
Fix NFS file swapping, I broke it 3 months ago it seems.
2003-06-05 21:57:19 +00:00
alc
37fef77ad3
- Extend the scope of the backing object's lock in vm_object_collapse().
2003-06-05 20:55:27 +00:00
alc
3be7bee315
- Add further vm object locking to vm_object_deallocate(), specifically,
...
for accessing a vm object's shadows.
2003-06-04 21:07:42 +00:00
alc
f9029b703d
- Add VM_OBJECT_TRYLOCK().
2003-06-04 19:59:23 +00:00
alc
1c0932407b
- Add vm object locking to vm_object_deallocate(). (Still more
...
changes are required.)
- Remove special-case macros for kmem object locking. They are
no longer used.
2003-06-04 06:00:55 +00:00
alc
16c442a3a1
Add vm object locking to vm_object_coalesce().
2003-06-03 19:37:01 +00:00
alc
5ba1cfe547
Change kernel_object and kmem_object to (&kernel_object_store) and
...
(&kmem_object_store), respectively. This allows the address of these
objects to be resolved at link-time rather than run-time.
2003-06-01 23:59:48 +00:00
phk
22c73f78e7
Prepend _ to internal union members to avoid ambiguity.
...
Found by: FlexeLint
2003-05-31 19:52:15 +00:00
phk
fb8b6c2546
Remove unused variables
...
Found by: FlexeLint
2003-05-31 19:51:05 +00:00
alc
bd43f8c10d
Add vm object locking to vm_object_madvise().
2003-05-31 19:40:57 +00:00
das
b8e4e0e3ab
If we seem to be out of VM, don't allow the pagedaemon to kill
...
processes in the first pass. Among other things, this will give
us a chance to launder vnode-backed pages before concluding that
we need more swap. This is particularly useful for systems that
have no swap.
While here, update a comment and remove some long-unused code.
Reported by: Lucky Green <shamrock@cypherpunks.to>
Suggested by: dillon
Approved by: re (rwatson)
2003-05-19 00:51:07 +00:00