Commit Graph

217 Commits

Author SHA1 Message Date
christos 7778288678 Coverity CID 762: Protect against NULL dereferencing entry->object.uvm_obj
like we do a few lines before. Maybe all the tests should be changed
to UVM_ET_ISOBJ(), or the macro should do it internally?
2006-04-13 01:11:08 +00:00
drochner e10923fd37 -clean up the interface to uvm_fault: the "fault type" didn't serve
any purpose (done by a macro, so we don't save any cycles for now)
-kill vm_fault_t; it is not needed for real faults, and for simulated
 faults (wiring) it can be replaced by UVM internal flags
-remove <uvm/uvm_fault.h> from uvm_extern.h again
2006-03-15 18:09:25 +00:00
yamt ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
bjh21 0638b201c9 Include page ownership information in the output of the DDB "show all pages"
command if UVM_PAGE_TRKOWN is enabled.
2006-02-22 22:20:56 +00:00
bjh21 ed2f09f139 Add a "show all pages" command to DDB which prints one line per physical
page in the system.  Useful for getting some idea where all your memory's
gone, at least on a sufficiently small system.
2006-02-19 18:52:29 +00:00
yamt 9040ed946b - amap_copy: take a "flags" argument instead of booleans.
- add AMAP_COPY_NOMERGE flag, and use it for uvm_map_extract.
  PR/32806 from Julio M. Merino Vidal.
2006-02-15 14:06:45 +00:00
yamt a3af4c1530 remove the following options. no objections on tech-kern@.
UVM_PAGER_INLINE
	UVM_AMAP_INLINE
	UVM_PAGE_INLINE
	UVM_MAP_INLINE
2006-02-11 12:45:07 +00:00
yamt e8e7ab8637 implement compat_linux mremap. 2006-01-21 13:34:15 +00:00
yamt 5865f6ed1d uvm_map_replace: remove a wrong comment. 2006-01-21 13:10:41 +00:00
yamt b88fc0e1b7 make some debug statistics evcnt. 2006-01-15 08:31:31 +00:00
yamt 37dd42949a clean up uvm_map evcnt code. no functional changes. 2006-01-08 09:18:27 +00:00
perry 0f0296d88a Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:45:08 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
thorpej 5303f3b378 Clean up the cpp macro used to say "we're compiling this specific C file". 2005-06-28 05:25:42 +00:00
thorpej fcd6584a58 Clean up the use of __inline in this file. In particular, don't inline
really big chunks of code.  This saves almost 2.5K on a GENERIC i386
kernel, and has the added benefit of not polluting the I$ so much.
2005-06-28 01:07:56 +00:00
jmc 1786cf4f46 Change signature of uvm_kmapent_map defintiion to __INLINE to match prototype 2005-06-13 20:39:14 +00:00
dsl d68ddde829 If we are builging a small kernel [1], don't inline all these functions.
Saves over 2k and lets i386 rescue_tiny build again.
[1] if MALLOC_NOINLINE is defined - not ideal but...
2005-06-10 22:00:52 +00:00
matt 25a0e29a75 When writing coredumps, don't write zero uninstantiated demand-zero pages.
Also, with ELF core dumps, trim trailing zeroes from sections.  These two
changes can shrink coredumps by over 50% in size.
2005-06-02 17:01:43 +00:00
christos e715d2ee98 avoid shadow variables.
remove unneeded casts.
2005-05-29 21:06:33 +00:00
yamt faf63ba09b uvm_kmapent_free: add missing vm_map_lock/unlock. 2005-05-22 21:37:56 +00:00
yamt ea66ccc0a5 uvm_mapent_trymerge: adjust object offset when necessary. 2005-05-18 01:36:16 +00:00
yamt 9dcbe8b85f redo the previous (uvm_map.c rev.1.195) correctly. 2005-05-18 01:34:53 +00:00
yamt 1d028221a3 uvm_mapent_trymerge: add missing checks. 2005-05-17 21:45:24 +00:00
yamt 50a25acc50 (try to) merge map entries in fault handler. 2005-05-17 13:55:33 +00:00
yamt 1e5d4510fa revert uvm_map.c rev.1.190 in favor of merging in fault handler. 2005-05-17 13:54:19 +00:00
yamt 662ada8f7a allocate anons on-demand, rather than reserving static amount of
them on boot/swapon.
2005-05-11 13:02:25 +00:00
yamt ae24d5d705 - amap_extend: don't extend amap beyond UVM_AMAP_LARGE.
- uvm_map_enter: if we fail to extend amap, just give up merging instead of
  bailing out immediately.
2005-05-05 01:58:51 +00:00
yamt 9aacd16106 uvm_map_enter: don't bother to defer amap allocation if there's a mergable
existing entry.  although there're merits and demerits, i think it benefits
common cases.
2005-04-29 09:05:21 +00:00
yamt 1e67869b4b uvm_map: don't leak a preallocated map entry on error. 2005-04-28 14:40:43 +00:00
dbj 2939014883 use voff_t instead of vaddr_t to hold file offset passed to pgo_put 2005-04-07 06:44:15 +00:00
yamt 6b2d8b66a4 merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
2005-04-01 11:59:21 +00:00
chs 6e3fb7b0d2 add back rev. 1.29 of vm/vm_map.c, which was apparently lost in the UVM merge:
msync(MS_INVALIDATE) should fail if any part of the region is wired.
2005-02-28 16:55:54 +00:00
perry bcfcddbac1 nuke trailing whitespace 2005-02-26 22:31:44 +00:00
chs 467487d274 use vm_map_{min,max}() instead of dereferencing the vm_map pointer directly.
define and use vm_map_set{min,max}() for modifying these values.
remove the {min,max}_offset aliases for these vm_map fields to be more
namespace-friendly.  PR 26475.
2005-02-11 02:12:03 +00:00
chs b0c54c738d pmap_wired_count() is now available on all platforms,
remove the code for the case where it's not defined.
2005-01-23 15:58:13 +00:00
atatat a076957818 Convert the PMAP_PREFER() macro from two arguments (offset and hint)
to four (adding size and direction).

In order for topdown uvm to be an option on ports using PMAP_PREFER,
they will need to "prefer" lower addresses if topdown is being used.
Additionally, at least one port also needs to know the size.
2005-01-17 04:37:20 +00:00
yamt 3068e2f45a don't use uvm_kmapent_alloc for non-intrsafe kernel submaps
(namely exec_map and phys_map) becuase:
- normal vmmpepl is fine for them.
- some of them are tightly sized.  eg. size of exec_map on vax is just NCARGS.

should fix vax boot failure reported by Johnny Billquist on current-users@.
2005-01-14 14:25:40 +00:00
yamt 22099ab744 in uvm_unmap_remove, always wakeup va waiters if any.
uvm_km_free_wakeup is now a synonym of uvm_km_free.
2005-01-13 11:50:32 +00:00
yamt e4666bf785 don't reserve (uvm_mapent_reserve) entries for malloc/pool backends
because it isn't necessary or safe.
reported and tested by Denis Lagno.  PR/28897.
2005-01-12 09:34:35 +00:00
yamt 546bb99833 reapply uvm_map.c rev.1.156 (use a zero-sized array instead of
c99 flexible array member) for ports which still use gcc 2.95.
from Havard Eidnes.
2005-01-03 19:46:22 +00:00
yamt 3983ffcfb1 uvm_unmap_remove: debug check to ensure that
unmapped regions doesn't have any remaining page mappings.
2005-01-01 21:12:59 +00:00
yamt 592c954dc7 don't merge incompatible map entries. eg. private and shared. 2005-01-01 21:11:51 +00:00
yamt 95c82bfee4 introduce vm_map_kernel, a subclass of vm_map, and
move some kernel-only members of vm_map to it.
2005-01-01 21:02:12 +00:00
yamt 1207308b90 for in-kernel maps,
- allocate kva for vm_map_entry from the map itsself and
  remove the static limit, MAX_KMAPENT.
- keep merged entries for later splitting to fix allocate-to-free problem.
  PR/24039.
2005-01-01 21:00:06 +00:00
yamt 49fe2034a3 uvm_map_printit:
- print wired_count if available.
- fix a printf format.
2004-09-25 04:19:38 +00:00
he df7ebfa9c3 Move variable declaration up before the code. Fixes compile error
for vax, and also conforms better to KNF.
2004-05-19 22:02:05 +00:00
pk 2fb3dac280 Since a `vmspace' always includes a `vm_map' we can re-use vm_map's
reference count lock to also protect the vmspace's reference count.
2004-05-04 21:33:40 +00:00
petrov 1ac4411c10 Revert default uvm counters, rename UVMMAP_COUNTERS to UVMMAP_NOCOUNTERS. 2004-05-03 20:10:35 +00:00
petrov 5f4709f782 Replace uvm counters with evcnt, initialize them through __link_set (from Matt Thomas),
disable counters by default and add configuration option UVMMAP_COUNTERS.
2004-05-01 19:40:39 +00:00
junyoung 9262158d3e Fix typo in comments. 2004-04-27 09:50:43 +00:00