Commit Graph

1256 Commits

Author SHA1 Message Date
christos 67695a4835 Make us standards compliant again. Return EINVAL in all cases (except for
mmap) so we cannot tell what went wrong.
2007-05-11 21:30:23 +00:00
christos 5e0b06ff45 Improve on previous and write a RANGE_TEST macro and do it on all the
system calls instead of doing a half-assed job on some of them and none
on others.
2007-05-11 20:41:14 +00:00
christos c5a89b37a0 fix bogus wrap tests; ssize_t != int... 2007-05-11 20:05:50 +00:00
tsutsui 31c6ef6761 Add temporary workaround for PR kern/36019 (panic on sun2 and sun3).
Ok'ed by yamt.
2007-05-11 12:11:09 +00:00
yamt e332a34211 add an evcnt and some assertions. 2007-05-07 12:39:45 +00:00
pooka c65d708ad2 adjust misleading comment: PGO_SYNCIO does not depend on PGO_CLEANIT 2007-04-23 20:10:50 +00:00
dsl b8fbaf8c4b Change the way that emulations locate files within the emulation root to
avoid having to allocate space in the 'stackgap'
  - which is very LWP unfriendly.
The additional code for non-emulation namei() is trivial, the reduction for
  the emulations is massive.
The vnode for a processes emulation root is saved in the cwdi structure
  during process exec.
If the emulation root the TRYEMULROOT flag are set, namei() will do an initial
  search for absolute pathnames in the emulation root, if that fails it will
  retry from the normal root.
".." at the emulation root will always go to the real root, even in the middle
  of paths and when expanding symlinks.
Absolute symlinks found using absolute paths in the emulation root will be
  relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links
  inside the emulation root don't need changing).
If the root of the emulation would be returned (for an emulation lookup), then
  the real root is returned instead (matching the behaviour of emul_lookup,
  but being a cheap comparison here) so that programs that scan "../.."
  looking for the root dircetory don't loop forever.
The target for symbolic links is no longer mangled (it used to get the
  CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended).
CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding
  TRYEMULROOT to the flags to NDINIT().
A lot of the emulation system call stubs could now be deleted.
2007-04-22 08:29:55 +00:00
chs aba740b225 define a pager flag PGO_RECLAIM, similar to FSYNC_RECLAIM, and use it
to skip unnecessary flushing when layered file system vnodes are recycled.
this also prevents a deadlock with the dodgy LFS putpages routine.
fixes the non-LFS part of PR 36150.
2007-04-16 05:14:54 +00:00
perseant 9bab95b2ae Track lwp as well as proc owner with UVM_PAGE_TRKOWN 2007-04-14 07:01:33 +00:00
rmind 60e35a7f80 Export uvm_uarea_free() to the rest.
Make things compile again.
2007-03-24 21:15:39 +00:00
ad 59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
yamt e781af39bd implement priority inheritance. 2007-02-26 09:20:52 +00:00
skrll e7f4fd07df -#include <sys/sa.h> 2007-02-23 08:18:35 +00:00
thorpej b3667ada6d TRUE -> true, FALSE -> false 2007-02-22 06:05:00 +00:00
matt 93feeb1203 Fix lossage from boolean_t -> bool and updated x86 bus_dma. 2007-02-22 04:38:02 +00:00
thorpej dd962f8680 Pick up some additional files that were missed before due to conflicts
with newlock2 merge:

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 23:48:10 +00:00
thorpej 712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
ad 7df3c36a6c uvm_kick_scheduler(): do nothing until the swap subsystem is initialized. 2007-02-19 01:35:19 +00:00
pavel 934634a18c Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.
2007-02-17 22:31:36 +00:00
rmind 27c80c165c Mention rmind@ as an author in the license. No functional change. 2007-02-17 20:45:36 +00:00
ad 2a34d8467a Fix load average calculation:
- Don't consider kernel threads when calculating the load average. Their
  priorities are no longer adjusted by the scheduler, and their level of
  activity is dependent upon running user processes.
- Change the (l->l_priority > PZERO) check in uvm_meter() to (l->l_flag &
  L_SINTR). I think this check was originally intended to weed out
  processes sleeping interruptably.
2007-02-15 20:22:43 +00:00
ad d91014721f Add uvm_kick_scheduler() (MP safe) to replace wakeup(&proc0). 2007-02-15 20:21:13 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
elad d60f1f435f If Veriexec prevents indirect execution of the binary, in addition to just
blocking the mmap() if exec bit is requested, also strip exec bit from
maxprot for further mprotect() calls.

Okay joerg@.
2007-02-03 01:11:50 +00:00
hubertf 142c2a33ba Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
2007-01-24 13:08:11 +00:00
skrll 4b3e98dc1b Remove useless double assignment.
PR 35442
2007-01-19 15:52:24 +00:00
elad fa26351488 Cosmetic nit in the 'filename' passed to veriexec_verify(). 2007-01-11 14:26:07 +00:00
alc 2fc133de08 CID-4192: ensure we have 'uobj != NULL` here
ok christos@ and yamt@
2006-12-27 17:59:08 +00:00
yamt 8bf7662829 merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie).
	  http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
	- complete workqueue(9) and fix its ipl problem, which is reported
	  to cause audio skipping.
	- fix netbt (at least compilation problems) for some ports.
	- fix PR/33218.
2006-12-21 15:55:21 +00:00
skrll 03c2b891e6 Update uvm_grow to support stacks that grow upwards.
Use on hppa and fix a bug in the hppa trap handler.
2006-12-18 09:39:14 +00:00
yamt fc88d88996 put ->K loaned pages on the page queue, so that page loaning doesn't
disturb pagedaemon/pdpolicy.
2006-12-15 13:51:30 +00:00
chs c398ae9734 a smorgasbord of improvements to vnode locking and path lookup:
- LOCKPARENT is no longer relevant for lookup(), relookup() or VOP_LOOKUP().
   these now always return the parent vnode locked.  namei() works as before.
   lookup() and various other paths no longer acquire vnode locks in the
   wrong order via vrele().  fixes PR 32535.
   as a nice side effect, path lookup is also up to 25% faster.
 - the above allows us to get rid of PDIRUNLOCK.
 - also get rid of WANTPARENT (just use LOCKPARENT and unlock it).
 - remove an assumption in layer_node_find() that all file systems implement
   a recursive VOP_LOCK() (unionfs doesn't).
 - require that all file systems supply vfs_vptofh and vfs_fhtovp routines.
   fill in eopnotsupp() for file systems that don't support being exported
   and remove the checks for NULL.  (layerfs calls these without checking.)
 - in union_lookup1(), don't change refcounts in the ISDOTDOT case, just
   adjust which vnode is locked.  fixes PR 33374.
 - apply fixes for ufs_rename() from ufs_vnops.c rev. 1.61 to ext2fs_rename().
2006-12-09 16:11:50 +00:00
elad b8e4702fb2 Back out uvm_is_swap_device(). 2006-12-07 14:06:51 +00:00
elad cbcd623862 We are required to hold uvm.swap_data_lock here too. 2006-12-02 03:23:38 +00:00
yamt 10cd898fb8 uvm_fault: fix an assertion. PR/35134 from Christos Zoulas.
it can be triggered by minherit as well.
2006-12-01 19:15:22 +00:00
elad a6c2dfb16d Introduce uvm_is_swap_device(), to check if the passed struct vnode * is
used as a swap device or not.

Okay mrg@.
2006-12-01 16:06:09 +00:00
yamt c6970b82a3 uvm_fault: unwrap a short line. 2006-11-28 13:16:37 +00:00
yamt ec1dd90a2a uvmpdpol_pagedequeue: clear PQ_INITIALREF.
otherwise, dequeue/enqueue cycles (eg. page loaning) can cause
an assertion failure in clockpro_pageenqueue.
2006-11-28 13:14:53 +00:00
christos df031f1edc PR/34837: Mindaguas: Add SysV SHM dynamic reallocation and locking to the
physical memory
2006-11-25 21:40:04 +00:00
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
yamt 1a7bc55dcc remove some __unused from function parameters. 2006-11-01 10:17:58 +00:00
yamt b89279d039 revert malloc -> kmem_alloc part of uvm_swap.c rev.1.110 because
the current implementation of kmem_free can sleep.
2006-10-27 15:06:04 +00:00
uwe 5704a46a71 uvm_page_printall: With new PQ_* flags pg->pqflags no longer fits and
makes the output of "show all pages" ragged.  Widen the field to 4 chars.
2006-10-26 20:00:52 +00:00
yamt e95cf416a6 extent/malloc -> vmem_alloc/kmem_alloc. 2006-10-22 09:44:21 +00:00
mrg 648bbec934 in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev.  this occurs when we try to set the dumpdev to a device
with no driver loaded.  this fixes PR#34872.

in sys_swapctl, if bdevsw_lookup() fails, set dumpdev = NODEV
before calling cpu_dumpconf().  (this also fixes PR#34872.)

XXX: cpu_dumpconf() should probably be changed to take a dumpdev
XXX: and return an error in such cases, but that is a much more
XXX: intrusive change.

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
2006-10-21 05:54:31 +00:00
yamt 4ba42a7148 add an assertion. 2006-10-19 09:34:00 +00:00
yamt a7dbf2d5e5 uvm_loanbreak: transfer dirtiness of the old page to the new page,
rather than blindly mark it dirty.  fix a part of PR/33513.
2006-10-14 09:23:56 +00:00
yamt 61934cf2b4 uvm_vnp_setsize: put back v_size assignment after uvn_put.
PR/34147 from Juergen Hannken-Illjes.
2006-10-14 09:20:35 +00:00
uwe bb003f9487 More __unused (in cpp conditionals not touched by i386). 2006-10-12 21:35:00 +00:00
dogcow e0909532c0 even more __unused. 2006-10-12 20:18:19 +00:00
yamt 0a8c1584c7 remove unnecessary #include of vnode.h. 2006-10-12 10:14:43 +00:00
yamt 9de1cdc8fe move some knowledge about vnode into uvm_vnode.c. 2006-10-12 10:14:20 +00:00
yamt b290489c81 whitespace. 2006-10-12 10:13:35 +00:00
yamt 0b30e1501c uobj_wirepages and uobj_unwirepages from Mindaugas. PR/34771.
(commented out in files.uvm for now because there is no user in tree.)

http://mail-index.netbsd.org/tech-kern/2006/09/24/0000.html
http://mail-index.netbsd.org/tech-kern/2006/10/10/0000.html
2006-10-12 10:11:57 +00:00
thorpej 401a3924d5 uvm_swap_stats_locked(): Consume the cmd argument even if COMPAT_13 is
not defined.
2006-10-12 04:35:40 +00:00
christos 4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
yamt 86004aaed3 fix some warnings in the case of PDSIM. 2006-10-09 12:50:39 +00:00
yamt dbdfc1f677 move src/sys/uvm/pdsim to src/regress/sys/uvm/pdsim.
no objection on tech-kern@.
2006-10-09 12:32:21 +00:00
chs 33c1fd1917 add support for O_DIRECT (I/O directly to application memory,
bypassing any kernel caching for file data).
2006-10-05 14:48:32 +00:00
christos b01cc3ff0a Coverity CID 3170,3171: Add KASSERT. 2006-10-03 18:26:03 +00:00
yamt 7e4975c5e3 don't use japanese for an identifier. 2006-09-30 16:14:00 +00:00
yamt 606f2d8add wrap a long line. 2006-09-30 16:01:19 +00:00
yamt 883278d33e whitespace. 2006-09-30 15:52:39 +00:00
yamt 04a8266e88 add ubc window hit/miss evcnts. 2006-09-30 15:38:06 +00:00
yamt 7e1b20a4cf ubc_fault: check UVM_OBJ_NEEDS_WRITEFAULT.
fix an assertion failure in genfs_putpages when using msdosfs.
(http://mail-index.NetBSD.org/tech-kern/2006/09/27/0002.html)
reported and tested by Darrin B.Jewell.
2006-09-30 15:37:22 +00:00
elad 53ca07b4d7 If Veriexec enforces access type, don't allow mmap() to use PROT_EXEC on
files that don't have the "indirect" flag. Also change the "library" alias
in veriexecctl(8) to mean "file, indirect".

okay blymn@
2006-09-30 10:56:31 +00:00
yamt 3545644943 more todo. 2006-09-30 09:07:45 +00:00
yamt 1da8d3a36e note what's this. 2006-09-30 09:03:19 +00:00
yamt a5c3459e65 implementations of some replacement algorithms for comparison. 2006-09-30 09:00:00 +00:00
yamt 2ebf73755e a script to modify a list so that it uses small numbers as far as possible.
useful when feeding real world examples into a hackish code like lirs.c
which can't handle large numbers.
2006-09-30 08:57:17 +00:00
yamt adf92c530f implementations of some replacement algorithms for comparison. 2006-09-30 08:50:32 +00:00
yamt 538ff1a080 an artificial access pattern generator. 2006-09-30 08:48:17 +00:00
yamt 94330f3fe8 a simple program to test uvm_pdpolicy_*.c in userland. 2006-09-30 08:47:39 +00:00
thorpej ec1894a78a Don't inline uvm_pagealloc_pgfl(). 2006-09-27 17:18:50 +00:00
yamt 8e991698b9 revert a change which was unintentionally slipped in via yamt-pdpolicy branch. 2006-09-16 07:14:38 +00:00
yamt 9d3e3eab23 merge yamt-pdpolicy branch.
- separate page replacement policy from the rest of kernel
	- implement an alternative replacement policy
2006-09-15 15:51:12 +00:00
elad 5f7169ccb1 First take at security model abstraction.
- Add a few scopes to the kernel: system, network, and machdep.

- Add a few more actions/sub-actions (requests), and start using them as
  opposed to the KAUTH_GENERIC_ISSUSER place-holders.

- Introduce a basic set of listeners that implement our "traditional"
  security model, called "bsd44". This is the default (and only) model we
  have at the moment.

- Update all relevant documentation.

- Add some code and docs to help folks who want to actually use this stuff:

  * There's a sample overlay model, sitting on-top of "bsd44", for
    fast experimenting with tweaking just a subset of an existing model.

    This is pretty cool because it's *really* straightforward to do stuff
    you had to use ugly hacks for until now...

  * And of course, documentation describing how to do the above for quick
    reference, including code samples.

All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:

	http://kauth.linbsd.org/kauthwiki

NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:

  - Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
  - Checks 'securelevel' directly,
  - Checks a uid/gid directly.

(or if you feel you have to, contact me first)

This is still work in progress; It's far from being done, but now it'll
be a lot easier.

Relevant mailing list threads:

http://mail-index.netbsd.org/tech-security/2006/01/25/0011.html
http://mail-index.netbsd.org/tech-security/2006/03/24/0001.html
http://mail-index.netbsd.org/tech-security/2006/04/18/0000.html
http://mail-index.netbsd.org/tech-security/2006/05/15/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/01/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/25/0000.html

Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).

Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.

Happy birthday Randi! :)
2006-09-08 20:58:56 +00:00
christos 37ba677a84 use c99 initializers 2006-09-03 21:37:22 +00:00
christos 5dc39be6da add missing initializers 2006-09-03 21:37:06 +00:00
christos aa6004da57 use c99 initializer. 2006-09-03 21:33:33 +00:00
cherry 8a4036de78 bumps kernel aobj to 64 bit. \
See: http://mail-index.netbsd.org/tech-kern/2006/03/07/0007.html
2006-09-01 20:39:05 +00:00
matt 9e0ec4816e Make PTRACE and COREDUMP optional. Make the default (status quo) by putting
them in conf/std.
2006-08-29 23:34:48 +00:00
martin c8872be34c Add a new swapctl(2) command to unset the dump device. 2006-08-22 14:07:07 +00:00
yamt 36b78db59e ubc_fault: fix a deadlock in the case of uvm_loanbreak() failure. 2006-08-18 15:03:21 +00:00
he 5ea0e70c68 Rearrange included headers and/or add include of <sys/types.h> and
<sys/lock.h>, so that the mipsco port can build again, ref.
  http://mail-index.netbsd.org/port-mips/2006/08/04/0000.html
Reviewed by thorpej
2006-08-04 22:42:36 +00:00
yamt f9458a6ba1 - in genfs_getpages, take g_glock earlier so that it can't be
intervened by truncation.
  it also fixes a deadlock.  (g_glock vs pages locking order)
- uvm_vnp_setsize: modify v_size while holding v_interlock.

reviewed by Chuck Silvers.
2006-07-22 08:47:56 +00:00
ad 3029ac48c7 - Use the LWP cached credentials where sane.
- Minor cosmetic changes.
2006-07-21 16:48:45 +00:00
drochner ef8848c74a Introduce a UVM_KMF_EXEC flag for uvm_km_alloc() which enforces an
executable mapping. Up to now, only R+W was requested from pmap_kenter_pa.
On most CPUs, we get an executable mapping anyway, due to lack of
hardware support or due to lazyness in the pmap implementation. Only
alpha does obey VM_PROT_EXECUTE, afaics.
2006-07-05 14:26:42 +00:00
yamt d447115889 make amap use kmem_alloc, rather than malloc.
(ie. make it use kernel_map, rather than kmem_map.)
kmem_map is more restricted than kernel_map,
and there's no point for amap to use it.
2006-06-25 08:03:46 +00:00
yamt 9606b0accf uvm_swapin: process -> lwp in a comment. 2006-06-13 13:22:06 +00:00
christos 199372b21f prevent uninitialized variable. 2006-06-13 01:59:59 +00:00
christos 28bd7a84c0 Don't allocate > 1K on the stack. 2006-06-12 21:05:47 +00:00
kardel de4337ab21 merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
yamt c24f70bcad move wait points for kva from upper layers to vm_map. PR/33185 #1.
XXX there is a concern about interaction with kva fragmentation.
see: http://mail-index.NetBSD.org/tech-kern/2006/05/11/0000.html
2006-05-25 14:27:28 +00:00
yamt 1075c99d89 introduce macros, UAREA_TO_USER and USER_TO_UAREA,
to convert uarea VA into a pointer to struct user and vice versa,
so that MD code can change the layout in uarea.
2006-05-22 13:43:54 +00:00
elad b3e7e1b010 Better implementation of PaX MPROTECT, after looking some more into the
code and not trying to use temporary solutions.

Lots of comments and help from YAMAMOTO Takashi, also thanks to the PaX
author for being quick to recognize that something fishy's going on. :)

Hook up in mmap/vmcmd rather than (ugh!) uvm_map_protect().

Next time I suggest to commit a temporary solution just revoke my
commit bit.
2006-05-20 15:45:37 +00:00
yamt c876210968 UVM_MAPFLAG: add missing parens. 2006-05-19 15:08:14 +00:00
elad 04d63f90b5 Introduce PaX MPROTECT -- mprotect(2) restrictions used to strengthen
W^X mappings.

Disabled by default.

First proposed in:

	http://mail-index.netbsd.org/tech-security/2005/12/18/0000.html

More information in:

	http://pax.grsecurity.net/docs/mprotect.txt

Read relevant parts of options(4) and sysctl(3) before using!

Lots of thanks to the PaX author and Matt Thomas.
2006-05-16 00:08:24 +00:00
elad fc9422c9d9 integrate kauth. 2006-05-14 21:31:52 +00:00
yamt de6ea5711e - rename uvm_tree_sanity to uvm_map_check and add some
(non tree related) checks.
- remove treesanity_label.  instead, just panic if any corruption is detected.
2006-05-14 08:22:50 +00:00
yamt 37f3579cf8 - uvm_mapent_trymerge: don't forget to update hints.
- clear_hints: new function.
- uvm_map_replace: use clear_hints.  no functional change.
- add some assertions.
2006-05-14 08:21:36 +00:00
yamt be55e1f38a update first_free correctly. 2006-05-14 08:20:35 +00:00
christos 103d2f520c XXX: GCC uninitialized. 2006-05-14 05:30:31 +00:00
yamt 6957cc2e13 ubc_fault: use PMAP_CANFAIL. pointed by Jed Davis on tech-kern@. 2006-05-03 15:57:35 +00:00
yamt 38ae305f09 uvm_km_suballoc: consider kva overhead of "kmapent".
fixes PR/31275 (me) and PR/32287 (Christian Biere).
2006-05-03 14:12:01 +00:00
yamt 93127a7b4c amap_splitref: assert that origref->ar_amap is initialized
by caller beforehand.
2006-04-21 14:04:45 +00:00
yamt 0f4aad0236 - share some code between uvm_map_clip_end and uvm_map_clip_start.
- add a map entry sanity-check function, uvm_mapent_check().

discussed on source-changes@.
2006-04-21 14:03:01 +00:00
yamt c8d2679980 from Christian Ehrhardt:
* uvm_loanzero may call uvm_analloc which will return with anon->an_lock
  locked. This lock is never dropped by uvm_loanzero and AFAICS the caller
  doesn't drop it either.
2006-04-18 09:56:16 +00:00
yamt 4dec4ffdcb uvm_page_own: more assertions. 2006-04-13 08:33:18 +00:00
christos 14ac201ca2 Change previous to KASSERT per yamt's request. 2006-04-13 02:32:14 +00:00
yamt 047ff68ce8 ubc_fault: don't forget to clear PG_WANTED.
reported by Michael Lorenz on tech-kern@.
2006-04-13 02:17:42 +00:00
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
christos 3e31f5d682 Coverity CID 835: Check before dereferencing pg->uanon. 2006-04-13 01:05:17 +00:00
yamt 52a31ea140 uvm_pagermapin: nowait allocation for pagedaemon. 2006-04-11 09:29:40 +00:00
yamt c03e4d19d3 add assertions. 2006-04-11 09:28:14 +00:00
uebayasi c515049d02 Update comment to match reality (vm_physmemseg -> vm_physseg). 2006-04-06 07:18:23 +00:00
yamt 9f6a649d14 uvm_km_pgremove/uvm_km_pgremove_intrsafe: fix assertions. 2006-04-05 21:56:24 +00:00
christos 435a7d0d03 Coverity CID 2721: Avoid bitching for impossible cases, by adding KASSERT. 2006-04-05 19:49:28 +00:00
yamt 4038c2995b uvm_km_check_empty: fix an assertion. 2006-03-17 09:37:55 +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
drochner 2d1a0b57b6 kill the "fault_type" argument to pager's pgo_fault() methods
it is never used
(and using it would comprise an abstraction violation imho)
2006-02-22 22:28:18 +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
perry fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +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 f382834c1a share some code between uvmpd_scan_inactive and uvmpd_scan. 2006-02-14 15:06:27 +00:00
yamt 16f42c29a4 fix a compilation problem where PAGE_SHIFT is not a constant.
pointed by Chuck Silvers.
2006-02-14 02:28:21 +00:00
yamt e6e15660e2 remove an outdated comment. 2006-02-13 14:41:22 +00:00
yamt 62eb3a15e1 factor out swap clustering code. 2006-02-12 09:19:59 +00:00
yamt 2a89e06daa uvm_pageunwire: use uvm_pageactivate rather than a copy. 2006-02-12 09:19:27 +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
simonb 8b00a8c689 Make a note that some counters should be 64-bit as they wrap far to
quickly.
2006-02-10 00:53:04 +00:00
yamt acb669a7cf handle "strange" filesystems like layered filesystems and tmpfs,
where pgo_get returns pages which don't belong to the uobj.
also fix an XXX in uvm_loananon and lock-unlock mismatch in uvm_loanuobj.

PR/28372, PR/32665 (Alan Barrett).
2006-01-31 14:11:25 +00:00
yamt 43ed84382c re-apply uvm_fault.c 1.104. fixes will follow. 2006-01-31 14:05:47 +00:00
yamt f03efb066e uvm_mremap: whitespace. 2006-01-31 14:03:53 +00:00
yamt 7fcddedf0b revert uvm_fault.c 1.104 for now. see PR/28372, PR/32665. 2006-01-30 11:50:17 +00:00
yamt f67f4b05f1 uvm_mremap: fix "easy cases". 2006-01-23 07:53:01 +00:00
matt 7db3afd210 Fix u_int64_t -> uint64_t stragglers. 2006-01-21 18:57:45 +00:00
yamt e8e7ab8637 implement compat_linux mremap. 2006-01-21 13:34:15 +00:00
yamt 651bed2a01 - uvm_fault: move a common code of 1B and 2B to a new function.
don't attempt to allocate anons with kernel_map locked.  PR/32543.
- amap_copy: add an assertion.
2006-01-21 13:13:07 +00:00
yamt 5865f6ed1d uvm_map_replace: remove a wrong comment. 2006-01-21 13:10:41 +00:00
chs 5570661cd8 in amap_alloc(), only put the amap on the list of amaps if we succeeded
in allocating it.
2006-01-18 17:03:36 +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
yamt dc9b2af242 uvmpd_scan_inactive: when reactivating a page,
use pmap_is_referenced rather than pmap_clear_reference.
we don't need to clear the bit here as we'll do so when
moving pages back to inactive queue again.  pointed by Chuck Silvers.
2006-01-05 10:47:33 +00:00
yamt 690d424f28 - add simple functions to allocate/free a buffer for i/o.
- make bufpool static.
2006-01-04 10:13:05 +00:00
perry 3d4ed1fbc7 __inline__ -> inline 2005-12-24 23:41:33 +00:00
perry 0f0296d88a Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:45:08 +00:00
yamt 2b91131918 uao_get: don't mark pages dirty unless it's a write fault. 2005-12-24 13:22:13 +00:00
yamt 79265831ba uvmpd_scan: when deactivating a page, clear its reference bit.
discussed on tech-kern@.
2005-12-21 12:24:47 +00:00
yamt ca08761347 whitespace in SYSCTL_DESCR. 2005-12-21 12:23:44 +00:00
yamt 4fce5d6f5e make length of inactive queue tunable by sysctl. (vm.inactivepct) 2005-12-21 12:19:04 +00:00
skrll dd1a604b66 Whitespace 2005-12-20 08:25:58 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
chs b794108bfa Avoid leaking memory if uiomove fails. from openbsd via PR 32251. 2005-12-06 16:01:13 +00:00
yamt ebf0820ef4 uao_pagein_page: pass PGO_SYNCIO to uao_get.
uao_get doesn't always assume PGO_SYNCIO after yamt-readahead merge.

reported and a dump provided by Masanori Kanaoka.
2005-12-05 01:24:07 +00:00
yamt b09859311d add files i forgot to add when merging yamt-readahead branch. 2005-11-29 23:37:59 +00:00
yamt 221616873d merge yamt-readahead branch. 2005-11-29 22:52:02 +00:00
yamt 52f0a62851 read-ahead statistics. 2005-11-29 15:45:28 +00:00
thorpej ff810990b2 Move UVM files to files.uvm 2005-11-27 22:18:41 +00:00
simonb 155c8bd666 Whitespace nit. 2005-11-09 12:47:39 +00:00
yamt 9df1f09b91 add a function to drop all swap slots in a given range. for tmpfs.
XXX maybe it's better to implement true truncation.
2005-11-08 23:02:22 +00:00
chs 5332333501 in amap_cow_now(), handle the case where we have to sleep and some of the
already-copied pages are paged out.  anons that have already been copied
will have refcount == 1, whereas anons that still need to be copied will
have refcount > 1.  fixes PR 25392, PR 30257, PR 31924.
2005-11-06 15:57:32 +00:00
yamt 94ce3d822f don't include uvm_*_i.h unless needed,
to reduce bogus header dependencies.
2005-10-30 11:56:51 +00:00
chs da3f825c26 remove the assertion in uvm_swapout_threads() about LSONPROC lwps
not running on the same CPU as the swapper.  l_stat is protected by
sched_lock, which isn't held here, so we can race with that lwp
starting to run and see its l_cpu not updated yet, as in PR 31870.
we check l_stat again in uvm_swapout() while holding sched_lock,
so the race itself is harmless.
2005-10-24 00:26:37 +00:00
yamt aec75b1cc6 - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)
2005-10-15 17:29:10 +00:00
chs 9307d68e6a stop converting async msync() to sync.
this hasn't been needed for years (if it ever was).
2005-10-10 15:53:28 +00:00
yamt bddc9e47fe add a file which i forgot when reviving VMSWAP option. 2005-09-21 10:21:46 +00:00
yamt b63b4e8324 - make uvm_swap_stats acquire swap_syscall_lock by itsself
so that callers don't need to acquire it beforehand.
- make swap_syscall_lock static.
2005-09-17 14:51:50 +00:00
yamt d597202302 make VMSWAP optional again. 2005-09-17 14:38:38 +00:00
yamt 1f6a8b12c5 uao_put: don't skip loaned or wired pages. 2005-09-14 20:25:21 +00:00
yamt 6fbf5bf6f1 wrap swap related code by #ifdef VMSWAP. always #define VMSWAP for now. 2005-09-13 22:00:05 +00:00
yamt 873763ea0f uao_put: recognize endoff == 0 as "to the end of the object",
as VOP_PUTPAGES (thus vnode pager) does.  for tmpfs.
2005-09-13 19:54:09 +00:00
yamt 74be61b2e6 remove one of duplicated forward decl. of vmspace. pointed by Dheeraj S. 2005-09-01 02:21:12 +00:00
yamt b34f62d5e9 put back uvm_fault.h for now as it's needed for some ports. 2005-09-01 02:16:46 +00:00
yamt be5d1db4a4 don't include uvm_fault.h unnecessarily. 2005-08-27 16:11:32 +00:00
yamt 38ca5312d2 revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.
2005-07-31 04:04:30 +00:00
yamt 1d0891101c defflag VMSWAP. 2005-07-30 06:33:33 +00:00
yamt b7bfe82866 update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.
2005-07-23 12:18:41 +00:00
yamt 62cab9eab7 uvm_fault: check a correct object in the case of layered filesystems.
fix PR/30811 from Jukka Salmi.
2005-07-22 14:57:39 +00:00
yamt 8af42d8d3c ensure that vnodes with dirty pages are always on syncer's queue.
- genfs_putpages: wait for i/o completion of PG_RELEASED/PG_PAGEOUT pages by
  setting "wasclean" false when encountering them.
  suggested by Stephan Uphoff in PR/24596 (1).

- genfs_putpages: write protect pages when cleaning out, if
  we're going to take the vnode off the syncer's queue.
  uvm_fault: don't write-map pages unless its vnode is already on
  the syncer's queue.

  fix PR/24596 (3) but in the different way from the suggested fix.
  (to keep our current behaviour, ie. not to require explicit msync.
  discussed on tech-kern@.)

- genfs_putpages: don't mistakenly take a vnode off the queue
  by introducing a generation number in genfs_node.
  genfs_getpages: increment the generation number.
  suggested by Stephan Uphoff in PR/24596 (2).

- add some assertions.
2005-07-17 12:27:47 +00:00
yamt 2a6dc9d02d - introduce PGO_NOBLOCKALLOC and use it for ubc mapping
to prevent unnecessary block allocations in the case that
  page size > block size.

- ufs_balloc_range: use VM_PROT_WRITE+PGO_NOBLOCKALLOC rather than
  VM_PROT_READ.
2005-07-17 09:13:35 +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 9057ed7600 Make a note about why a large function like uvm_loanentry() can be
an inline in this case.
2005-06-28 04:06:52 +00:00
thorpej 8d3ff810fa Add missing PAGE_INLINE to uvm_pagelookup() 2005-06-28 04:00:07 +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
thorpej b651fb886d Sprinkle some static. 2005-06-27 02:29:32 +00:00
thorpej 154a970ff4 Small whitespace tweak. 2005-06-27 02:23:26 +00:00
thorpej e569facced Use ANSI function decls. 2005-06-27 02:19:48 +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 e1245a3c46 Rework the coredump code to have no explicit knownledge of how coredump
i/o is done.  Instead, pass an opaque cookie which is then passed to a
new routine, coredump_write, which does the actual i/o.  This allows the
method of doing i/o to change without affecting any future MD code.
Also, make netbsd32_core.c [re]use core_netbsd.c (in a similar manner that
core_elf64.c uses core_elf32.c) and eliminate that code duplication.
cpu_coredump{,32} is now called twice, first with a NULL iocookie to fill
the core structure and a second to actually write md parts of the coredump.
All i/o is nolonger random access and is suitable for shipping over a stream.
2005-06-10 05:10:12 +00:00
matt bb583a82ce Make sure state.end has a valid initial value. 2005-06-07 22:02:48 +00:00
yamt 11bfc2d8e1 introduce a macro to initialize uvm_object and use it. 2005-06-06 12:09:19 +00:00
chs 48e4eb59a3 adapt to const changes. 2005-06-04 13:48:35 +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
drochner d481be4d04 prepend an underscore to local variables in macros, to avoid shadowing
user defined ones
2005-06-01 18:03:50 +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 627b0d5099 remove anon related statistics which are no longer used. 2005-05-15 08:01:06 +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
nathanw 92279c692f uvm_coredump_walkmap(): Set UVM_COREDUMP_NODUMP on regions whose
protection does not include VM_PROT_READ, so that the core dumping
doesn't error out with EFAULT when trying to write that region.

Addresses PR kern/30143; approach suggested by chs@.
2005-05-06 19:34:47 +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 192e24a575 uvm_reclaimable: add an XXX comment. 2005-05-04 23:23:28 +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
yamt 7f37519f2c uvmfault_anonget: check uvm_reclaimable() where appropriate. 2005-04-27 15:19:17 +00:00
yamt 4c61e81438 uvmexp_print: print swpgavail as well. 2005-04-27 11:02:43 +00:00
simonb eddbeffa06 Use a cast to (long long) and 0x%llx to print out a paddr_t instead
of casting to (void *).  Fixes compile problems with 64-bit paddr_t
on 32-bit platforms.
2005-04-20 14:10:03 +00:00
yamt 01c07ef7bd fix unreasonably frequent "killed: out of swap" on systems which have
little or no swap.
- even on a severe swap shortage, if we have some amount of file-backed pages,
  don't bother to kill processes.
- if all pages in queue will be likely reactivated, just give up
  page type balancing rather than spinning unnecessarily.
2005-04-12 13:11:45 +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 a7cd6f7a0e amap_wipeout: remove a comment which is no longer true.
despite of what comment said, i left preempt() call
because i don't think of any bad effects.
2005-04-06 13:58:40 +00:00
yamt b02ae403bb switch swap space allocation code to use blist instead of extent(9).
fix "warning: resource shortage: %d pages of swap lost".

extent(9) has some undesirable characteristics for swap allocation:
	- it involves alloc-to-free.
	- its operational cost is O(n*n) where n is number of entries.
2005-04-06 13:51:33 +00:00
yamt cde0e21683 unwrap short lines. 2005-04-01 12:37:27 +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
fvdl c487efe4a7 Fix some things regarding COMPAT_NETBSD32 and limits/VM addresses.
* For sparc64 and amd64, define *SIZ32 VM constants.
* Add a new function pointer to struct emul, pointing at a function
  that will return the default VM map address. The default function
  is uvm_map_defaultaddr, which just uses the VM_DEFAULT_ADDRESS
  macro. This gives emulations control over the default map address,
  and allows things to be mapped at the right address (in 32bit range)
  for COMPAT_NETBSD32.
* Add code to adjust the data and stack limits when a COMPAT_NETBSD32
  or COMPAT_SVR4_32 binary is executed.
* Don't use USRSTACK in kern_resource.c, use p_vmspace->vm_minsaddr
  instead (emulations might have set it differently)
* Since this changes struct emul, bump kernel version to 3.99.2

Tested on amd64, compile-tested on sparc64.
2005-03-26 05:12:34 +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
chs 64d6a08278 use TRUE and FALSE instead of 1 and 0 for boolean_t. 2005-02-28 15:33:04 +00:00
chs 81a6b7303b add some locking assertions. 2005-02-28 15:31:04 +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
yamt a8acd82f94 update a comment; malloc doesn't use uvm_kernacc anymore. 2005-02-08 08:22:37 +00:00
yamt 9fe116ce3a uvm_fault: fix integer overflow so that MADV_SEQUENTIAL
can work on large files.
2005-02-07 11:57:38 +00:00
chs 6390d0aeca hack around a UVM problem that causes hangs when large processes fork.
see PR 26908 for details.
2005-01-30 17:23:05 +00:00
chs ad79fc3015 move the call to link_pool_init() to the end of uvm_init(). needed for sun3. 2005-01-23 19:02:02 +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
chs 7c203c91d4 reduce the size of user coredump files by not dumping regions of
the address space that have never been touched (such as much of the
virtual space allocated for pthread stacks).
2005-01-21 03:24:40 +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 b855149311 remove no longer needed #include. 2005-01-16 06:48:38 +00:00
chs a877481d76 deal with alpha's architectural failing of not being able to operate on
memory quantities smaller than 32 bits.
2005-01-15 15:10:49 +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
chs 8975a0856f adjust the UBC mapping code to support non-vnode uvm_objects.
this means we can no longer look at the vnode size to determine how many
pages to request in a fault, which is good since for NFS the size can change
out from under us on the server anyway.  there's also a new flag UBC_UNMAP
for ubc_release(), so that the file system code can make the decision about
whether to cache mappings for files being used as executables.
2005-01-09 16:42:43 +00:00
yamt 22cf117f61 km_vacache_alloc: UVM_PROT_ALL rather than UVM_PROT_NONE
so that uvm_kernacc works.  PR/28861. (FUKAUMI Naoki)
2005-01-05 00:58:57 +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 0c5ceb72e4 km_vacache_alloc: specify va hint correctly rather than
using stack garbage.  PR/28845.
2005-01-03 04:01:13 +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 a880e5e2b5 in the case of !PMAP_MAP_POOLPAGE, gather pool backend allocations to
large chunks for kernel_map and kmem_map to ease kva fragmentation.
2005-01-01 21:08:02 +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 c4d95d51f4 uvm_fault: pass NULL pap to pmap_extract where we don't need paddr. 2005-01-01 09:14:49 +00:00