Commit graph

300 commits

Author SHA1 Message Date
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
Alan Cox 570a2f4ac5 Various changes to vm_object_shadow(): (1) update the vm_object locking,
(2) remove a pointless assertion, and (3) make a trivial change to a
comment.
2003-04-27 05:43:03 +00:00
Alan Cox ecde4b3218 Various changes to vm_object_page_remove():
- Eliminate an odd, special-case feature:
   if start == end == 0 then all pages are removed.  Only one caller
   used this feature and that caller can trivially pass the object's
   size.
 - Assert that the vm_object is locked on entry; don't bother testing
   for a NULL vm_object.
 - Style: Fix lines that are longer than 80 characters.
2003-04-26 23:41:30 +00:00
Alan Cox c829b9d0fc - Lock the vm_object on entry to vm_object_terminate(). 2003-04-26 19:36:19 +00:00
Alan Cox 1ca5895341 - Convert vm_object_pip_wait() from using tsleep() to msleep().
- Make vm_object_pip_sleep() static.
 - Lock the vm_object when performing vm_object_pip_wait().
2003-04-26 18:33:18 +00:00
Alan Cox 155080d31e - Extend the scope of two existing vm_object locks to cover
swap_pager_freespace().
2003-04-26 05:30:56 +00:00
Alan Cox b6e48e0372 - Acquire the vm_object's lock when performing vm_object_page_clean().
- Add a parameter to vm_pageout_flush() that tells vm_pageout_flush()
   whether its caller has locked the vm_object.  (This is a temporary
   measure to bootstrap vm_object locking.)
2003-04-24 04:31:25 +00:00
Alan Cox d647a0ed5a - Assert that the vm_object is locked in vm_object_clear_flag(),
vm_object_pip_add() and vm_object_pip_wakeup().
 - Remove GIANT_REQUIRED from vm_object_pip_subtract() and
   vm_object_pip_subtract().
 - Lock the vm_object when performing vm_object_page_remove().
2003-04-21 06:33:52 +00:00
Alan Cox d7a013c320 - Lock the vm_object when performing either vm_object_clear_flag() or
vm_object_pip_wakeup().
2003-04-20 23:23:41 +00:00
Alan Cox d22bc7101c - Lock the vm_object when performing vm_object_pip_add(). 2003-04-20 03:41:21 +00:00
Alan Cox 0fa05eae77 - Lock the vm_object when performing vm_object_pip_subtract().
- Assert that the vm_object lock is held in vm_object_pip_subtract().
2003-04-19 22:11:41 +00:00
Alan Cox 0d420ad3e6 - Lock the vm_object when performing vm_object_pip_wakeupn().
- Assert that the vm_object lock is held in vm_object_pip_wakeupn().
 - Add a new macro VM_OBJECT_LOCK_ASSERT().
2003-04-19 21:15:44 +00:00
Alan Cox d1dc776d9d Lock some manipulations of the vm object's flags. 2003-04-13 23:43:34 +00:00
Alan Cox e2479b4fc3 Lock some manipulations of the vm object's flags. 2003-04-13 20:22:02 +00:00
Alan Cox f279b88deb Permit vm_object_pip_add() and vm_object_pip_wakeup() on the kmem_object
without Giant held.
2003-04-13 00:43:48 +00:00
Jake Burkholder 227f9a1c58 - Add vm_paddr_t, a physical address type. This is required for systems
where physical addresses larger than virtual addresses, such as i386s
  with PAE.
- Use this to represent physical addresses in the MI vm system and in the
  i386 pmap code.  This also changes the paddr parameter to d_mmap_t.
- Fix printf formats to handle physical addresses >4G in the i386 memory
  detection code, and due to kvtop returning vm_paddr_t instead of u_long.

Note that this is a name change only; vm_paddr_t is still the same as
vm_offset_t on all currently supported platforms.

Sponsored by:	DARPA, Network Associates Laboratories
Discussed with:	re, phk (cdevsw change)
2003-03-25 00:07:06 +00:00
Poul-Henning Kamp b4b138c27f Including <sys/stdint.h> is (almost?) universally only to be able to use
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.
2003-03-18 08:45:25 +00:00
Alan Cox 09c80124a3 Remove ENABLE_VFS_IOOPT. It is a long unfinished work-in-progress.
Discussed on:	arch@
2003-03-06 03:41:02 +00:00
Warner Losh a163d034fa Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
Alan Cox 75741c0497 Simplify vm_object_page_remove(): The object's memq is now ordered. The
two cases that existed before for performance optimization purposes can
be reduced to one.
2003-01-27 01:12:35 +00:00
Alfred Perlstein 44956c9863 Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
Alan Cox 4dbeceee96 Use vm_object_lock() and vm_object_unlock() in vm_object_deallocate().
(This procedure needs further work, but this change is sufficient for
locking the kmem_object.)
2003-01-04 19:23:19 +00:00
Alan Cox 5440b5a974 Refine the assertion in vm_object_clear_flag() to allow operation on the
kmem_object without Giant.  In that case, assert that the kmem_object's
mutex is held.
2003-01-03 19:19:08 +00:00
Jens Schweikhardt 9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Alan Cox e3a9e1b2a8 - Remove vm_object_init2(). It is unused.
- Add a mtx_destroy() to vm_object_collapse().  (This allows a bzero()
   to migrate from _vm_object_allocate() to vm_object_zinit(), where it
   will be performed less often.)
2002-12-29 21:01:14 +00:00
Alan Cox a28cc55e5b Reduce the number of times that we acquire and release the page queues
lock by making vm_page_rename()'s caller, rather than vm_page_rename(),
responsible for acquiring it.
2002-12-29 07:17:06 +00:00