Tor Egge
9174ca7ba3
Initialize result->backing_object_offset before linking result onto the list of
...
vm objects shadowing source in vm_object_shadow(). This closes a race where
vm_object_collapse() could be called with a partially uninitialized object
argument causing symptoms that looked like hardware problems, e.g. signal 6,
10, 11 or a /bin/sh busy-waiting for a nonexistant child process.
2004-06-28 20:26:35 +00:00
Dag-Erling Smørgrav
c53f7ace3a
MFS: vm_map.c rev 1.187.2.27 through 1.187.2.29, fix MS_INVALIDATE
...
semantics but provide a sysctl knob for reverting to old ones.
2004-05-25 18:40:53 +00:00
Warner Losh
05eb3785e7
Remove advertising clause from University of California Regent's license,
...
per letter dated July 22, 1999.
Approved by: core
2004-04-06 20:15:37 +00:00
Alan Cox
a7d8612155
Implement a work around for the deadlock avoidance case in
...
vm_object_deallocate() so that it doesn't spin forever either.
Submitted by: bde
2004-03-08 03:54:36 +00:00
Alan Cox
85b8d6b45b
Correct a long-standing race condition in vm_object_page_remove() that
...
could result in a dirty page being unintentionally freed.
Reviewed by: tegge
MFC after: 7 days
2004-02-22 03:36:51 +00:00
Alan Cox
23b186d324
Don't acquire Giant in vm_object_deallocate() unless the object is vnode-
...
backed.
2004-01-18 03:44:14 +00:00
Alan Cox
d0058957b5
Revision 1.74 of vm_meter.c ("Avoid lock-order reversal") makes the release
...
and subsequent reacquisition of the same vm object lock in
vm_object_collapse() unnecessary.
2004-01-02 19:57:45 +00:00
Alan Cox
4da9f125cc
- Modify vm_object_split() to expect a locked vm object on entry and
...
return on a locked vm object on exit. Remove GIANT_REQUIRED.
- Eliminate some unnecessary local variables from vm_object_split().
2003-12-30 22:28:36 +00:00
Alan Cox
950f8459d4
- Rename vm_map_clean() to vm_map_sync(). This better reflects the fact
...
that msync(2) is its only caller.
- Migrate the parts of the old vm_map_clean() that examined the internals
of a vm object to a new function vm_object_sync() that is implemented in
vm_object.c. At the same, introduce the necessary vm object locking so
that vm_map_sync() and vm_object_sync() can be called without Giant.
Reviewed by: tegge
2003-11-09 05:25:35 +00:00
Alan Cox
63f6cefcd5
- Increase the scope of two vm object locks in vm_object_split().
2003-11-02 22:52:42 +00:00
Alan Cox
b921a12b3b
- Introduce and use vm_object_reference_locked(). Unlike
...
vm_object_reference(), this function must not be used to reanimate dead
vm objects. This restriction simplifies locking.
Reviewed by: tegge
2003-11-02 21:30:10 +00:00
Alan Cox
22ec553f77
- Increase the scope of two vm object locks in vm_object_collapse().
...
- Remove the acquisition and release of Giant from vm_object_coalesce().
2003-11-01 23:06:41 +00:00
Alan Cox
c7c8dd7e80
- Modify swap_pager_copy() and its callers such that the source and
...
destination objects are locked on entry and exit. Add comments to
the callers noting that the locks can be released by swap_pager_copy().
- Remove several instances of GIANT_REQUIRED.
2003-11-01 08:57:26 +00:00
Alan Cox
de33beddd5
- Additional vm object locking in vm_object_split()
...
- New vm object locking assertions in vm_page_insert() and
vm_object_set_writeable_dirty()
2003-11-01 04:54:23 +00:00
Alan Cox
3b9a4cb6a9
- Revert a part of revision 1.73: Make vm_object_set_flag() an inline
...
function. This function is so trivial that inlining reduces the size
of the kernel.
2003-10-31 20:17:00 +00:00
Alan Cox
dc6279b887
- Take advantage of the swap pager locking: Eliminate the use of Giant
...
from vm_object_madvise().
- Remove excessive blank lines from vm_object_madvise().
2003-10-31 18:32:03 +00:00
Alan Cox
43186e53ae
- Simplify vm_object_collapse()'s collapse case, reducing the number
...
of lock acquires and releases performed.
- Move an assertion from vm_object_collapse() to vm_object_zdtor()
because it applies to all cases of object destruction.
2003-10-26 06:29:26 +00:00
Alan Cox
7a93508274
- Increase the object lock's scope in vm_contig_launder() so that access
...
to the object's type field and the call to vm_pageout_flush() are
synchronized.
- The above change allows for the eliminaton of the last parameter
to vm_pageout_flush().
- Synchronize access to the page's valid field in vm_pageout_flush()
using the containing object's lock.
2003-10-18 21:09:21 +00:00
Jeff Roberson
f3c625e47a
- Use the UMA_ZONE_VM flag on the fakepg and object zones to prevent
...
vm recursion and LORs. This may be necessary for other zones created in
the vm but this needs to be verified.
2003-10-04 14:21:53 +00:00
Alan Cox
1dabe30610
Remove GIANT_REQUIRED from vm_object_shadow().
2003-09-17 07:00:14 +00:00
Alan Cox
82f9defeaf
Eliminate the use of Giant from vm_object_reference().
2003-09-15 05:58:27 +00:00
Alan Cox
b881da26a5
There is no need for an atomic increment on the vm object's generation
...
count in _vm_object_allocate(). (Access to the generation count is
governed by the vm object's lock.) Note: the introduction of the
atomic increment in revision 1.238 appears to be an accident. The
purpose of that commit was to fix an Alpha-specific bug in UMA's
debugging code.
2003-09-13 20:07:26 +00:00
Poul-Henning Kamp
07f81f9159
Remove an unused variable.
2003-08-06 12:09:34 +00:00
Alan Cox
9c65e7a336
Allow vm_object_reference() on kernel_object without Giant.
2003-07-27 05:43:58 +00:00
Poul-Henning Kamp
b4ae478044
Don't inline very large functions.
...
Gcc has silently not been doing this for a long time.
2003-07-22 09:27:58 +00:00
Alan Cox
7ca33ad1e8
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
Alan Cox
06ecade7d8
- 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
David E. O'Brien
874651b13c
Use __FBSDID().
2003-06-11 23:50:51 +00:00
Alan Cox
3471677cc9
Don't use vm_object_set_flag() to initialize the vm object's flags.
2003-06-09 06:50:02 +00:00
Alan Cox
138449dc19
- 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
Alan Cox
d7fc221044
Pass the vm object to vm_object_collapse() with its lock held.
2003-06-07 02:29:17 +00:00
Alan Cox
40b808a842
- Extend the scope of the backing object's lock in vm_object_collapse().
2003-06-05 20:55:27 +00:00
Alan Cox
b72b0115ee
- 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
Alan Cox
3b68228cce
- 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
Alan Cox
bdbfbaafcc
Add vm object locking to vm_object_coalesce().
2003-06-03 19:37:01 +00:00
Alan Cox
cccf11b865
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
Alan Cox
34567de7fc
Add vm object locking to vm_object_madvise().
2003-05-31 19:40:57 +00:00
Alan Cox
1c500307d1
Reduce the size of a vm object by converting its shadow list from a TAILQ
...
to a LIST.
Approved by: re (rwatson)
2003-05-18 04:10:16 +00:00
Alan Cox
3a12f5da1f
Give the kmem object's mutex a unique name, instead of "vm object",
...
to avoid false reports of lock-order reversal with a system map mutex.
Approved by: re (jhb)
2003-05-09 02:13:23 +00:00
Alan Cox
658ad5fff5
Lock the vm_object when performing vm_pager_deallocate().
2003-05-06 02:45:28 +00:00
Alan Cox
f7dd7b637b
Extend the scope of the vm_object lock in vm_object_terminate().
2003-05-04 19:23:40 +00:00
Alan Cox
ad682c4825
Lock the vm_object on entry to vm_object_vndeallocate().
2003-05-03 20:28:26 +00:00
Alan Cox
bff99f0d12
- Revert kern/vfs_subr.c revision 1.444. The vm_object's size isn't
...
trustworthy for vnode-backed objects.
- Restore the old behavior of vm_object_page_remove() when the end
of the given range is zero. Add a comment to vm_object_page_remove()
regarding this behavior.
Reported by: iedowse
2003-05-03 08:09:24 +00:00
Alan Cox
f92039a1fc
Move a declaration to its proper place.
2003-05-03 04:21:16 +00:00
Alan Cox
6be365253d
Lock the vm_object when updating its shadow list.
2003-05-02 04:55:21 +00:00
Alan Cox
4f7c7f6e23
Simplify the removal of a shadow object in vm_object_collapse().
2003-05-02 03:00:21 +00:00
Alan Cox
8e3a76fb6f
Extend the scope of the vm_object locking in vm_object_split().
2003-05-01 05:06:33 +00:00
Alan Cox
1534781737
- Update the vm_object locking in vm_object_reference().
...
- Convert some dead code in vm_object_reference() into a comment.
2003-05-01 03:29:20 +00:00
Alan Cox
ed6a786313
- Define VM_OBJECT_LOCK_INIT().
...
- Avoid repeatedly mtx_init()ing and mtx_destroy()ing the vm_object's lock
using UMA's uminit callback, in this case, vm_object_zinit().
2003-04-28 03:45:35 +00:00
Alan Cox
c9917419ef
- Tell witness that holding two or more vm_object locks is okay.
...
- In vm_object_deallocate(), lock the child when removing the parent
from the child's shadow list.
2003-04-27 20:07:57 +00:00