The NetBSD Project

CVS log for src/sys/uvm/uvm_map.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / uvm

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.324 / (download) - annotate - [select for diffs], Fri Nov 2 16:43:16 2012 UTC (6 months, 2 weeks ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, tls-maxphys-nbase, tls-maxphys-base, khorben-n900, agc-symver-base, agc-symver, HEAD
Changes since 1.323: +7 -4 lines
Diff to previous 1.323 (colored)

When uvm_io reserves kernel address space, make sure it's starts with the
same color as the user address space being copied.

Revision 1.323 / (download) - annotate - [select for diffs], Mon Oct 29 16:00:05 2012 UTC (6 months, 3 weeks ago) by para
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Changes since 1.322: +17 -23 lines
Diff to previous 1.322 (colored)

get rid of not used uvm_map flag (UVM_MAP_KMAPENT)

Revision 1.322 / (download) - annotate - [select for diffs], Tue Sep 4 13:37:42 2012 UTC (8 months, 2 weeks ago) by matt
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.321: +2 -4 lines
Diff to previous 1.321 (colored)

Remove locking since it isn't needed.  As soon as the 2nd uvm_map_entry in kernel_map
is created, uvm_map_prepare will call pmap_growkernel and the pmap_growkernel call in
uvm_km_mem_alloc will never be called again.

Revision 1.321 / (download) - annotate - [select for diffs], Mon Sep 3 19:53:42 2012 UTC (8 months, 2 weeks ago) by matt
Branch: MAIN
Changes since 1.320: +4 -4 lines
Diff to previous 1.320 (colored)

Switch to a spin lock (uvm_kentry_lock) which, fortunately, was sitting there
unused.

Revision 1.320 / (download) - annotate - [select for diffs], Mon Sep 3 17:30:04 2012 UTC (8 months, 2 weeks ago) by matt
Branch: MAIN
Changes since 1.319: +4 -2 lines
Diff to previous 1.319 (colored)

Cleanup comment.  Change panic to KASSERTMSG.
Use kernel_map->misc_lock to make sure we don't call pmap_growkernel
concurrently and possibly mess up uvm_maxkaddr.

Revision 1.319 / (download) - annotate - [select for diffs], Sat Aug 18 14:28:04 2012 UTC (9 months ago) by chs
Branch: MAIN
Changes since 1.318: +3 -4 lines
Diff to previous 1.318 (colored)

avoid leaking a uvm_object reference when merging a new map entry
with the entries on both sides.  fixes PR 46807.

Revision 1.318 / (download) - annotate - [select for diffs], Mon Jul 30 23:56:48 2012 UTC (9 months, 3 weeks ago) by matt
Branch: MAIN
Changes since 1.317: +6 -2 lines
Diff to previous 1.317 (colored)

-fno-common broke kernhist since it used commons.
Add a KERNHIST_DEFINE which is define the kernel history.
Change UVM to deal with the new usage.

Revision 1.317 / (download) - annotate - [select for diffs], Sun Apr 8 11:27:45 2012 UTC (13 months, 1 week ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Changes since 1.316: +25 -15 lines
Diff to previous 1.316 (colored)

Rework posix_spawn locking and memory management:
 - always provide a vmspace for the new proc, initially borrowing from proc0
   (this part fixes PR 46286)
 - increase parallelism between parent and child if arguments allow this,
   avoiding a potential deadlock on exec_lock
 - add a new flag for userland to request old (lockstepped) behaviour for
   better error reporting
 - adapt test cases to the previous two and add a new variant to test the
   diagnostics flag
 - fix a few memory (and lock) leaks
 - provide netbsd32 compat

Revision 1.316 / (download) - annotate - [select for diffs], Tue Mar 13 18:41:15 2012 UTC (14 months, 1 week ago) by elad
Branch: MAIN
CVS Tags: jmcneill-usbmp-base8
Changes since 1.315: +4 -6 lines
Diff to previous 1.315 (colored)

Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

    http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
    http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
    http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.

Revision 1.315 / (download) - annotate - [select for diffs], Mon Feb 20 19:14:23 2012 UTC (15 months ago) by bouyer
Branch: MAIN
CVS Tags: jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Changes since 1.314: +2 -3 lines
Diff to previous 1.314 (colored)

When using uvm_km_pgremove_intrsafe() make sure mappings are removed
before returning the pages to the free pool. Otherwise, under Xen,
a page which still has a writable mapping could be allocated for
a PDP by another CPU and the hypervisor would refuse it (this is
PR port-xen/45975).
For this, move the pmap_kremove() calls inside uvm_km_pgremove_intrsafe(),
and do pmap_kremove()/uvm_pagefree() in batch of (at most) 16 entries
(as suggested by Chuck Silvers on tech-kern@, see also
http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012727.html and
followups).

Revision 1.314 / (download) - annotate - [select for diffs], Sun Feb 19 00:05:56 2012 UTC (15 months ago) by rmind
Branch: MAIN
Changes since 1.313: +22 -55 lines
Diff to previous 1.313 (colored)

Remove VM_MAP_INTRSAFE and related code.  Not used since the "kmem changes".

Revision 1.313 / (download) - annotate - [select for diffs], Sun Feb 12 20:28:14 2012 UTC (15 months, 1 week ago) by martin
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.312: +6 -3 lines
Diff to previous 1.312 (colored)

Fix another merge botch - bracket vm space assignement with kpreempt-
disable/enable.

Revision 1.312 / (download) - annotate - [select for diffs], Sat Jan 28 00:00:06 2012 UTC (15 months, 3 weeks ago) by rmind
Branch: MAIN
Changes since 1.311: +5 -6 lines
Diff to previous 1.311 (colored)

pool_page_alloc, pool_page_alloc_meta: avoid extra compare, use const.
ffs_mountfs,sys_swapctl: replace memset with kmem_zalloc.
sys_swapctl: move kmem_free outside the lock path.
uvm_init: fix comment, remove pointless numeration of steps.
uvm_map_enter: remove meflagval variable.
Fix some indentation.

Revision 1.311 / (download) - annotate - [select for diffs], Fri Jan 27 19:48:41 2012 UTC (15 months, 3 weeks ago) by para
Branch: MAIN
Changes since 1.310: +54 -607 lines
Diff to previous 1.310 (colored)

extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(with private interface for interrupt safety reasons)

releng@ acknowledged

Revision 1.310 / (download) - annotate - [select for diffs], Thu Jan 5 15:19:53 2012 UTC (16 months, 2 weeks ago) by reinoud
Branch: MAIN
Changes since 1.309: +2 -70 lines
Diff to previous 1.309 (colored)

Revert MAP_NOSYSCALLS patch.

Revision 1.309 / (download) - annotate - [select for diffs], Thu Dec 22 13:12:50 2011 UTC (16 months, 4 weeks ago) by reinoud
Branch: MAIN
Changes since 1.308: +10 -20 lines
Diff to previous 1.308 (colored)

Redo uvm_map_setattr() to never fail and remove the possible panic. The
possibility of failure was a C&P error.

Revision 1.308 / (download) - annotate - [select for diffs], Tue Dec 20 15:39:35 2011 UTC (17 months ago) by reinoud
Branch: MAIN
Changes since 1.307: +80 -2 lines
Diff to previous 1.307 (colored)

Add a MAP_NOSYSCALLS flag to mmap. This flag prohibits executing of system
calls from the mapped region. This can be used for emulation perposed or for
extra security in the case of generated code.

Its implemented by adding mapping-attributes to each uvm_map_entry. These can
then be queried when needed.

Currently the MAP_NOSYSCALLS is only implemented for x86 but other
architectures are easy to adapt; see the sys/arch/x86/x86/syscall.c patch.
Port maintainers are encouraged to add them for their processor ports too.
When this feature is not yet implemented for an architecture the
MAP_NOSYSCALLS is simply ignored with virtually no cpu cost..

Revision 1.307 / (download) - annotate - [select for diffs], Tue Dec 20 13:47:38 2011 UTC (17 months ago) by yamt
Branch: MAIN
Changes since 1.306: +18 -2 lines
Diff to previous 1.306 (colored)

comment and assertion

Revision 1.306 / (download) - annotate - [select for diffs], Wed Nov 23 01:00:52 2011 UTC (17 months, 4 weeks ago) by matt
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.305: +7 -2 lines
Diff to previous 1.305 (colored)

When allocating pages for kernel map entries and PMAP_ALLOC_POOLPAGE is
defined, use it.  (allows a MIPS N32 kernel to boot when there is memory
outside of KSEG0).

Revision 1.305 / (download) - annotate - [select for diffs], Tue Sep 27 01:02:39 2011 UTC (19 months, 3 weeks ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.304: +3 -4 lines
Diff to previous 1.304 (colored)

Modify *ASSERTMSG() so they are now used as variadic macros. The main goal
is to provide routines that do as KASSERT(9) says: append a message
to the panic format string when the assertion triggers, with optional
arguments.

Fix call sites to reflect the new definition.

Discussed on tech-kern@. See
http://mail-index.netbsd.org/tech-kern/2011/09/07/msg011427.html

Revision 1.304 / (download) - annotate - [select for diffs], Thu Sep 1 06:40:28 2011 UTC (20 months, 2 weeks ago) by matt
Branch: MAIN
Changes since 1.303: +36 -14 lines
Diff to previous 1.303 (colored)

Forward some UVM from matt-nb5-mips64.  Add UVM_KMF_COLORMATCH flag.
When uvm_map gets passed UVM_FLAG_COLORMATCH, the align argument contains
the color of the starting address to be allocated (0..colormask).
When uvm_km_alloc is passed UVM_KMF_COLORMATCH (which can only be used with
UVM_KMF_VAONLY), the align argument contain the color of the starting address
to be allocated.
Change uvm_pagermapin to use this.  When mapping user pages in the kernel,
if colormatch is used with the color of the starting user page then the kernel
mapping will be congruent with the existing user mappings.

Revision 1.303 / (download) - annotate - [select for diffs], Sat Aug 6 17:25:03 2011 UTC (21 months, 2 weeks ago) by rmind
Branch: MAIN
Changes since 1.302: +6 -6 lines
Diff to previous 1.302 (colored)

- Rework uvm_anfree() into uvm_anon_freelst(), which always drops the lock.
- Free anons in uvm_anon_freelst() without lock held.
- Mechanic sync to unused loaning code.

Revision 1.302 / (download) - annotate - [select for diffs], Sat Jul 30 20:05:46 2011 UTC (21 months, 3 weeks ago) by martin
Branch: MAIN
Changes since 1.301: +14 -3 lines
Diff to previous 1.301 (colored)

Make uvmspace_exec() deal with procs that have no vmspace (yet) at all.
Greatly simplifies the upcoming posix_spawn implementation.

Revision 1.301 / (download) - annotate - [select for diffs], Sat Jul 30 19:29:12 2011 UTC (21 months, 3 weeks ago) by martin
Branch: MAIN
Changes since 1.300: +2 -6 lines
Diff to previous 1.300 (colored)

Get rid of #ifdef __sparc__ in uvm code - as noted by cgd back 1996,
now that we have __HAVE_CPU_VMSPACE_EXEC/cpu_vmspace_exec().

Revision 1.300 / (download) - annotate - [select for diffs], Tue Jul 5 14:03:07 2011 UTC (22 months, 2 weeks ago) by yamt
Branch: MAIN
Changes since 1.299: +4 -51 lines
Diff to previous 1.299 (colored)

- fix a use-after-free bug in uvm_km_free.
  (after uvm_km_pgremove frees pages, the following pmap_remove touches them.)
- acquire the object lock for operations on pmap_kernel as it can actually be
  raced with P->V operations.  eg. pagedaemon.

Revision 1.299 / (download) - annotate - [select for diffs], Mon Jun 13 23:19:40 2011 UTC (23 months, 1 week ago) by rmind
Branch: MAIN
Changes since 1.298: +8 -8 lines
Diff to previous 1.298 (colored)

uvm_map_lock_entry: fix the order of locking.  Spotted by yamt@.
Also, keep uvm_map_unlock_entry() symmetric.

Revision 1.298 / (download) - annotate - [select for diffs], Sun Jun 12 03:36:03 2011 UTC (23 months, 1 week ago) by rmind
Branch: MAIN
Changes since 1.297: +47 -14 lines
Diff to previous 1.297 (colored)

Welcome to 5.99.53!  Merge rmind-uvmplock branch:

- Reorganize locking in UVM and provide extra serialisation for pmap(9).
  New lock order: [vmpage-owner-lock] -> pmap-lock.

- Simplify locking in some pmap(9) modules by removing P->V locking.

- Use lock object on vmobjlock (and thus vnode_t::v_interlock) to share
  the locks amongst UVM objects where necessary (tmpfs, layerfs, unionfs).

- Rewrite and optimise x86 TLB shootdown code, make it simpler and cleaner.
  Add TLBSTATS option for x86 to collect statistics about TLB shootdowns.

- Unify /dev/mem et al in MI code and provide required locking (removes
  kernel-lock on some ports).  Also, avoid cache-aliasing issues.

Thanks to Andrew Doran and Joerg Sonnenberger, as their initial patches
formed the core changes of this branch.

Revision 1.297 / (download) - annotate - [select for diffs], Tue May 17 04:18:07 2011 UTC (2 years ago) by mrg
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.296: +4 -4 lines
Diff to previous 1.296 (colored)

move and rename the uvm history code out of uvm_stat to "kernhist".

rename "UVMHIST" option to enable the uvm histories.

TODO:
- make UVMHIST properly depend upon KERNHIST
- enable dynamic registration of histories.  this is mostly just
  allocating something in a bitmap, and is only for viewing multiple
  histories in a merged form.


tested on amd64 and sparc64.

Revision 1.296 / (download) - annotate - [select for diffs], Fri Apr 8 10:38:36 2011 UTC (2 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.295: +7 -6 lines
Diff to previous 1.295 (colored)

comment

Revision 1.295 / (download) - annotate - [select for diffs], Wed Feb 2 15:25:27 2011 UTC (2 years, 3 months ago) by chuck
Branch: MAIN
CVS Tags: uebayasi-xip-base7, bouyer-quota2-nbase, bouyer-quota2-base
Changes since 1.294: +3 -8 lines
Diff to previous 1.294 (colored)

udpate license clauses on my code to match the new-style BSD licenses.
based on second diff that rmind@ sent me.

no functional change with this commit.

Revision 1.294 / (download) - annotate - [select for diffs], Tue Jan 4 08:21:18 2011 UTC (2 years, 4 months ago) by matt
Branch: MAIN
CVS Tags: jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.293: +5 -2 lines
Diff to previous 1.293 (colored)

Add a MD hook to indicate a change of vmspace due to exec.  (This is useful
to update any cpu flag due to a change to/from a 64bit and a 32bit address
space).  This can set the state needed for copyout/copyin before setregs
is invoked.

Revision 1.293 / (download) - annotate - [select for diffs], Fri Sep 24 22:51:51 2010 UTC (2 years, 7 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, matt-mips64-premerge-20101231
Changes since 1.292: +35 -28 lines
Diff to previous 1.292 (colored)

Fixes/improvements to RB-tree implementation:
1. Fix inverted node order, so that negative value from comparison operator
   would represent lower (left) node, and positive - higher (right) node.
2. Add an argument (i.e. "context"), passed to comparison operators.
3. Change rb_tree_insert_node() to return a node - either inserted one or
   already existing one.
4. Amend the interface to manipulate the actual object, instead of the
   rb_node (in a similar way as Patricia-tree interface does).
5. Update all RB-tree users accordingly.

XXX: Perhaps rename rb.h to rbtree.h, since cleaning-up..

1-3 address the PR/43488 by Jeremy Huddleston.

Passes RB-tree regression tests.
Reviewed by: matt@, christos@

Revision 1.292 / (download) - annotate - [select for diffs], Tue Jun 22 18:34:50 2010 UTC (2 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base10, uebayasi-xip-base2
Changes since 1.291: +10 -2 lines
Diff to previous 1.291 (colored)

Keep the lock around pmap_update() where required.  While fixing this
in ubc_fault(), rework logic to "remember" the last object of page and
reduce locking overhead, since in common case pages belong to one and
the same UVM object (but not always, therefore add a comment).

Unlocks before pmap_update(), on removal of mappings, might cause TLB
coherency issues, since on architectures like x86 and mips64 invalidation
IPIs are deferred to pmap_update().  Hence, VA space might be globally
visible before IPIs are sent or while they are still in-flight.

OK ad@.

Revision 1.291 / (download) - annotate - [select for diffs], Fri May 14 05:32:06 2010 UTC (3 years ago) by cegger
Branch: MAIN
Changes since 1.290: +3 -3 lines
Diff to previous 1.290 (colored)

Move PMAP_KMPAGE to be used in pmap_kenter_pa flags argument.
'Looks good to me' gimpy@

Forgot to commit this piece in previous commit

Revision 1.290 / (download) - annotate - [select for diffs], Sun Feb 21 13:17:50 2010 UTC (3 years, 2 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Changes since 1.289: +15 -15 lines
Diff to previous 1.289 (colored)

rename the va0_disabled option and cpp conditional to "disable" as well,
for consistency, and document option and sysctl flag

Revision 1.289 / (download) - annotate - [select for diffs], Sat Feb 20 13:21:58 2010 UTC (3 years, 3 months ago) by drochner
Branch: MAIN
Changes since 1.288: +3 -3 lines
Diff to previous 1.288 (colored)

rename the new sysctl to "vm.user_va0_disable", for consistency
with the majority of existing sysctl flags, suggested by yamt

Revision 1.288 / (download) - annotate - [select for diffs], Thu Feb 18 14:57:01 2010 UTC (3 years, 3 months ago) by drochner
Branch: MAIN
Changes since 1.287: +61 -2 lines
Diff to previous 1.287 (colored)

Disable mapping of virtual address 0 by user programs per default.
This blocks an easy exploit of kernel bugs leading to dereference
of a NULL pointer on some architectures (eg i386).
The check can be disabled in various ways:
-by CPP definitions in machine/types.h (portmaster's choice)
-by a kernel config option USER_VA0_DISABLED_DEFAULT=0
-at runtime by sysctl vm.user_va0_disabled (cannot be cleared
 at securelevel>0)

Revision 1.287 / (download) - annotate - [select for diffs], Mon Feb 8 19:02:33 2010 UTC (3 years, 3 months ago) by joerg
Branch: MAIN
Changes since 1.286: +3 -3 lines
Diff to previous 1.286 (colored)

Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.

Revision 1.286 / (download) - annotate - [select for diffs], Tue Dec 15 06:15:11 2009 UTC (3 years, 5 months ago) by matt
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.285: +7 -5 lines
Diff to previous 1.285 (colored)

Use PRIxVADDR... (change a printf/panic -> panic)

Revision 1.285 / (download) - annotate - [select for diffs], Mon Dec 14 21:19:47 2009 UTC (3 years, 5 months ago) by matt
Branch: MAIN
Changes since 1.284: +3 -3 lines
Diff to previous 1.284 (colored)

Use PRIxVADDR ...

Revision 1.284 / (download) - annotate - [select for diffs], Sat Nov 7 07:27:49 2009 UTC (3 years, 6 months ago) by cegger
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.283: +3 -3 lines
Diff to previous 1.283 (colored)

Add a flags argument to pmap_kenter_pa(9).
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006434.html
No objections.

Revision 1.283 / (download) - annotate - [select for diffs], Sun Nov 1 11:16:32 2009 UTC (3 years, 6 months ago) by uebayasi
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.282: +4 -4 lines
Diff to previous 1.282 (colored)

Consistently call amap / uobj layers as upper / lower, because UVM has only
those two layers by design.  Approved by Chuck Cranor some time ago.

Revision 1.282 / (download) - annotate - [select for diffs], Sun Sep 6 23:14:19 2009 UTC (3 years, 8 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8
Changes since 1.281: +6 -2 lines
Diff to previous 1.281 (colored)

uvmspace_unshare: #if 0-out this function.  Q: perhaps remove?
AFAIK it was not used for 11 years.

Revision 1.281 / (download) - annotate - [select for diffs], Wed Aug 19 04:53:20 2009 UTC (3 years, 9 months ago) by matt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7
Changes since 1.280: +2 -4 lines
Diff to previous 1.280 (colored)

In uvm_kmapent_alloc, Make sure entry is initialized.
Spotted by msaitoh.

Revision 1.280 / (download) - annotate - [select for diffs], Tue Aug 18 19:16:09 2009 UTC (3 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.279: +41 -81 lines
Diff to previous 1.279 (colored)

Move uvm_object-related DDB hooks into uvm_object.c.  Put all of the
uvm_map-related DDB stuff in one spot in the file.

Revision 1.279 / (download) - annotate - [select for diffs], Tue Aug 18 19:08:39 2009 UTC (3 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.278: +3 -118 lines
Diff to previous 1.278 (colored)

Move uvm_page-related DDB hooks into uvm_page.c.

Revision 1.278 / (download) - annotate - [select for diffs], Thu Aug 13 03:21:03 2009 UTC (3 years, 9 months ago) by matt
Branch: MAIN
Changes since 1.277: +3 -3 lines
Diff to previous 1.277 (colored)

Fix KASSERT() failure reported by Geoff Wing.

Revision 1.277 / (download) - annotate - [select for diffs], Mon Aug 10 16:49:30 2009 UTC (3 years, 9 months ago) by matt
Branch: MAIN
Changes since 1.276: +3 -3 lines
Diff to previous 1.276 (colored)

Compare vaddr_t against 0, not NULL.

Revision 1.276 / (download) - annotate - [select for diffs], Sun Aug 9 22:13:07 2009 UTC (3 years, 9 months ago) by matt
Branch: MAIN
Changes since 1.275: +42 -11 lines
Diff to previous 1.275 (colored)

If PMAP_MAP_POOLPAGE is defined, use it to map kernel map entries.  This
avoids TLB pollution on those platforms that define it.

Revision 1.275 / (download) - annotate - [select for diffs], Sat Aug 1 16:35:51 2009 UTC (3 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.274: +16 -7 lines
Diff to previous 1.274 (colored)

- uvm_map_extract: update map->size correctly for !UVM_EXTRACT_CONTIG.
- uvm_map_extract: panic on zero-sized entries.
- make uvm_map_replace static.

Revision 1.274 / (download) - annotate - [select for diffs], Sat Aug 1 15:36:07 2009 UTC (3 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.273: +2 -11 lines
Diff to previous 1.273 (colored)

don't call uvm_map_check with map unlocked.

Revision 1.273 / (download) - annotate - [select for diffs], Sat Aug 1 15:32:02 2009 UTC (3 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.272: +6 -3 lines
Diff to previous 1.272 (colored)

_uvm_tree_sanity: fix an assertion.

Revision 1.272 / (download) - annotate - [select for diffs], Sat Aug 1 15:30:33 2009 UTC (3 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.271: +4 -3 lines
Diff to previous 1.271 (colored)

_uvm_map_sanity: fix a race which causes "stale hint".

Revision 1.271 / (download) - annotate - [select for diffs], Wed Jun 10 01:55:33 2009 UTC (3 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Changes since 1.270: +54 -2 lines
Diff to previous 1.270 (colored)

on MADV_WILLNEED, start prefetching backing object's pages.

Revision 1.270 / (download) - annotate - [select for diffs], Sun May 3 16:52:54 2009 UTC (4 years ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, jym-xensuspend-base
Changes since 1.269: +6 -6 lines
Diff to previous 1.269 (colored)

Include some debug print routines if DEBUGPRINT is defined.  This
way they can be included without having to include DDB.
(arguably all print routines should be behind #ifdef DEBUGPRINT
and options DDB should define that macro, but I'll tackle that later)

Revision 1.269 / (download) - annotate - [select for diffs], Tue Jan 13 14:04:35 2009 UTC (4 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.268: +5 -2 lines
Diff to previous 1.268 (colored)

vm_map_locked_p: add comments

Revision 1.268 / (download) - annotate - [select for diffs], Sat Dec 20 11:33:38 2008 UTC (4 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.267: +3 -3 lines
Diff to previous 1.267 (colored)

Move a couple of calls to pmap_update().

Revision 1.267 / (download) - annotate - [select for diffs], Wed Dec 17 20:51:39 2008 UTC (4 years, 5 months ago) by cegger
Branch: MAIN
Changes since 1.266: +3 -4 lines
Diff to previous 1.266 (colored)

kill MALLOC and FREE macros.

Revision 1.266 / (download) - annotate - [select for diffs], Tue Dec 16 22:35:38 2008 UTC (4 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.265: +4 -4 lines
Diff to previous 1.265 (colored)

replace bitmask_snprintf(9) with snprintb(3)

Revision 1.265 / (download) - annotate - [select for diffs], Sat Dec 13 11:34:43 2008 UTC (4 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.264: +4 -3 lines
Diff to previous 1.264 (colored)

It's easier for kernel reserve pages to be consumed because the pagedaemon
serves as less of a barrier these days. Restrict provision of kernel reserve
pages to kmem and one of these cases:

- doing a NOWAIT allocation
- caller is a realtime thread
- caller is a kernel thread
- explicitly requested, for example by the pmap

Revision 1.264 / (download) - annotate - [select for diffs], Mon Dec 1 10:54:57 2008 UTC (4 years, 5 months ago) by ad
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.263: +6 -7 lines
Diff to previous 1.263 (colored)

PR port-amd64/32816 amd64 can not load lkms

Change some assertions to partially allow for VM_MAP_IS_KERNEL(map) where
map is outside the range of kernel_map.

Revision 1.263 / (download) - annotate - [select for diffs], Tue Jul 29 00:03:06 2008 UTC (4 years, 9 months ago) by matt
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base, netbsd-5-base, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.262: +226 -108 lines
Diff to previous 1.262 (colored)

Make uvm_map.? use <sys/rb.h> instead of <sys/tree.h>.  Change the
ambiguous members ownspace/space to gap/maxgap.  Add some evcnt for
evaluation of lookups using tree/list.  Drop threshold of using
tree for lookups from > 30 to > 15.

Bump kernel version to 4.99.71

Revision 1.262 / (download) - annotate - [select for diffs], Wed Jul 16 00:11:27 2008 UTC (4 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.261: +4 -3 lines
Diff to previous 1.261 (colored)

Add PMAP_KMPAGE flag for pmap_kenter_pa.  This allows pmaps to know that
the page being entered is being for the kernel memory allocator.  Such pages
should have no references and don't need bookkeeping.

Revision 1.261 / (download) - annotate - [select for diffs], Fri Jul 11 07:09:18 2008 UTC (4 years, 10 months ago) by skrll
Branch: MAIN
Changes since 1.260: +3 -3 lines
Diff to previous 1.260 (colored)

English improvement in comments.

"seems good to me :)" from yamt.

Revision 1.260 / (download) - annotate - [select for diffs], Fri Jun 6 14:01:32 2008 UTC (4 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl, haad-dm
Changes since 1.259: +2 -4 lines
Diff to previous 1.259 (colored)

Back out previous.

Revision 1.259 / (download) - annotate - [select for diffs], Fri Jun 6 13:52:56 2008 UTC (4 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.258: +4 -2 lines
Diff to previous 1.258 (colored)

Wrap an expensive check in DIAGNOSTIC.

Revision 1.258 / (download) - annotate - [select for diffs], Wed Jun 4 17:47:40 2008 UTC (4 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.257: +14 -10 lines
Diff to previous 1.257 (colored)

- Switch off the map evcnts by default.
- SAVE_HINT() doesn't need to be atomic.

Revision 1.257 / (download) - annotate - [select for diffs], Wed Jun 4 12:41:40 2008 UTC (4 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.256: +6 -6 lines
Diff to previous 1.256 (colored)

vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both.

Revision 1.256 / (download) - annotate - [select for diffs], Mon Jun 2 16:08:41 2008 UTC (4 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3
Changes since 1.255: +2 -4 lines
Diff to previous 1.255 (colored)

Don't needlessly acquire v_interlock.

Revision 1.255 / (download) - annotate - [select for diffs], Sat May 31 13:00:03 2008 UTC (4 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.254: +3 -2 lines
Diff to previous 1.254 (colored)

Missing cv_destroy().

Revision 1.254 / (download) - annotate - [select for diffs], Sun Apr 27 11:39:47 2008 UTC (5 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, yamt-nfs-mp-base, hpcarm-cleanup-nbase
Branch point for: yamt-nfs-mp, wrstuden-revivesa
Changes since 1.253: +6 -2 lines
Diff to previous 1.253 (colored)

Disable preemption while swapping pmap.

Revision 1.253 / (download) - annotate - [select for diffs], Sat Apr 26 13:44:00 2008 UTC (5 years ago) by yamt
Branch: MAIN
Changes since 1.252: +13 -6 lines
Diff to previous 1.252 (colored)

fix a locking botch.  PR/38415 from Wolfgang Solfrank.

Revision 1.252 / (download) - annotate - [select for diffs], Tue Mar 4 09:32:01 2008 UTC (5 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Branch point for: yamt-pf42
Changes since 1.251: +4 -4 lines
Diff to previous 1.251 (colored)

fix "stale map" assertions.  PR/38153 from Sarton O'Brien.

Revision 1.251 / (download) - annotate - [select for diffs], Sat Feb 23 17:27:58 2008 UTC (5 years, 2 months ago) by chris
Branch: MAIN
CVS Tags: hpcarm-cleanup-base
Changes since 1.250: +3 -2 lines
Diff to previous 1.250 (colored)

Add some more missing pmap_update()s following pmap_kremove()s.

Revision 1.250 / (download) - annotate - [select for diffs], Fri Jan 18 10:48:23 2008 UTC (5 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.249: +2 -3 lines
Diff to previous 1.249 (colored)

push pmap_clear_reference calls into pdpolicy code, where reference bits
actually matter.

Revision 1.249 / (download) - annotate - [select for diffs], Tue Jan 8 13:09:55 2008 UTC (5 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.248: +10 -45 lines
Diff to previous 1.248 (colored)

simplify locking and remove vm_map_upgrade/downgrade.
this fixes a deadlock due to read-lock recursion of map->lock.

Revision 1.248 / (download) - annotate - [select for diffs], Wed Jan 2 11:49:18 2008 UTC (5 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.247: +132 -57 lines
Diff to previous 1.247 (colored)

Merge vmlocking2 to head.

Revision 1.247 / (download) - annotate - [select for diffs], Thu Dec 13 02:45:11 2007 UTC (5 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-kmem-base3, vmlocking2-base3
Changes since 1.246: +55 -17 lines
Diff to previous 1.246 (colored)

add ddb "whatis" command.  inspired from solaris ::whatis dcmd.

Revision 1.246 / (download) - annotate - [select for diffs], Mon Nov 26 08:22:32 2007 UTC (5 years, 5 months ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-kmem-base2, yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: yamt-kmem, vmlocking2, bouyer-xeni386
Changes since 1.245: +4 -3 lines
Diff to previous 1.245 (colored)

Make this build without LOCKDEBUG (the if statement that uses
LOCKDEBUG_MEM_CHECK).

Revision 1.245 / (download) - annotate - [select for diffs], Mon Nov 26 08:20:46 2007 UTC (5 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.244: +3 -0 lines
Diff to previous 1.244 (colored)

uvm_map_extract: for UVM_EXTRACT_QREF, mark entries UVM_MAP_NOMERGE.

Revision 1.244 / (download) - annotate - [select for diffs], Mon Nov 26 08:15:19 2007 UTC (5 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.243: +3 -0 lines
Diff to previous 1.243 (colored)

uvm_unmap1: LOCKDEBUG_MEM_CHECK for kernel_map.

Revision 1.243 / (download) - annotate - [select for diffs], Mon Oct 15 11:24:30 2007 UTC (5 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs
Changes since 1.242: +4 -4 lines
Diff to previous 1.242 (colored)

uvm_map_reserve: don't ignore alignment.  fixes mremap.

Revision 1.242 / (download) - annotate - [select for diffs], Fri Oct 12 06:45:17 2007 UTC (5 years, 7 months ago) by skrll
Branch: MAIN
CVS Tags: yamt-x86pmap-base3, vmlocking-base
Changes since 1.241: +4 -3 lines
Diff to previous 1.241 (colored)

Don't restrict the offset when allocating a map entry for in-kernel map -
use UVM_UNKNOWN_OFFSET in the call to uvm_map_prepare.

This fixes a '"panic: malloc: out of space in kmem_map" when it's not
really' testcase of mine, and one reported to me by chuq. This is likely
to fix PR/35587 as well.

Looks/seems fine to me from chuq and yamt. Thanks.

Revision 1.241 / (download) - annotate - [select for diffs], Wed Oct 10 20:42:41 2007 UTC (5 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.240: +6 -3 lines
Diff to previous 1.240 (colored)

Merge from vmlocking:

- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.

Revision 1.240 / (download) - annotate - [select for diffs], Mon Aug 20 13:34:52 2007 UTC (5 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap, matt-armv6
Changes since 1.239: +3 -3 lines
Diff to previous 1.239 (colored)

Also initialize map->lock for INTRSAFE maps.

Revision 1.239 / (download) - annotate - [select for diffs], Mon Aug 20 13:33:47 2007 UTC (5 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.238: +6 -2 lines
Diff to previous 1.238 (colored)

uvmspace_free: destroy locks.

Revision 1.238 / (download) - annotate - [select for diffs], Sat Jul 21 19:21:54 2007 UTC (5 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, jmcneill-pm
Changes since 1.237: +174 -63 lines
Diff to previous 1.237 (colored)

Merge unobtrusive locking changes from the vmlocking branch.

Revision 1.237 / (download) - annotate - [select for diffs], Mon Jul 9 21:11:36 2007 UTC (5 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.236: +3 -3 lines
Diff to previous 1.236 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.236 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:39 2007 UTC (6 years, 2 months ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.235: +4 -4 lines
Diff to previous 1.235 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.235 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:48 2007 UTC (6 years, 2 months ago) by christos
Branch: MAIN
Branch point for: vmlocking
Changes since 1.234: +3 -3 lines
Diff to previous 1.234 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.234 / (download) - annotate - [select for diffs], Thu Feb 22 06:05:01 2007 UTC (6 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.233: +34 -34 lines
Diff to previous 1.233 (colored)

TRUE -> true, FALSE -> false

Revision 1.233 / (download) - annotate - [select for diffs], Wed Feb 21 23:00:13 2007 UTC (6 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.232: +14 -14 lines
Diff to previous 1.232 (colored)

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.

Revision 1.232 / (download) - annotate - [select for diffs], Wed Nov 1 10:18:27 2006 UTC (6 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RC2, netbsd-4-0-RC1
Branch point for: yamt-idlelwp, wrstuden-fixsa, netbsd-4
Changes since 1.231: +8 -10 lines
Diff to previous 1.231 (colored)

remove some __unused from function parameters.

Revision 1.231 / (download) - annotate - [select for diffs], Thu Oct 26 20:00:52 2006 UTC (6 years, 6 months ago) by uwe
Branch: MAIN
Changes since 1.230: +4 -4 lines
Diff to previous 1.230 (colored)

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.

Revision 1.230 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:52 2006 UTC (6 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.229: +10 -8 lines
Diff to previous 1.229 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.229 / (download) - annotate - [select for diffs], Sat Sep 16 07:14:38 2006 UTC (6 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base
Branch point for: yamt-splraiseipl
Changes since 1.228: +4 -13 lines
Diff to previous 1.228 (colored)

revert a change which was unintentionally slipped in via yamt-pdpolicy branch.

Revision 1.228 / (download) - annotate - [select for diffs], Fri Sep 15 15:51:13 2006 UTC (6 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.227: +16 -14 lines
Diff to previous 1.227 (colored)

merge yamt-pdpolicy branch.
	- separate page replacement policy from the rest of kernel
	- implement an alternative replacement policy

Revision 1.227 / (download) - annotate - [select for diffs], Sun Jun 25 08:03:46 2006 UTC (6 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: newlock2
Changes since 1.226: +1 -1 lines
Diff to previous 1.226 (colored)

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.

Revision 1.226 / (download) - annotate - [select for diffs], Thu May 25 14:27:28 2006 UTC (6 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Changes since 1.225: +42 -13 lines
Diff to previous 1.225 (colored)

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

Revision 1.225 / (download) - annotate - [select for diffs], Sat May 20 15:45:38 2006 UTC (7 years ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5
Changes since 1.224: +2 -11 lines
Diff to previous 1.224 (colored)

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.

Revision 1.224 / (download) - annotate - [select for diffs], Tue May 16 00:08:25 2006 UTC (7 years ago) by elad
Branch: MAIN
Branch point for: chap-midi
Changes since 1.223: +12 -2 lines
Diff to previous 1.223 (colored)

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.

Revision 1.223 / (download) - annotate - [select for diffs], Sun May 14 21:38:17 2006 UTC (7 years ago) by elad
Branch: MAIN
Changes since 1.222: +0 -0 lines
Diff to previous 1.222 (colored)

integrate kauth.

Revision 1.222 / (download) - annotate - [select for diffs], Sun May 14 08:22:50 2006 UTC (7 years ago) by yamt
Branch: MAIN
Changes since 1.221: +88 -44 lines
Diff to previous 1.221 (colored)

- 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.

Revision 1.221 / (download) - annotate - [select for diffs], Sun May 14 08:21:36 2006 UTC (7 years ago) by yamt
Branch: MAIN
Changes since 1.220: +22 -6 lines
Diff to previous 1.220 (colored)

- 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.

Revision 1.220 / (download) - annotate - [select for diffs], Sun May 14 08:20:35 2006 UTC (7 years ago) by yamt
Branch: MAIN
Changes since 1.219: +3 -2 lines
Diff to previous 1.219 (colored)

update first_free correctly.

Revision 1.219 / (download) - annotate - [select for diffs], Wed May 3 14:12:01 2006 UTC (7 years ago) by yamt
Branch: MAIN
CVS Tags: elad-kernelauth-base
Changes since 1.218: +37 -1 lines
Diff to previous 1.218 (colored)

uvm_km_suballoc: consider kva overhead of "kmapent".
fixes PR/31275 (me) and PR/32287 (Christian Biere).

Revision 1.218 / (download) - annotate - [select for diffs], Fri Apr 21 14:03:01 2006 UTC (7 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.217: +85 -52 lines
Diff to previous 1.217 (colored)

- 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@.

Revision 1.217 / (download) - annotate - [select for diffs], Thu Apr 13 01:11:08 2006 UTC (7 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.216: +3 -3 lines
Diff to previous 1.216 (colored)

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?

Revision 1.216 / (download) - annotate - [select for diffs], Wed Mar 15 18:09:25 2006 UTC (7 years, 2 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, peter-altq-base
Branch point for: peter-altq
Changes since 1.215: +5 -5 lines
Diff to previous 1.215 (colored)

-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

Revision 1.215 / (download) - annotate - [select for diffs], Wed Mar 1 12:38:44 2006 UTC (7 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base2, yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, elad-kernelauth
Changes since 1.214: +20 -6 lines
Diff to previous 1.214 (colored)

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.

Revision 1.214 / (download) - annotate - [select for diffs], Wed Feb 22 22:20:56 2006 UTC (7 years, 2 months ago) by bjh21
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Changes since 1.213: +13 -5 lines
Diff to previous 1.213 (colored)

Include page ownership information in the output of the DDB "show all pages"
command if UVM_PAGE_TRKOWN is enabled.

Revision 1.213 / (download) - annotate - [select for diffs], Sun Feb 19 18:52:29 2006 UTC (7 years, 3 months ago) by bjh21
Branch: MAIN
Changes since 1.212: +24 -2 lines
Diff to previous 1.212 (colored)

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.

Revision 1.212 / (download) - annotate - [select for diffs], Wed Feb 15 14:06:45 2006 UTC (7 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.211: +8 -8 lines
Diff to previous 1.211 (colored)

- 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.

Revision 1.211 / (download) - annotate - [select for diffs], Sat Feb 11 12:45:07 2006 UTC (7 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.210: +105 -1 lines
Diff to previous 1.210 (colored)

remove the following options.  no objections on tech-kern@.

	UVM_PAGER_INLINE
	UVM_AMAP_INLINE
	UVM_PAGE_INLINE
	UVM_MAP_INLINE

Revision 1.210 / (download) - annotate - [select for diffs], Sat Jan 21 13:34:15 2006 UTC (7 years, 4 months ago) by yamt
Branch: MAIN
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.209: +18 -10 lines
Diff to previous 1.209 (colored)

implement compat_linux mremap.

Revision 1.209 / (download) - annotate - [select for diffs], Sat Jan 21 13:10:41 2006 UTC (7 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.208: +1 -1 lines
Diff to previous 1.208 (colored)

uvm_map_replace: remove a wrong comment.

Revision 1.208 / (download) - annotate - [select for diffs], Sun Jan 15 08:31:31 2006 UTC (7 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.207: +9 -7 lines
Diff to previous 1.207 (colored)

make some debug statistics evcnt.

Revision 1.207 / (download) - annotate - [select for diffs], Sun Jan 8 09:18:27 2006 UTC (7 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.206: +43 -57 lines
Diff to previous 1.206 (colored)

clean up uvm_map evcnt code.  no functional changes.

Revision 1.206 / (download) - annotate - [select for diffs], Sat Dec 24 20:45:10 2005 UTC (7 years, 4 months ago) by perry
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.205: +12 -12 lines
Diff to previous 1.205 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.205 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:29 2005 UTC (7 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.204: +2 -2 lines
Diff to previous 1.204 (colored)

merge ktrace-lwp.

Revision 1.204 / (download) - annotate - [select for diffs], Tue Jun 28 05:25:42 2005 UTC (7 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Branch point for: yamt-lazymbuf
Changes since 1.203: +3 -3 lines
Diff to previous 1.203 (colored)

Clean up the cpp macro used to say "we're compiling this specific C file".

Revision 1.203 / (download) - annotate - [select for diffs], Tue Jun 28 01:07:56 2005 UTC (7 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.202: +16 -27 lines
Diff to previous 1.202 (colored)

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.

Revision 1.202 / (download) - annotate - [select for diffs], Mon Jun 13 20:39:14 2005 UTC (7 years, 11 months ago) by jmc
Branch: MAIN
Changes since 1.201: +3 -3 lines
Diff to previous 1.201 (colored)

Change signature of uvm_kmapent_map defintiion to __INLINE to match prototype

Revision 1.201 / (download) - annotate - [select for diffs], Fri Jun 10 22:00:52 2005 UTC (7 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.200: +26 -18 lines
Diff to previous 1.200 (colored)

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...

Revision 1.200 / (download) - annotate - [select for diffs], Thu Jun 2 17:01:44 2005 UTC (7 years, 11 months ago) by matt
Branch: MAIN
Changes since 1.199: +3 -3 lines
Diff to previous 1.199 (colored)

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.

Revision 1.199 / (download) - annotate - [select for diffs], Sun May 29 21:06:33 2005 UTC (7 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.198: +11 -11 lines
Diff to previous 1.198 (colored)

avoid shadow variables.
remove unneeded casts.

Revision 1.198 / (download) - annotate - [select for diffs], Sun May 22 21:37:56 2005 UTC (8 years ago) by yamt
Branch: MAIN
Changes since 1.197: +4 -2 lines
Diff to previous 1.197 (colored)

uvm_kmapent_free: add missing vm_map_lock/unlock.

Revision 1.197 / (download) - annotate - [select for diffs], Wed May 18 01:36:16 2005 UTC (8 years ago) by yamt
Branch: MAIN
Changes since 1.196: +11 -6 lines
Diff to previous 1.196 (colored)

uvm_mapent_trymerge: adjust object offset when necessary.

Revision 1.196 / (download) - annotate - [select for diffs], Wed May 18 01:34:53 2005 UTC (8 years ago) by yamt
Branch: MAIN
Changes since 1.195: +4 -3 lines
Diff to previous 1.195 (colored)

redo the previous (uvm_map.c rev.1.195) correctly.

Revision 1.195 / (download) - annotate - [select for diffs], Tue May 17 21:45:24 2005 UTC (8 years ago) by yamt
Branch: MAIN
Changes since 1.194: +10 -8 lines
Diff to previous 1.194 (colored)

uvm_mapent_trymerge: add missing checks.

Revision 1.194 / (download) - annotate - [select for diffs], Tue May 17 13:55:33 2005 UTC (8 years ago) by yamt
Branch: MAIN
Changes since 1.193: +132 -41 lines
Diff to previous 1.193 (colored)

(try to) merge map entries in fault handler.

Revision 1.193 / (download) - annotate - [select for diffs], Tue May 17 13:54:19 2005 UTC (8 years ago) by yamt
Branch: MAIN
Changes since 1.192: +6 -12 lines
Diff to previous 1.192 (colored)

revert uvm_map.c rev.1.190 in favor of merging in fault handler.

Revision 1.192 / (download) - annotate - [select for diffs], Wed May 11 13:02:25 2005 UTC (8 years ago) by yamt
Branch: MAIN
Changes since 1.191: +5 -5 lines
Diff to previous 1.191 (colored)

allocate anons on-demand, rather than reserving static amount of
them on boot/swapon.

Revision 1.191 / (download) - annotate - [select for diffs], Thu May 5 01:58:51 2005 UTC (8 years ago) by yamt
Branch: MAIN
Changes since 1.190: +4 -4 lines
Diff to previous 1.190 (colored)

- 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.

Revision 1.190 / (download) - annotate - [select for diffs], Fri Apr 29 09:05:21 2005 UTC (8 years ago) by yamt
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.189: +10 -4 lines
Diff to previous 1.189 (colored)

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.

Revision 1.189 / (download) - annotate - [select for diffs], Thu Apr 28 14:40:43 2005 UTC (8 years ago) by yamt
Branch: MAIN
Changes since 1.188: +4 -2 lines
Diff to previous 1.188 (colored)

uvm_map: don't leak a preallocated map entry on error.

Revision 1.188 / (download) - annotate - [select for diffs], Thu Apr 7 06:44:15 2005 UTC (8 years, 1 month ago) by dbj
Branch: MAIN
Changes since 1.187: +6 -5 lines
Diff to previous 1.187 (colored)

use voff_t instead of vaddr_t to hold file offset passed to pgo_put

Revision 1.187 / (download) - annotate - [select for diffs], Fri Apr 1 11:59:38 2005 UTC (8 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.186: +24 -9 lines
Diff to previous 1.186 (colored)

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.

Revision 1.186 / (download) - annotate - [select for diffs], Mon Feb 28 16:55:54 2005 UTC (8 years, 2 months ago) by chs
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.185: +7 -3 lines
Diff to previous 1.185 (colored)

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.

Revision 1.185 / (download) - annotate - [select for diffs], Sat Feb 26 22:31:44 2005 UTC (8 years, 2 months ago) by perry
Branch: MAIN
Changes since 1.184: +3 -3 lines
Diff to previous 1.184 (colored)

nuke trailing whitespace

Revision 1.184 / (download) - annotate - [select for diffs], Fri Feb 11 02:12:03 2005 UTC (8 years, 3 months ago) by chs
Branch: MAIN
CVS Tags: yamt-km-base2, matt-timespec
Changes since 1.183: +14 -13 lines
Diff to previous 1.183 (colored)

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.

Revision 1.183 / (download) - annotate - [select for diffs], Sun Jan 23 15:58:13 2005 UTC (8 years, 3 months ago) by chs
Branch: MAIN
CVS Tags: yamt-km-base
Branch point for: yamt-km
Changes since 1.182: +2 -10 lines
Diff to previous 1.182 (colored)

pmap_wired_count() is now available on all platforms,
remove the code for the case where it's not defined.

Revision 1.182 / (download) - annotate - [select for diffs], Mon Jan 17 04:37:20 2005 UTC (8 years, 4 months ago) by atatat
Branch: MAIN
Changes since 1.181: +4 -3 lines
Diff to previous 1.181 (colored)

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.

Revision 1.181 / (download) - annotate - [select for diffs], Fri Jan 14 14:25:40 2005 UTC (8 years, 4 months ago) by yamt
Branch: MAIN
Branch point for: kent-audio2
Changes since 1.180: +14 -14 lines
Diff to previous 1.180 (colored)

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@.

Revision 1.180 / (download) - annotate - [select for diffs], Thu Jan 13 11:50:32 2005 UTC (8 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.179: +40 -4 lines
Diff to previous 1.179 (colored)

in uvm_unmap_remove, always wakeup va waiters if any.
uvm_km_free_wakeup is now a synonym of uvm_km_free.

Revision 1.179 / (download) - annotate - [select for diffs], Wed Jan 12 09:34:35 2005 UTC (8 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.178: +5 -2 lines
Diff to previous 1.178 (colored)

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.

Revision 1.178 / (download) - annotate - [select for diffs], Mon Jan 3 19:46:22 2005 UTC (8 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio1-beforemerge
Changes since 1.177: +3 -3 lines
Diff to previous 1.177 (colored)

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.

Revision 1.177 / (download) - annotate - [select for diffs], Sat Jan 1 21:12:59 2005 UTC (8 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.176: +20 -2 lines
Diff to previous 1.176 (colored)

uvm_unmap_remove: debug check to ensure that
unmapped regions doesn't have any remaining page mappings.

Revision 1.176 / (download) - annotate - [select for diffs], Sat Jan 1 21:11:51 2005 UTC (8 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.175: +19 -19 lines
Diff to previous 1.175 (colored)

don't merge incompatible map entries.  eg. private and shared.

Revision 1.175 / (download) - annotate - [select for diffs], Sat Jan 1 21:02:13 2005 UTC (8 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.174: +33 -10 lines
Diff to previous 1.174 (colored)

introduce vm_map_kernel, a subclass of vm_map, and
move some kernel-only members of vm_map to it.

Revision 1.174 / (download) - annotate - [select for diffs], Sat Jan 1 21:00:06 2005 UTC (8 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.173: +564 -135 lines
Diff to previous 1.173 (colored)

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.

Revision 1.173 / (download) - annotate - [select for diffs], Sat Sep 25 04:19:38 2004 UTC (8 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.172: +8 -3 lines
Diff to previous 1.172 (colored)

uvm_map_printit:
- print wired_count if available.
- fix a printf format.

Revision 1.172 / (download) - annotate - [select for diffs], Wed May 19 22:02:05 2004 UTC (9 years ago) by he
Branch: MAIN
Changes since 1.171: +5 -3 lines
Diff to previous 1.171 (colored)

Move variable declaration up before the code.  Fixes compile error
for vax, and also conforms better to KNF.

Revision 1.171 / (download) - annotate - [select for diffs], Tue May 4 21:33:40 2004 UTC (9 years ago) by pk
Branch: MAIN
Changes since 1.170: +10 -11 lines
Diff to previous 1.170 (colored)

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.

Revision 1.170 / (download) - annotate - [select for diffs], Mon May 3 20:10:36 2004 UTC (9 years ago) by petrov
Branch: MAIN
Changes since 1.169: +3 -3 lines
Diff to previous 1.169 (colored)

Revert default uvm counters, rename UVMMAP_COUNTERS to UVMMAP_NOCOUNTERS.

Revision 1.169 / (download) - annotate - [select for diffs], Sat May 1 19:40:39 2004 UTC (9 years ago) by petrov
Branch: MAIN
Changes since 1.168: +47 -30 lines
Diff to previous 1.168 (colored)

Replace uvm counters with evcnt, initialize them through __link_set (from Matt Thomas),
disable counters by default and add configuration option UVMMAP_COUNTERS.

Revision 1.168 / (download) - annotate - [select for diffs], Tue Apr 27 09:50:43 2004 UTC (9 years ago) by junyoung
Branch: MAIN
Changes since 1.167: +4 -4 lines
Diff to previous 1.167 (colored)

Fix typo in comments.

Revision 1.167 / (download) - annotate - [select for diffs], Tue Apr 27 09:45:02 2004 UTC (9 years ago) by junyoung
Branch: MAIN
Changes since 1.166: +5 -5 lines
Diff to previous 1.166 (colored)

FINDSPACE_FIXED -> UVM_FLAG_FIXED in comment.

Revision 1.166 / (download) - annotate - [select for diffs], Sun Apr 25 16:42:45 2004 UTC (9 years ago) by simonb
Branch: MAIN
Changes since 1.165: +8 -15 lines
Diff to previous 1.165 (colored)

Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.

Revision 1.165 / (download) - annotate - [select for diffs], Tue Mar 30 12:59:09 2004 UTC (9 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.164: +9 -12 lines
Diff to previous 1.164 (colored)

uvm_map_findspace: don't return unaligned address if alignment is specified.
discussed on tech-kern@.

Revision 1.164 / (download) - annotate - [select for diffs], Wed Mar 24 07:47:33 2004 UTC (9 years, 2 months ago) by junyoung
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.163: +7 -7 lines
Diff to previous 1.163 (colored)

Drop trailing spaces.

Revision 1.163 / (download) - annotate - [select for diffs], Wed Mar 17 23:58:12 2004 UTC (9 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.162: +4 -9 lines
Diff to previous 1.162 (colored)

Something I posted to tech-kern a long time ago...
Slightly simplify uvm_map_extract() slightly by eliminating "oldstart".

Revision 1.162 / (download) - annotate - [select for diffs], Thu Mar 11 15:03:47 2004 UTC (9 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.161: +5 -5 lines
Diff to previous 1.161 (colored)

Reflect dropping mappings in map_size.
Avoids panic on DIAGNOSTIC kernels.

ok by chs

Revision 1.161 / (download) - annotate - [select for diffs], Tue Feb 10 01:30:49 2004 UTC (9 years, 3 months ago) by matt
Branch: MAIN
Changes since 1.160: +107 -388 lines
Diff to previous 1.160 (colored)

Back out the changes in
http://mail-index.netbsd.org/source-changes/2004/01/29/0027.html
since they don't really fix the problem.

Incorpate one fix:  Mark uvm_map_entry's that were created with
UVM_FLAG_NOMERGE so that they will not be used as future merge
candidates.

Revision 1.160 / (download) - annotate - [select for diffs], Mon Feb 9 13:11:21 2004 UTC (9 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.159: +2 -16 lines
Diff to previous 1.159 (colored)

- borrow vmspace0 in uvm_proc_exit instead of uvmspace_free.
  the latter is not a appropriate place to do so and it broke vfork.
- deactivate pmap before calling cpu_exit() to keep a balance of
  pmap_activate/deactivate.

Revision 1.159 / (download) - annotate - [select for diffs], Sat Feb 7 13:22:19 2004 UTC (9 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.158: +6 -3 lines
Diff to previous 1.158 (colored)

introduce a new patchable variable, uvm_debug_check_rbtree,
which is zero by default.
perform rbtree sanity checks only when it isn't zero
because the check is very heavy weight especially when
there're many entries.

Revision 1.158 / (download) - annotate - [select for diffs], Sat Feb 7 10:05:52 2004 UTC (9 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.157: +16 -2 lines
Diff to previous 1.157 (colored)

don't deactivate pmap in exit1 because we'll touch the pmap later.
instead, borrow vmspace0 immediately before destroying the pmap
in uvmspace_free.

Revision 1.157 / (download) - annotate - [select for diffs], Sat Feb 7 08:02:21 2004 UTC (9 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.156: +12 -2 lines
Diff to previous 1.156 (colored)

uvm_kmapent_alloc:
in the case that there's no cached entries,
if kmem_map is already up, allocate a entry from it
so that we won't try to vm_map_lock recursively.
XXX assuming usage pattern of kmem_map.

Revision 1.156 / (download) - annotate - [select for diffs], Mon Feb 2 23:13:44 2004 UTC (9 years, 3 months ago) by he
Branch: MAIN
Changes since 1.155: +3 -3 lines
Diff to previous 1.155 (colored)

Since the playstation2 port still uses a variant of gcc 2.95.2,
change to use a zero-sized array instead of c99 flexible array
member in a struct.

OK'ed by yamt.

Revision 1.155 / (download) - annotate - [select for diffs], Fri Jan 30 11:56:39 2004 UTC (9 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.154: +2 -6 lines
Diff to previous 1.154 (colored)

remove wrong assertions.
sparc's alloc_cpuinfo_global_va() partially unmaps kva range in kernel_map.

noted by Juergen Hannken-Illjes on current-users@.

Revision 1.154 / (download) - annotate - [select for diffs], Thu Jan 29 12:07:29 2004 UTC (9 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.153: +6 -6 lines
Diff to previous 1.153 (colored)

some English fixes from Soren Jacobsen.

Revision 1.153 / (download) - annotate - [select for diffs], Thu Jan 29 12:06:02 2004 UTC (9 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.152: +382 -98 lines
Diff to previous 1.152 (colored)

- split uvm_map() into two functions for the followings.
- for in-kernel maps, disable map entry merging so that
  unmap operations won't block. (workaround for PR/24039)
- for in-kernel maps, allocate kva for vm_map_entry from
  the map itsself and eliminate MAX_KMAPENT and
  uvm_map_entry_kmem_pool.

Revision 1.152 / (download) - annotate - [select for diffs], Fri Dec 19 06:02:50 2003 UTC (9 years, 5 months ago) by simonb
Branch: MAIN
Changes since 1.151: +8 -10 lines
Diff to previous 1.151 (colored)

Unindent a code block that doens't need to be indented.

Revision 1.151 / (download) - annotate - [select for diffs], Thu Nov 13 02:44:02 2003 UTC (9 years, 6 months ago) by chs
Branch: MAIN
Changes since 1.150: +4 -4 lines
Diff to previous 1.150 (colored)

two changes in improve scalability:

 (1) split the single list of pages allocated to a pool into three lists:
     completely full, partially full, and completely empty.
     there is no longer any need to traverse any list looking for a
     certain type of page.

 (2) replace the 8-element hash table for out-of-page page headers
     with a splay tree.

these two changes (together with the recent enhancements to the wait code)
give us linear scaling for a fork+exit microbenchmark.

Revision 1.150 / (download) - annotate - [select for diffs], Thu Nov 6 12:45:26 2003 UTC (9 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.149: +6 -6 lines
Diff to previous 1.149 (colored)

fix wrong assertions.
they can be false due to alignment requiments (and PMAP_PREFER).

Revision 1.149 / (download) - annotate - [select for diffs], Wed Nov 5 15:34:50 2003 UTC (9 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.148: +6 -4 lines
Diff to previous 1.148 (colored)

don't move hint backward.

Revision 1.148 / (download) - annotate - [select for diffs], Wed Nov 5 15:09:09 2003 UTC (9 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.147: +46 -14 lines
Diff to previous 1.147 (colored)

- fix a reversed comparison.
- fix "nextgap" case.
- make sure don't get addresses behind hint.
- deal with integer wraparounds better.
- assertions.

Revision 1.147 / (download) - annotate - [select for diffs], Sun Nov 2 07:58:52 2003 UTC (9 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.146: +3 -3 lines
Diff to previous 1.146 (colored)

fix a wrong assertion.  pointed by Christian Limpach.

Revision 1.146 / (download) - annotate - [select for diffs], Sat Nov 1 19:56:09 2003 UTC (9 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.145: +7 -5 lines
Diff to previous 1.145 (colored)

- update uvm_map::size fewer places.
- add related assertions.

Revision 1.145 / (download) - annotate - [select for diffs], Sat Nov 1 19:45:13 2003 UTC (9 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.144: +9 -2 lines
Diff to previous 1.144 (colored)

commit rest of the previous (rbtree).

(i should check .rej files before commit, sorry)

Revision 1.144 / (download) - annotate - [select for diffs], Sat Nov 1 11:09:02 2003 UTC (9 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.143: +392 -14 lines
Diff to previous 1.143 (colored)

track map entries and free spaces using red-black tree
to improve scalability of operations on the map.

originally done by Niels Provos for OpenBSD.
tweaked for NetBSD by me with some advices from enami tsugutomo.
discussed on tech-kern@ and tech-perform@.

Revision 1.143 / (download) - annotate - [select for diffs], Sat Oct 25 23:05:45 2003 UTC (9 years, 6 months ago) by junyoung
Branch: MAIN
Changes since 1.142: +3 -3 lines
Diff to previous 1.142 (colored)

KNF.

Revision 1.142 / (download) - annotate - [select for diffs], Thu Oct 9 03:12:29 2003 UTC (9 years, 7 months ago) by enami
Branch: MAIN
Changes since 1.141: +5 -5 lines
Diff to previous 1.141 (colored)

Fix indent.

Revision 1.141 / (download) - annotate - [select for diffs], Thu Oct 9 02:44:54 2003 UTC (9 years, 7 months ago) by atatat
Branch: MAIN
Changes since 1.140: +3 -3 lines
Diff to previous 1.140 (colored)

When pulling back an amap to cover the new allocation along with the
previous entry, don't add the size to the extension -- it's already
been added to the end of the previous entry.

Revision 1.140 / (download) - annotate - [select for diffs], Thu Oct 2 00:02:10 2003 UTC (9 years, 7 months ago) by enami
Branch: MAIN
Changes since 1.139: +146 -80 lines
Diff to previous 1.139 (colored)

Rewrite uvm_map_findspace() to improve readability and to fix a bug that
it may return space already in use as free space under some condition.
The symptom of the bug is that exec fails if stack is unlimited on
topdown VM kernel.

Revision 1.139 / (download) - annotate - [select for diffs], Wed Oct 1 23:08:32 2003 UTC (9 years, 7 months ago) by enami
Branch: MAIN
Changes since 1.138: +58 -52 lines
Diff to previous 1.138 (colored)

Some whitespace fixes.

Revision 1.138 / (download) - annotate - [select for diffs], Wed Oct 1 22:50:15 2003 UTC (9 years, 7 months ago) by enami
Branch: MAIN
Changes since 1.137: +63 -142 lines
Diff to previous 1.137 (colored)

ansi'fy.

Revision 1.137 / (download) - annotate - [select for diffs], Tue Aug 26 15:12:18 2003 UTC (9 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (colored)

use VM_PAGE_TO_PHYS macro instead of using phys_addr directly.

Revision 1.136 / (download) - annotate - [select for diffs], Wed Apr 9 21:39:29 2003 UTC (10 years, 1 month ago) by thorpej
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.135: +7 -4 lines
Diff to previous 1.135 (colored)

In uvm_map_clean(), only call pgo_put if the object has one.
From Quentin Garnier <quatriemek.com!netbsd>.

Revision 1.135 / (download) - annotate - [select for diffs], Sun Mar 2 08:57:49 2003 UTC (10 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.134: +3 -3 lines
Diff to previous 1.134 (colored)

In uvm_map_space, if the current entry is above the new space use the
previous entry.  (not if the current entry starts at the end of the new
space; that case doesn't take into account if the new space had a specified
alignment).

Revision 1.134 / (download) - annotate - [select for diffs], Sun Mar 2 02:55:03 2003 UTC (10 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.133: +8 -4 lines
Diff to previous 1.133 (colored)

When finding an aligned block, we need to truncate in topdown, not roundup.

Revision 1.133 / (download) - annotate - [select for diffs], Sun Feb 23 04:53:51 2003 UTC (10 years, 2 months ago) by simonb
Branch: MAIN
Changes since 1.132: +2 -4 lines
Diff to previous 1.132 (colored)

Remove assigned-to but not used variable.

Revision 1.132 / (download) - annotate - [select for diffs], Fri Feb 21 16:38:44 2003 UTC (10 years, 3 months ago) by matt
Branch: MAIN
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored)

fix a tpyo in a comment.

Revision 1.131 / (download) - annotate - [select for diffs], Thu Feb 20 22:16:08 2003 UTC (10 years, 3 months ago) by atatat
Branch: MAIN
Changes since 1.130: +44 -7 lines
Diff to previous 1.130 (colored)

Introduce "top down" memory management for mmap()ed allocations.  This
means that the dynamic linker gets mapped in at the top of available
user virtual memory (typically just below the stack), shared libraries
get mapped downwards from that point, and calls to mmap() that don't
specify a preferred address will get mapped in below those.

This means that the heap and the mmap()ed allocations will grow
towards each other, allowing one or the other to grow larger than
before.  Previously, the heap was limited to MAXDSIZ by the placement
of the dynamic linker (and the process's rlimits) and the space
available to mmap was hobbled by this reservation.

This is currently only enabled via an *option* for the i386 platform
(though other platforms are expected to follow).  Add "options
USE_TOPDOWN_VM" to your kernel config file, rerun config, and rebuild
your kernel to take advantage of this.

Note that the pmap_prefer() interface has not yet been modified to
play nicely with this, so those platforms require a bit more work
(most notably the sparc) before they can use this new memory
arrangement.

This change also introduces a VM_DEFAULT_ADDRESS() macro that picks
the appropriate default address based on the size of the allocation or
the size of the process's text segment accordingly.  Several drivers
and the SYSV SHM address assignment were changed to use this instead
of each one picking their own "default".

Revision 1.130 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:55 2003 UTC (10 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.129: +5 -2 lines
Diff to previous 1.129 (colored)

Add extensible malloc types, adapted from FreeBSD.  This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.

Revision 1.129 / (download) - annotate - [select for diffs], Tue Jan 21 00:03:07 2003 UTC (10 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.128: +4 -3 lines
Diff to previous 1.128 (colored)

finally: step 5: disable a KASSERT() if we are doing_shutdown.
now sync from ddb should work as badly as before the nathanw_sa merge.

Revision 1.128 / (download) - annotate - [select for diffs], Sat Jan 18 09:43:00 2003 UTC (10 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.127: +14 -12 lines
Diff to previous 1.127 (colored)

Merge the nathanw_sa branch.

Revision 1.127 / (download) - annotate - [select for diffs], Wed Dec 11 07:14:28 2002 UTC (10 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.126: +7 -7 lines
Diff to previous 1.126 (colored)

UVM_KMF_NOWAIT -> UVM_FLAG_NOWAIT

Revision 1.126 / (download) - annotate - [select for diffs], Sat Nov 30 18:28:06 2002 UTC (10 years, 5 months ago) by bouyer
Branch: MAIN
Changes since 1.125: +41 -20 lines
Diff to previous 1.125 (colored)

Change uvm_km_kmemalloc() to accept flag UVM_KMF_NOWAIT and pass it to
uvm_map(). Change uvm_map() to honnor UVM_KMF_NOWAIT. For this, change
amap_extend() to take a flags parameter instead of just boolean for
direction, and introduce AMAP_EXTEND_FORWARDS and AMAP_EXTEND_NOWAIT flags
(AMAP_EXTEND_BACKWARDS is still defined as 0x0, to keep the code easier to
read).
Add a flag parameter to uvm_mapent_alloc().
This solves a problem a pool_get(PR_NOWAIT) could trigger a pool_get(PR_WAITOK)
in uvm_mapent_alloc().
Thanks to Chuck Silvers, enami tsugutomo, Andrew Brown and Jason R Thorpe
for feedback.

Revision 1.125 / (download) - annotate - [select for diffs], Thu Nov 14 17:58:48 2002 UTC (10 years, 6 months ago) by atatat
Branch: MAIN
Changes since 1.124: +56 -33 lines
Diff to previous 1.124 (colored)

Implement backwards extension of amaps.  There are three cases to deal
with:

Case #1 -- adjust offset: The slot offset in the aref can be
decremented to cover the required size addition.

Case #2 -- move pages and adjust offset: The slot offset is not large
enough, but the amap contains enough inactive space *after* the mapped
pages to make up the difference, so active slots are slid to the "end"
of the amap, and the slot offset is, again, adjusted to cover the
required size addition.  This optimizes for hitting case #1 again on
the next small extension.

Case #3 -- reallocate, move pages, and adjust offset: There is not
enough inactive space in the amap, so the arrays are reallocated, and
the active pages are copied again to the "end" of the amap, and the
slot offset is adjusted to cover the required size.  This also
optimizes for hitting case #1 on the next backwards extension.

This provides the missing piece in the "forward extension of
vm_map_entries" logic, so the merge failure counters have been
removed.

Not many applications will make any use of this at this time (except
for jvms and perhaps gcc3), but a "top-down" memory allocator will use
it extensively.

Revision 1.124 / (download) - annotate - [select for diffs], Sat Nov 2 07:40:47 2002 UTC (10 years, 6 months ago) by perry
Branch: MAIN
Changes since 1.123: +6 -6 lines
Diff to previous 1.123 (colored)

/*CONTCOND*/ while (0)'ed macros

Revision 1.123 / (download) - annotate - [select for diffs], Thu Oct 24 22:22:28 2002 UTC (10 years, 6 months ago) by atatat
Branch: MAIN
Changes since 1.122: +12 -14 lines
Diff to previous 1.122 (colored)

In the case of a double amap_extend() (during a forward merge after a
back merge), don't abort the allocation if the second extend fails,
just abort the forward merge and finish the allocation.

Code reviewed by thorpej.

Revision 1.122 / (download) - annotate - [select for diffs], Thu Oct 24 20:37:59 2002 UTC (10 years, 6 months ago) by atatat
Branch: MAIN
Changes since 1.121: +37 -12 lines
Diff to previous 1.121 (colored)

Call amap_extend() a second time in the case of a bimerge (both
backwards and forwards) if the previous entry was backed by an amap.

Fixes pr kern/18789, where netscape 7 + a java applet actually manage
to incur forward and bimerges in userspace.

Code reviewed by fvdl and thorpej.

Revision 1.121 / (download) - annotate - [select for diffs], Fri Oct 18 13:18:42 2002 UTC (10 years, 7 months ago) by atatat
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-aftermerge
Changes since 1.120: +201 -75 lines
Diff to previous 1.120 (colored)

Add an implementation of forward merging of new map entries.  Most new
allocations can be merged either forwards or backwards, meaning no new
entries will be added to the list, and some can even be merged in both
directions, resulting in a surplus entry.

This code typically reduces the number of map entries in the
kernel_map by an order of magnitude or more.  It also makes possible
recovery from the pathological case of "5000 processes created and
then killed", which leaves behind a large number of map entries.

The only forward merge case not covered is the instance of an amap
that has to be extended backwards (WIP).  Note that this only affects
processes, not the kernel (the kernel doesn't use amaps), and that
merge opportunities like this come up *very* rarely, if at all.  Eg,
after being up for eight days, I see only three failures in this
regard, and even those are most likely due to programs I'm developing
to exercise this case.

Code reviewed by thorpej, matt, christos, mrg, chuq, chuck, perry,
tls, and probably others.  I'd like to thank my mother, the Hollywood
Foreign Press...

Revision 1.120 / (download) - annotate - [select for diffs], Sun Sep 22 07:21:29 2002 UTC (10 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: kqueue-base
Changes since 1.119: +32 -36 lines
Diff to previous 1.119 (colored)

add a new flag VM_MAP_DYING, which is set before we start
tearing down a vm_map.  use this to skip the pmap_update()
at the end of all the removes, which allows pmaps to optimize
pmap tear-down.  also, use the new pmap_remove_all() hook to
let the pmap implemenation know what we're up to.

Revision 1.119 / (download) - annotate - [select for diffs], Sun Sep 15 16:54:31 2002 UTC (10 years, 8 months ago) by chs
Branch: MAIN
Changes since 1.118: +14 -7 lines
Diff to previous 1.118 (colored)

add a new km flag UVM_KMF_CANFAIL, which causes uvm_km_kmemalloc() to
return failure if swap is full and there are no free physical pages.
have malloc() use this flag if M_CANFAIL is passed to it.
use M_CANFAIL to allow amap_extend() to fail when memory is scarce.
this should prevent most of the remaining hangs in low-memory situations.

Revision 1.118 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:47 2002 UTC (11 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, gehenna-devsw-base, gehenna-devsw, eeh-devprop-base, eeh-devprop
Branch point for: newlock, netbsd-1-6
Changes since 1.117: +5 -7 lines
Diff to previous 1.117 (colored)

Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

Revision 1.117 / (download) - annotate - [select for diffs], Mon Dec 31 22:34:40 2001 UTC (11 years, 4 months ago) by chs
Branch: MAIN
CVS Tags: ifpoll-base, ifpoll
Changes since 1.116: +6 -6 lines
Diff to previous 1.116 (colored)

introduce a new UVM fault type, VM_FAULT_WIREMAX.  this is different
from VM_FAULT_WIRE in that when the pages being wired are faulted in,
the simulated fault is at the maximum protection allowed for the mapping
instead of the current protection.  use this in uvm_map_pageable{,_all}()
to fix the problem where writing via ptrace() to shared libraries that
are also mapped with wired mappings in another process causes a
diagnostic panic when the wired mapping is removed.

this is a really obscure problem so it deserves some more explanation.
ptrace() writing to another process ends up down in uvm_map_extract(),
which for MAP_PRIVATE mappings (such as shared libraries) will cause
the amap to be copied or created.  then the amap is made shared
(ie. the AMAP_SHARED flag is set) between the kernel and the ptrace()d
process so that the kernel can modify pages in the amap and have the
ptrace()d process see the changes.  then when the page being modified
is actually faulted on, the object pages (from the shared library vnode)
is copied to a new anon page and inserted into the shared amap.
to make all the processes sharing the amap actually see the new anon
page instead of the vnode page that was there before, we need to
invalidate all the pmap-level mappings of the vnode page in the pmaps
of the processes sharing the amap, but we don't have a good way of
doing this.  the amap doesn't keep track of the vm_maps which map it.
so all we can do at this point is to remove all the mappings of the
page with pmap_page_protect(), but this has the unfortunate side-effect
of removing wired mappings as well.  removing wired mappings with
pmap_page_protect() is a legitimate operation, it can happen when a file
with a wired mapping is truncated.  so the pmap has no way of knowing
whether a request to remove a wired mapping is normal or when it's due to
this weird situation.  so the pmap has to remove the weird mapping.
the process being ptrace()d goes away and life continues.  then,
much later when we go to unwire or remove the wired vm_map mapping,
we discover that the pmap mapping has been removed when it should
still be there, and we panic.

so where did we go wrong?  the problem is that we don't have any way
to update just the pmap mappings that need to be updated in this
scenario.  we could invent a mechanism to do this, but that is much
more complicated than this change and it doesn't seem like the right
way to go in the long run either.

the real underlying problem here is that wired pmap mappings just
aren't a good concept.  one of the original properties of the pmap
design was supposed to be that all the information in the pmap could
be thrown away at any time and the VM system could regenerate it all
through fault processing, but wired pmap mappings don't allow that.
a better design for UVM would not require wired pmap mappings,
and Chuck C. and I are talking about this, but it won't be done
anytime soon, so this change will do for now.

this change has the effect of causing MAP_PRIVATE mappings to be
copied to anonymous memory when they are mlock()d, so that uvm_fault()
doesn't need to copy these pages later when called from ptrace(), thus
avoiding the call to pmap_page_protect() and the panic that results
from this when the mlock()d region is unlocked or freed.  note that
this change doesn't help the case where the wired mapping is MAP_SHARED.

discussed at great length with Chuck Cranor.
fixes PRs 10363, 12554, 12604, 13041, 13487, 14580 and 14853.

Revision 1.116 / (download) - annotate - [select for diffs], Mon Dec 31 20:34:01 2001 UTC (11 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.115: +6 -3 lines
Diff to previous 1.115 (colored)

in uvm_map_clean(), add PGO_CLEANIT to the flags passed to an object's pager.
we need to make sure that vnode pages are written to disk at least once,
otherwise processes could gain access to whatever data was previously stored
in disk blocks which are freshly allocated to a file.

Revision 1.115 / (download) - annotate - [select for diffs], Mon Dec 31 19:21:36 2001 UTC (11 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.114: +10 -25 lines
Diff to previous 1.114 (colored)

fix locking for loaning.  in general we should be looking at the page's
uobject and uanon pointers rather than at the PQ_ANON flag to determine
which lock to hold, since PQ_ANON can be clear even when the anon's lock
is the one which we should hold (if the page was loaned from an object
and then freed by the object).

Revision 1.114 / (download) - annotate - [select for diffs], Sat Nov 10 07:37:00 2001 UTC (11 years, 6 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.113: +8 -5 lines
Diff to previous 1.113 (colored)

add RCSIDs, and in some cases, slightly cleanup #include order

Revision 1.113 / (download) - annotate - [select for diffs], Tue Nov 6 05:27:17 2001 UTC (11 years, 6 months ago) by chs
Branch: MAIN
Changes since 1.112: +3 -64 lines
Diff to previous 1.112 (colored)

don't call pmap_copy() from uvmspace_fork().
a new process is very likely to call execve() immediately after fork(),
so most of the time copying the pmap mappings is wasted effort.

Revision 1.112 / (download) - annotate - [select for diffs], Tue Oct 30 19:05:26 2001 UTC (11 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.111: +18 -1 lines
Diff to previous 1.111 (colored)

uvm_map_protect(): Don't allow VM_PROT_EXECUTE to be set on entries
(either the current protection or the max protection) that reference
vnodes associated with a file system mounted with the NOEXEC option.

uvm_mmap(): Don't allow PROT_EXEC mappings to be established of vnodes
which are associated with a file system mounted with the NOEXEC option.

Revision 1.111 / (download) - annotate - [select for diffs], Tue Oct 30 18:52:17 2001 UTC (11 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.110: +2 -2 lines
Diff to previous 1.110 (colored)

Correct a comment.

Revision 1.110 / (download) - annotate - [select for diffs], Tue Oct 30 15:32:04 2001 UTC (11 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.109: +2 -2 lines
Diff to previous 1.109 (colored)

- Add a new vnode flag VEXECMAP, which indicates that a vnode has
  executable mappings.  Stop overloading VTEXT for this purpose (VTEXT
  also has another meaning).
- Rename vn_marktext() to vn_markexec(), and use it when executable
  mappings of a vnode are established.
- In places where we want to set VTEXT, set it in v_flag directly, rather
  than making a function call to do this (it no longer makes sense to
  use a function call, since we no longer overload VTEXT with VEXECMAP's
  meaning).

VEXECMAP suggested by Chuq Silvers.

Revision 1.109 / (download) - annotate - [select for diffs], Mon Oct 29 23:06:03 2001 UTC (11 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.108: +16 -1 lines
Diff to previous 1.108 (colored)

uvm_mmap(): If a vnode mapping is established with PROT_EXEC, mark the
vnode as VTEXT.

uvm_map_protect(): When VM_PROT_EXECUTE is added to a VA range, mark
all the vnodes mapped by the range as VTEXT.

Revision 1.108 / (download) - annotate - [select for diffs], Sun Sep 23 06:35:30 2001 UTC (11 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Changes since 1.107: +1 -6 lines
Diff to previous 1.107 (colored)

make pmap_resident_count() non-optional.

Revision 1.107 / (download) - annotate - [select for diffs], Fri Sep 21 07:57:35 2001 UTC (11 years, 8 months ago) by chs
Branch: MAIN
Changes since 1.106: +7 -1 lines
Diff to previous 1.106 (colored)

add an assert.

Revision 1.106 / (download) - annotate - [select for diffs], Sat Sep 15 20:36:46 2001 UTC (11 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: post-chs-ubcperf
Changes since 1.105: +76 -67 lines
Diff to previous 1.105 (colored)

a whole bunch of changes to improve performance and robustness under load:

 - remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.

Revision 1.105 / (download) - annotate - [select for diffs], Mon Sep 10 21:19:42 2001 UTC (11 years, 8 months ago) by chris
Branch: MAIN
CVS Tags: pre-chs-ubcperf
Changes since 1.104: +6 -6 lines
Diff to previous 1.104 (colored)

Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.

Revision 1.104 / (download) - annotate - [select for diffs], Sun Sep 9 19:38:22 2001 UTC (11 years, 8 months ago) by chs
Branch: MAIN
Changes since 1.103: +29 -27 lines
Diff to previous 1.103 (colored)

create a new pool for map entries, allocated from kmem_map instead of
kernel_map.  use this instead of the static map entries when allocating
map entries for kernel_map.  this greatly reduces the number of static
map entries used and should eliminate the problems with running out.

Revision 1.103 / (download) - annotate - [select for diffs], Fri Sep 7 00:50:54 2001 UTC (11 years, 8 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-devvp-base
Branch point for: thorpej-devvp
Changes since 1.102: +4 -2 lines
Diff to previous 1.102 (colored)

let user know current value of MAX_KMAPENT in panic

Revision 1.102 / (download) - annotate - [select for diffs], Mon Aug 20 12:20:08 2001 UTC (11 years, 9 months ago) by wiz
Branch: MAIN
Changes since 1.101: +2 -2 lines
Diff to previous 1.101 (colored)

"wierd" is weird.

Revision 1.101 / (download) - annotate - [select for diffs], Thu Aug 16 01:37:50 2001 UTC (11 years, 9 months ago) by chs
Branch: MAIN
Changes since 1.100: +7 -11 lines
Diff to previous 1.100 (colored)

user maps are always pageable.

Revision 1.100 / (download) - annotate - [select for diffs], Sun Jul 22 13:34:12 2001 UTC (11 years, 10 months ago) by wiz
Branch: MAIN
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored)

seperate -> separate

Revision 1.99 / (download) - annotate - [select for diffs], Sat Jun 2 18:09:26 2001 UTC (11 years, 11 months ago) by chs
Branch: MAIN
Branch point for: kqueue
Changes since 1.98: +140 -115 lines
Diff to previous 1.98 (colored)

replace vm_map{,_entry}_t with struct vm_map{,_entry} *.

Revision 1.98 / (download) - annotate - [select for diffs], Fri May 25 04:06:14 2001 UTC (12 years ago) by chs
Branch: MAIN
Changes since 1.97: +97 -97 lines
Diff to previous 1.97 (colored)

remove trailing whitespace.

Revision 1.97 / (download) - annotate - [select for diffs], Tue May 22 00:44:44 2001 UTC (12 years ago) by ross
Branch: MAIN
Changes since 1.96: +2 -3 lines
Diff to previous 1.96 (colored)

Merge the swap-backed and object-backed inactive lists.

Revision 1.96 / (download) - annotate - [select for diffs], Sun Apr 29 04:23:21 2001 UTC (12 years ago) by thorpej
Branch: MAIN
Changes since 1.95: +4 -3 lines
Diff to previous 1.95 (colored)

Implement page coloring, using a round-robin bucket selection
algorithm (Solaris calls this "Bin Hopping").

This implementation currently relies on MD code to define a
constant defining the number of buckets.  This will change
reasonably soon (MD code will be able to dynamically size
the bucket array).

Revision 1.95 / (download) - annotate - [select for diffs], Tue Apr 24 04:31:18 2001 UTC (12 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_beforemerge
Changes since 1.94: +6 -1 lines
Diff to previous 1.94 (colored)

Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative.  It may be possible to
optimize these a little more.

Revision 1.94 / (download) - annotate - [select for diffs], Thu Mar 15 06:10:57 2001 UTC (12 years, 2 months ago) by chs
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_base
Changes since 1.93: +73 -91 lines
Diff to previous 1.93 (colored)

eliminate the KERN_* error codes in favor of the traditional E* codes.
the mapping is:

KERN_SUCCESS			0
KERN_INVALID_ADDRESS		EFAULT
KERN_PROTECTION_FAILURE		EACCES
KERN_NO_SPACE			ENOMEM
KERN_INVALID_ARGUMENT		EINVAL
KERN_FAILURE			various, mostly turn into KASSERTs
KERN_RESOURCE_SHORTAGE		ENOMEM
KERN_NOT_RECEIVER		<unused>
KERN_NO_ACCESS			<unused>
KERN_PAGES_LOCKED		<unused>

Revision 1.93 / (download) - annotate - [select for diffs], Sun Feb 11 01:34:23 2001 UTC (12 years, 3 months ago) by eeh
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.92: +10 -1 lines
Diff to previous 1.92 (colored)

When recycling a vm_map, resize it to the new process address space limits.

Revision 1.92 / (download) - annotate - [select for diffs], Sat Feb 10 05:05:28 2001 UTC (12 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.91: +6 -1 lines
Diff to previous 1.91 (colored)

Don't uvm_deallocate() the address space in exit1().  The address
space is already torn down in uvmspace_free() when the vmspace
refrence count reaches 0.  Move the shmexit() call into uvmspace_free().

Note that there is a beneficial side-effect of deferring the unmap
to uvmspace_free() -- on systems where TLB invalidations are
particularly expensive, the unmapping of the address space won't
have to cause TLB invalidations; uvmspace_free() is going to be
run in a context other than the exiting process's, so the "pmap is
active" test will evaluate to FALSE in the pmap module.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Feb 6 17:01:51 2001 UTC (12 years, 3 months ago) by eeh
Branch: MAIN
Changes since 1.90: +5 -4 lines
Diff to previous 1.90 (colored)

Specify a process' address space limits for uvmspace_exec().

Revision 1.90 / (download) - annotate - [select for diffs], Mon Feb 5 11:29:54 2001 UTC (12 years, 3 months ago) by chs
Branch: MAIN
Changes since 1.89: +11 -25 lines
Diff to previous 1.89 (colored)

in uvm_map_clean(), fix the case where the start offset is within the last
entry in the map.  the old code would walk around the end of the linked list,
through the header entry, and keep going from the first map entry until it
found a gap in the map, at which point it would return an error.  if the map
had no gaps then it would loop forever.  reported by k-abe@cs.utah.edu.
while I'm here, clean up this function a bit.

also, use MIN() instead of min(), since the latter takes arguments of
type "int" but we're passing it values of type "vaddr_t", which can be
a larger size.

Revision 1.89 / (download) - annotate - [select for diffs], Sun Jan 28 23:30:44 2001 UTC (12 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.88: +2 -4 lines
Diff to previous 1.88 (colored)

Page scanner improvements, behavior is actually a bit more like
Mach VM's now.  Specific changes:
- Pages now need not have all of their mappings removed before being
  put on the inactive list.  They only need to have the "referenced"
  attribute cleared.  This makes putting pages onto the inactive list
  much more efficient.  In order to eliminate redundant clearings of
  "refrenced", callers of uvm_pagedeactivate() must now do this
  themselves.
- When checking the "modified" attribute for a page (for clearing
  PG_CLEAN), make sure to only do it if PG_CLEAN is currently set on
  the page (saves a potentially expensive pmap operation).
- When scanning the inactive list, if a page is referenced, reactivate
  it (this part was actually added in uvm_pdaemon.c,v 1.27).  This
  now works properly now that pages on the inactive list are allowed to
  have mappings.
- When scanning the inactive list and considering a page for freeing,
  remove all mappings, and then check the "modified" attribute if the
  page is marked PG_CLEAN.
- When scanning the active list, if the page was referenced since its
  last sweep by the scanner, don't deactivate it.  (This part was
  actually added in uvm_pdaemon.c,v 1.28.)

These changes greatly improve interactive performance during
moderate to high memory and I/O load.

Revision 1.88 / (download) - annotate - [select for diffs], Sun Jan 14 02:10:01 2001 UTC (12 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored)

splimp() -> splvm()

Revision 1.87 / (download) - annotate - [select for diffs], Wed Dec 13 08:06:11 2000 UTC (12 years, 5 months ago) by enami
Branch: MAIN
Changes since 1.86: +2 -1 lines
Diff to previous 1.86 (colored)

Use single const char array instead of over 200 string constant.

Revision 1.86 / (download) - annotate - [select for diffs], Mon Nov 27 08:40:03 2000 UTC (12 years, 5 months ago) by chs
Branch: MAIN
Changes since 1.85: +9 -9 lines
Diff to previous 1.85 (colored)

Initial integration of the Unified Buffer Cache project.

Revision 1.85 / (download) - annotate - [select for diffs], Sat Nov 25 06:27:59 2000 UTC (12 years, 5 months ago) by chs
Branch: MAIN
Changes since 1.84: +140 -212 lines
Diff to previous 1.84 (colored)

lots of cleanup:
use queue.h macros and KASSERT().
address amap offsets in pages instead of bytes.
make amap_ref() and amap_unref() take an amap, offset and length
  instead of a vm_map_entry_t.
improve whitespace and comments.

Revision 1.84 / (download) - annotate - [select for diffs], Mon Oct 16 23:17:54 2000 UTC (12 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.83: +0 -9 lines
Diff to previous 1.83 (colored)

Back out rev. 1.83 -- it's causing problems with some pmap
implementations, so we'll have to spend a little more time
working on the problem.

Revision 1.83 / (download) - annotate - [select for diffs], Wed Oct 11 17:27:58 2000 UTC (12 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.82: +10 -1 lines
Diff to previous 1.82 (colored)

- uvmspace_share(): If p2 has a vmspace already, make sure to deactivate
  it and free it as appropriate.  Activate p2's new address space once
  it references p1's.
- uvm_fork(): Make sure the child's vmspace is NULL before calling
  uvmspace_share() (the child doens't have one already in this case).

These changes do not change the behavior for the current use of
uvmspace_share() (vfork(2)), but make it possible for an already
running process (such as a kernel thread) to properly attach to
another process's address space.

Revision 1.82 / (download) - annotate - [select for diffs], Wed Oct 11 17:21:11 2000 UTC (12 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.81: +16 -11 lines
Diff to previous 1.81 (colored)

- Change SAVE_HINT() to take a "check" value.  This value is compared
  to the contents of the hint in the map, and the hint saved in the
  map only if the two values match.  When an unconditional save is
  required, the "check" value passed should be map->hint (and the
  compiler will optimize the test away).  When deleting a map entry,
  the new SAVE_HINT() will only change the hint if the entry being
  deleted was the hint value (thus preserving any meaningful hint
  that may have been there previously, rather than stomping on it).
- Add a missing hint update when deleting the map entry in
  uvm_map_entry_unlink().  This is the fix for kern/11125, from
  ITOH Yasufumi <itohy@netbsd.org>.

Revision 1.81 / (download) - annotate - [select for diffs], Wed Sep 13 15:00:25 2000 UTC (12 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.80: +60 -22 lines
Diff to previous 1.80 (colored)

Add an align argument to uvm_map() and some callers of that
routine.  Works similarly fto pmap_prefer(), but allows callers
to specify a minimum power-of-two alignment of the region.
How we ever got along without this for so long is beyond me.

Revision 1.80 / (download) - annotate - [select for diffs], Tue Aug 1 00:53:11 2000 UTC (12 years, 9 months ago) by wiz
Branch: MAIN
Changes since 1.79: +7 -7 lines
Diff to previous 1.79 (colored)

Rename VM_INHERIT_* to MAP_INHERIT_* and move them to sys/sys/mman.h as
discussed on tech-kern.
Retire sys/uvm/uvm_inherit.h, update man page for minherit(2).

Revision 1.79 / (download) - annotate - [select for diffs], Tue Jun 27 17:29:26 2000 UTC (12 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.78: +1 -3 lines
Diff to previous 1.78 (colored)

remove include of <vm/vm.h>

Revision 1.78 / (download) - annotate - [select for diffs], Mon Jun 26 14:21:18 2000 UTC (12 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.77: +1 -3 lines
Diff to previous 1.77 (colored)

remove/move more mach vm header files:

	<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.

Revision 1.77 / (download) - annotate - [select for diffs], Tue Jun 13 04:10:47 2000 UTC (12 years, 11 months ago) by chs
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.76: +2 -1 lines
Diff to previous 1.76 (colored)

initialize aref.ar_pageoff even if there's no amap.

Revision 1.76 / (download) - annotate - [select for diffs], Mon Jun 5 07:28:56 2000 UTC (12 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored)

Change previous to use `vm_map_min(dstmap)' instead of hard-coding
VM_MIN_KERNEL_ADDRESS.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Jun 2 12:02:43 2000 UTC (12 years, 11 months ago) by pk
Branch: MAIN
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored)

Let uvm_map_extract() set the lower bound on the kernel address range
itself, in stead of having its callers do that.

Revision 1.74 / (download) - annotate - [select for diffs], Fri May 19 17:43:55 2000 UTC (13 years ago) by thorpej
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.73: +8 -6 lines
Diff to previous 1.73 (colored)

Clean up some indentation lossage in uvm_map_extract().

Revision 1.73 / (download) - annotate - [select for diffs], Mon Apr 24 17:12:00 2000 UTC (13 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.72: +6 -3 lines
Diff to previous 1.72 (colored)

Changes necessary to implement pre-zero'ing of pages in the idle loop:
- Make page free lists have two actual queues: known-zero pages and
  pages with unknown contents.
- Implement uvm_pageidlezero().  This function attempts to zero up to
  the target number of pages until the target has been reached (currently
  target is `all free pages') or until whichqs becomes non-zero (indicating
  that a process is ready to run).
- Define a new hook for the pmap module for pre-zero'ing pages.  This is
  used to zero the pages using uncached access.  This allows us to zero
  as many pages as we want without polluting the cache.

In order to use this feature, each platform must add the appropropriate
glue in their idle loop.

Revision 1.72 / (download) - annotate - [select for diffs], Sun Apr 16 20:52:29 2000 UTC (13 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.71: +1 -7 lines
Diff to previous 1.71 (colored)

undo rev 1.13, which is to say, don't block interrupts while deactivating
one pmap and activating another.  this isn't actually necessary (since
pmap_activate() and pmap_deactivate() affect only user-level mappings,
which cannot be accessed from interrupts anyway), and pmap_activate()
is very slow on old sun4c sparcs so we can't block interrupts for this long.
this fixes PR 8322.

Revision 1.71 / (download) - annotate - [select for diffs], Mon Apr 10 02:21:26 2000 UTC (13 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.70: +29 -11 lines
Diff to previous 1.70 (colored)

sparc -> __sparc__
print lock status in uvm_object_printit().

Revision 1.70 / (download) - annotate - [select for diffs], Sun Mar 26 20:54:47 2000 UTC (13 years, 1 month ago) by kleink
Branch: MAIN
Changes since 1.69: +5 -5 lines
Diff to previous 1.69 (colored)

Merge parts of chs-ubc2 into the trunk:
Add a new type voff_t (defined as a synonym for off_t) to describe offsets
into uvm objects, and update the appropriate interfaces to use it, the
most visible effect being the ability to mmap() file offsets beyond
the range of a vaddr_t.

Originally by Chuck Silvers; blame me for problems caused by merging this
into non-UBC.

Revision 1.69 / (download) - annotate - [select for diffs], Sun Sep 12 01:17:37 1999 UTC (13 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase
Branch point for: thorpej_scsipi
Changes since 1.68: +2 -13 lines
Diff to previous 1.68 (colored)

eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.

Revision 1.68 / (download) - annotate - [select for diffs], Sat Aug 21 02:19:05 1999 UTC (13 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.67: +9 -1 lines
Diff to previous 1.67 (colored)

When handling the MADV_FREE case, if the amap or aobj has more than
one reference, go through the deactivate path; the page may actually
be in use by another process.

Fixes kern/8239.

Revision 1.67 / (download) - annotate - [select for diffs], Tue Aug 3 00:38:33 1999 UTC (13 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.66: +12 -3 lines
Diff to previous 1.66 (colored)

Fix the error recovery in uvm_map_pageable_all().

Revision 1.66 / (download) - annotate - [select for diffs], Mon Jul 19 17:45:23 1999 UTC (13 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)

Fix PR #8023 from Bernd Ernesti: when MADV_FREE'ing a region which spanned
more than one VM map entry, a typo caused amap_unadd() to attempt to
remove anons from the wrong amap.  Fix that typo.

Revision 1.65 / (download) - annotate - [select for diffs], Sun Jul 18 00:41:56 1999 UTC (13 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.64: +42 -9 lines
Diff to previous 1.64 (colored)

Rework uvm_map_protect():
- Fix some locking bugs; a couple of places would return an error condition
  without unlocking the map.
- Deal with maps marked WIREFUTURE; if making an entry VM_PROT_NONE ->
  anything else, and it is not already marked as wired, wire it.

Revision 1.64 / (download) - annotate - [select for diffs], Sat Jul 17 21:35:49 1999 UTC (13 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.63: +27 -12 lines
Diff to previous 1.63 (colored)

Add a set of "lockflags", which can control the locking behavior
of some functions.  Use these flags in uvm_map_pageable() to determine
if the map is locked on entry (replaces an already present boolean_t
argument `islocked'), and if the function should return with the map
still locked.

Revision 1.63 / (download) - annotate - [select for diffs], Wed Jul 7 21:51:35 1999 UTC (13 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.62: +7 -7 lines
Diff to previous 1.62 (colored)

Fix a thinko which could cause a NULL pointer deref, in the PGO_FREE
case.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Jul 7 21:04:22 1999 UTC (13 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.61: +6 -1 lines
Diff to previous 1.61 (colored)

In the PGO_FREE case of uvm_map_clean()'s amap cleaning, skip wired
pages.

XXX This should be handled better in the future, probably by marking the
XXX page as released, and making uvm_pageunwire() free the page when
XXX the wire count on a released page reaches zero.

Revision 1.61 / (download) - annotate - [select for diffs], Wed Jul 7 06:02:22 1999 UTC (13 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.60: +154 -94 lines
Diff to previous 1.60 (colored)

Add some more meat to madvise(2):
* Implement MADV_DONTNEED: deactivate pages in the specified range,
  semantics similar to Solaris's MADV_DONTNEED.
* Add MADV_FREE: free pages and swap resources associated with the
  specified range, causing the range to be reloaded from backing
  store (vnodes) or zero-fill (anonymous), semantics like FreeBSD's
  MADV_FREE and like Digital UNIX's MADV_DONTNEED (isn't it SO GREAT
  that madvise(2) isn't standardized!?)

As part of this, move the non-map-modifying advice handling out of
uvm_map_advise(), and into sys_madvise().

As another part, implement general amap cleaning in uvm_map_clean(), and
change uvm_map_clean() to only push dirty pages to disk if PGO_CLEANIT
is set in its flags (and update sys___msync13() accordingly).  XXX Add
a patchable global "amap_clean_works", defaulting to 1, which can disable
the amap cleaning code, just in case problems are unearthed; this gives
a developer/user a quick way to recover and send a bug report (e.g. boot
into DDB and change the value).

XXX Still need to implement a real uao_flush().

XXX Need to update the manual page.

With these changes, rebuilding libc will automatically cause the new
malloc(3) to use MADV_FREE to actually release pages and swap resources
when it decides that can be done.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Jul 1 20:07:05 1999 UTC (13 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.59: +29 -18 lines
Diff to previous 1.59 (colored)

Fix a corner case locking error, which could lead to map corruption in
SMP environments.  See comments in <vm/vm_map.h> for details.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Jun 18 05:13:46 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.58: +9 -5 lines
Diff to previous 1.58 (colored)

Add the guts of mlockall(MCL_FUTURE).  This requires that a process's
"memlock" resource limit to uvm_mmap().  Update all calls accordingly.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Jun 17 00:24:10 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.57: +1 -49 lines
Diff to previous 1.57 (colored)

The i386 and pc532 pmaps are officially fixed.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Jun 16 22:11:23 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.56: +2 -10 lines
Diff to previous 1.56 (colored)

* Rename uvm_fault_unwire() to uvm_fault_unwire_locked(), and require that
  the map be at least read-locked to call this function.  This requirement
  will be taken advantage of in a future commit.
* Write a uvm_fault_unwire() wrapper which read-locks the map and calls
  uvm_fault_unwire_locked().
* Update the comments describing the locking contraints of uvm_fault_wire()
  and uvm_fault_unwire().

Revision 1.56 / (download) - annotate - [select for diffs], Wed Jun 16 19:34:24 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.55: +15 -20 lines
Diff to previous 1.55 (colored)

Modify uvm_map_pageable() and uvm_map_pageable_all() to follow POSIX 1003.1b
semantics.  That is, regardless of the number of mlock/mlockall calls,
an munlock/munlockall actually unlocks the region (i.e. sets wiring count
to 0).

Add a comment describing why uvm_map_pageable() should not be used for
transient page wirings (e.g. for physio) -- note, it's currently only
(ab)used in this way by a few pieces of code which are known to be
broken, i.e. the Amiga and Atari pmaps, and i386 and pc532 if PMAP_NEW is
not used.  The i386 GDT code uses uvm_map_pageable(), but in a safe
way, and could be trivially converted to use uvm_fault_wire() instead.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Jun 16 00:29:04 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.54: +19 -22 lines
Diff to previous 1.54 (colored)

Add a macro to test if a map entry is wired.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Jun 15 23:27:47 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.53: +242 -24 lines
Diff to previous 1.53 (colored)

Several changes, developed and tested concurrently:
* Provide POSIX 1003.1b mlockall(2) and munlockall(2) system calls.
  MCL_CURRENT is presently implemented.  MCL_FUTURE is not fully
  implemented.  Also, the same one-unlock-for-every-lock caveat
  currently applies here as it does to mlock(2).  This will be
  addressed in a future commit.
* Provide the mincore(2) system call, with the same semantics as
  Solaris.
* Clean up the error recovery in uvm_map_pageable().
* Fix a bug where a process would hang if attempting to mlock a
  zero-fill region where none of the pages in that region are resident.
  [ This fix has been submitted for inclusion in 1.4.1 ]

Revision 1.53 / (download) - annotate - [select for diffs], Mon Jun 7 16:31:42 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.52: +4 -3 lines
Diff to previous 1.52 (colored)

Print the maps flags in "show map" from DDB.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Jun 2 22:40:51 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.51: +8 -53 lines
Diff to previous 1.51 (colored)

Simplify the last even more; We downgraded to a shared (read) lock, so
setting recursive has no effect!  The kernel lock manager doesn't allow
an exclusive recursion into a shared lock.  This situation must simply
be avoided.  The only place where this might be a problem is the (ab)use
of uvm_map_pageable() in the Utah-derived pmaps for m68k (they should
either toss the iffy scheme they use completely, or use something like
uvm_fault_wire()).

In addition, once we have looped over uvm_fault_wire(), only upgrade to
an exclusive (write) lock if we need to modify the map again (i.e.
wiring a page failed).

Revision 1.51 / (download) - annotate - [select for diffs], Wed Jun 2 21:23:08 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.50: +54 -35 lines
Diff to previous 1.50 (colored)

Clean up the locking mess in uvm_map_pageable() a little... Most importantly,
don't unlock a kernel map (!!!) and then relock it later; a recursive lock,
as it used in the user map case, is fine.  Also, don't change map entries
while only holding a read lock on the map.  Instead, if we fail to wire
a page, clear recursive locking, and upgrade back to a write lock before
dropping the wiring count on the remaining map entries.

Revision 1.50 / (download) - annotate - [select for diffs], Mon May 31 23:36:23 1999 UTC (13 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.49: +2 -1 lines
Diff to previous 1.49 (colored)

unlock the map for unknown arguments to uvm_map_advise. from Soren S. Jorvang in PR kern/7681

Revision 1.49 / (download) - annotate - [select for diffs], Fri May 28 22:54:12 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.48: +5 -7 lines
Diff to previous 1.48 (colored)

A little spring cleaning in the unwire case of uvm_map_pageable().

Revision 1.48 / (download) - annotate - [select for diffs], Fri May 28 20:49:51 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

Make uvm_fault_unwire() take a vm_map_t, rather than a pmap_t, for
consistency.  Use this opportunity for checking for intrsafe map use
in this routine (which is illegal).

Revision 1.47 / (download) - annotate - [select for diffs], Fri May 28 20:31:43 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.46: +36 -3 lines
Diff to previous 1.46 (colored)

Make "intrsafe" maps locked only by exclusive spin locks, never sleep
locks (and thus, never shared locks).  Move the "set/clear recursive"
functions to uvm_map.c, which is the only placed they're used (and
they should go away anyhow).  Delete some unused cruft.

Revision 1.46 / (download) - annotate - [select for diffs], Wed May 26 23:53:48 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.45: +2 -8 lines
Diff to previous 1.45 (colored)

Upon further investigation, in uvm_map_pageable(), entry->protection is the
right access_type to pass to uvm_fault_wire().  This way, if the entry has
VM_PROT_WRITE, and the entry is marked COW, the copy will happen immediately
in uvm_fault(), as if the access were performed.

Revision 1.45 / (download) - annotate - [select for diffs], Wed May 26 19:16:36 1999 UTC (13 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.44: +15 -10 lines
Diff to previous 1.44 (colored)

Change the vm_map's "entries_pageable" member to a r/o flags member, which
has PAGEABLE and INTRSAFE flags.  PAGEABLE now really means "pageable",
not "allocate vm_map_entry's from non-static pool", so update all map
creations to reflect that.  INTRSAFE maps are maps that are used in
interrupt context (e.g. kmem_map, mb_map), and thus use the static
map entry pool (XXX as does kernel_map, for now).  This will eventually
change now these maps are locked, as well.

Revision 1.44 / (download) - annotate - [select for diffs], Wed May 26 00:36:53 1999 UTC (14 years ago) by thorpej
Branch: MAIN
Changes since 1.43: +9 -2 lines
Diff to previous 1.43 (colored)

In uvm_map_pageable(), pass VM_PROT_NONE as access type to uvm_fault_wire()
for now.  XXX This needs to be reexamined.

Revision 1.43 / (download) - annotate - [select for diffs], Tue May 25 20:30:09 1999 UTC (14 years ago) by thorpej
Branch: MAIN
Changes since 1.42: +21 -26 lines
Diff to previous 1.42 (colored)

Define a new kernel object type, "intrsafe", which are used for objects
which can be used in an interrupt context.  Use pmap_kenter*() and
pmap_kremove() only for mappings owned by these objects.

Fixes some locking protocol issues related to MP support, and eliminates
all of the pmap_enter vs. pmap_kremove inconsistencies.

Revision 1.42 / (download) - annotate - [select for diffs], Tue May 25 00:09:00 1999 UTC (14 years ago) by thorpej
Branch: MAIN
Changes since 1.41: +8 -7 lines
Diff to previous 1.41 (colored)

Macro'ize the test for "object is a kernel object".

Revision 1.41 / (download) - annotate - [select for diffs], Sun May 23 06:27:13 1999 UTC (14 years ago) by mrg
Branch: MAIN
Changes since 1.40: +115 -1 lines
Diff to previous 1.40 (colored)

implement madvice() for MADV_{NORMAL,RANDOM,SEQUENTIAL}, others are not yet done.

Revision 1.40 / (download) - annotate - [select for diffs], Thu May 20 23:03:23 1999 UTC (14 years ago) by thorpej
Branch: MAIN
Changes since 1.39: +17 -10 lines
Diff to previous 1.39 (colored)

Make a slight modification of pmap_growkernel() -- it now returns the
end of the mappable kernel virtual address space.  Previously, it would
get called more often than necessary, because the caller only new what
was requested.

Also, export uvm_maxkaddr so that uvm_pageboot_alloc() can grow the
kernel pmap if necessary, as well.  Note that pmap_growkernel() must
now be able to handle being called before pmap_init().

Revision 1.39 / (download) - annotate - [select for diffs], Wed May 12 19:11:23 1999 UTC (14 years ago) by thorpej
Branch: MAIN
Changes since 1.38: +5 -1 lines
Diff to previous 1.38 (colored)

Add an optional pmap hook, pmap_fork(), to be called at the end of
uvmspace_fork().

pmap_fork() is used to "fork a pmap", that is copy data from one pmap
to the other that is NOT related to actual mappings in the pmap, but is
otherwise logically coupled to the address space.

Revision 1.38 / (download) - annotate - [select for diffs], Mon May 3 08:57:42 1999 UTC (14 years ago) by mrg
Branch: MAIN
Changes since 1.37: +7 -10 lines
Diff to previous 1.37 (colored)

remove now-wrong comments.  formatting nits.

Revision 1.37 / (download) - annotate - [select for diffs], Mon Apr 19 14:43:46 1999 UTC (14 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

in uvm_map_extract(), handle the case where the map entry being extracted
is large enough to cause the end address of the new entry to overflow.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Mar 28 19:53:50 1999 UTC (14 years, 1 month ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

Only turn off VM_PROT_WRITE for COW pages; not VM_PROT_EXECUTE.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Mar 25 18:48:52 1999 UTC (14 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.34: +1 -5 lines
Diff to previous 1.34 (colored)

remove now >1 year old pre-release message.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Jan 24 23:53:15 1999 UTC (14 years, 3 months ago) by chuck
Branch: MAIN
Changes since 1.33: +9 -9 lines
Diff to previous 1.33 (colored)

cleanup/reorg:
- break anon related functions out of uvm_amap.c and put them in their own
  file (uvm_anon.c).  includes break up uvm_anon_init into an amap and an
  an anon init function
- ensure that only functions within the amap module access amap structure
  fields (add macros to amap api as needed)

Revision 1.33 / (download) - annotate - [select for diffs], Sun Nov 15 04:38:19 1998 UTC (14 years, 6 months ago) by chuck
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.32: +4 -5 lines
Diff to previous 1.32 (colored)

remove bogus permission check in uvm_map_clean().   fixes mmap/msync
problem discussed/reported by jonathan and Andreas Wrede <andreas@planix.com>.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Oct 24 13:32:34 1998 UTC (14 years, 7 months ago) by mrg
Branch: MAIN
CVS Tags: chs-ubc-base
Branch point for: chs-ubc
Changes since 1.31: +9 -11 lines
Diff to previous 1.31 (colored)

KNF a missing bit. remove register.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Oct 19 22:21:19 1998 UTC (14 years, 7 months ago) by tron
Branch: MAIN
Changes since 1.30: +2 -1 lines
Diff to previous 1.30 (colored)

Defopt SYSVMSG, SYSVSEM and SYSVSHM.

Revision 1.30 / (download) - annotate - [select for diffs], Sun Oct 18 23:50:00 1998 UTC (14 years, 7 months ago) by chs
Branch: MAIN
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

shift by PAGE_SHIFT instead of multiplying or dividing by PAGE_SIZE.

Revision 1.29 / (download) - annotate - [select for diffs], Sun Oct 11 23:14:47 1998 UTC (14 years, 7 months ago) by chuck
Branch: MAIN
Changes since 1.28: +47 -382 lines
Diff to previous 1.28 (colored)

remove unused share map code from UVM:
 - replace map checks with submap checks
 - get rid of unused 'mainonly' arg in uvm_unmap/uvm_unmap_remove, simplify
	code.   update all calls to reflect this.
 - don't worry about unmapping or changing the protection of shared share
	map mappings (is_main_map no longer used).
 - remove unused uvm_map_sharemapcopy() function from fork code.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Aug 31 01:54:14 1998 UTC (14 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.27: +0 -9 lines
Diff to previous 1.27 (colored)

Back out previous; I should have instrumented the benefit of this one
first.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Aug 31 01:50:08 1998 UTC (14 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.26: +10 -1 lines
Diff to previous 1.26 (colored)

Use the pool allocator and the "nointr" pool page allocator for vm_map's.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Aug 31 01:10:15 1998 UTC (14 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.25: +11 -4 lines
Diff to previous 1.25 (colored)

Use the pool allocator and the "nointr" pool page allocator for dynamically
allocated vm_map_entry's.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Aug 31 00:20:26 1998 UTC (14 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.24: +17 -3 lines
Diff to previous 1.24 (colored)

Use the pool allocator and the "nointr" pool page allocator for vmspace
structures.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Aug 13 02:11:01 1998 UTC (14 years, 9 months ago) by eeh
Branch: MAIN
Changes since 1.23: +45 -45 lines
Diff to previous 1.23 (colored)

Merge paddr_t changes into the main branch.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Aug 9 22:36:38 1998 UTC (14 years, 9 months ago) by perry
Branch: MAIN
Changes since 1.22: +4 -4 lines
Diff to previous 1.22 (colored)

bzero->memset, bcopy->memcpy, bcmp->memcmp

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jul 8 04:28:28 1998 UTC (14 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Add support for multiple memory free lists.  There is at least one
default free list, and 0 - N additional free list, in order of descending
priority.

A new page allocation function, uvm_pagealloc_strat(), has been added,
providing three page allocation strategies:

	- normal: high -> low priority free list walk, taking the
	  page off the first free list that has one.

	- only: attempt to allocate a page only from the specified free
	  list, failing if that free list has none available.

	- fallback: if `only' fails, fall back on `normal'.

uvm_pagealloc(...) is provided for normal use (and is a synonym for
uvm_pagealloc_strat(..., UVM_PGA_STRAT_NORMAL, 0); the free list argument
is ignored for the `normal' case).

uvm_page_physload() now specified which free list the pages will be
loaded onto.  This means that some platforms which have multiple physical
memory segments may define additional vm_physsegs if they wish to break
individual physical segments into differing priorities.

Machine-dependent code must define _at least_ the following constants
in <machine/vmparam.h>:

	VM_NFREELIST: the number of free lists the system will have

	VM_FREELIST_DEFAULT: the default freelist (should always be 0,
	but is defined in machdep code so that it's with all of the
	other free list-related constants).

Additional free list names may be defined by machine-dependent code, but
they will only be used by machine-dependent code (e.g. for loading the
vm_physsegs).

Revision 1.21 / (download) - annotate - [select for diffs], Sat Jul 4 22:18:53 1998 UTC (14 years, 10 months ago) by jonathan
Branch: MAIN
Changes since 1.20: +7 -1 lines
Diff to previous 1.20 (colored)

defopt DDB.

Revision 1.20 / (download) - annotate - [select for diffs], Fri May 22 02:01:54 1998 UTC (15 years ago) by chuck
Branch: MAIN
Changes since 1.19: +13 -6 lines
Diff to previous 1.19 (colored)

fix bug in uvm_map_extract, remove case.  make sure we update the loop
variable before removing the entry from the map.
[bug was not causing problems because the remove case isn't currently
 being used ...]

Revision 1.19 / (download) - annotate - [select for diffs], Sat May 9 15:05:50 1998 UTC (15 years ago) by kleink
Branch: MAIN
Changes since 1.18: +3 -2 lines
Diff to previous 1.18 (colored)

Minor KNF.

Revision 1.18 / (download) - annotate - [select for diffs], Tue May 5 20:51:06 1998 UTC (15 years ago) by kleink
Branch: MAIN
Changes since 1.17: +1 -4 lines
Diff to previous 1.17 (colored)

Remove inclusions of syscall (and syscall argument) related header files;
we don't need them here.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Apr 25 19:58:58 1998 UTC (15 years ago) by matthias
Branch: MAIN
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored)

port-pc532 now has pmap_new just like port-i386.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Mar 30 17:34:58 1998 UTC (15 years, 1 month ago) by chuck
Branch: MAIN
Changes since 1.15: +10 -3 lines
Diff to previous 1.15 (colored)

have ddb show map print resident page count

Revision 1.15 / (download) - annotate - [select for diffs], Fri Mar 27 01:47:06 1998 UTC (15 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.14: +31 -5 lines
Diff to previous 1.14 (colored)

Split uvmspace_alloc() into uvmspace_alloc() and uvmspace_init().  The latter
can be used for initializing a pre-allocated vmspace.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Mar 19 19:26:50 1998 UTC (15 years, 2 months ago) by chuck
Branch: MAIN
Changes since 1.13: +122 -112 lines
Diff to previous 1.13 (colored)

rework the copy inheritance case of fork.  the old way did not handle
the very rare case of shared mappings that have amap's attached in a
reasonable way -- this is not currently causing any problems, but i
fixed it anyway.  update the comment in this section of code and also
be smarter about avoiding needless calls to pmap_protect().

Revision 1.13 / (download) - annotate - [select for diffs], Thu Mar 19 06:37:26 1998 UTC (15 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.12: +9 -1 lines
Diff to previous 1.12 (colored)

Make the previous change `atomic'.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Mar 19 04:19:21 1998 UTC (15 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.11: +3 -1 lines
Diff to previous 1.11 (colored)

When unsharing or execing, deactivate the old vmspace before reassigning
and activating the new one.  Pointed out by Chris Demetriou.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Mar 17 07:50:08 1998 UTC (15 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.10: +4 -6 lines
Diff to previous 1.10 (colored)

oops, missed a bit of KNF here.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Mar 9 00:58:57 1998 UTC (15 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.9: +2319 -2206 lines
Diff to previous 1.9 (colored)

KNF.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Mar 1 02:25:28 1998 UTC (15 years, 2 months ago) by fvdl
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

Merge with Lite2 + local changes

Revision 1.8 / (download) - annotate - [select for diffs], Tue Feb 24 15:58:09 1998 UTC (15 years, 2 months ago) by chuck
Branch: MAIN
Changes since 1.7: +15 -7 lines
Diff to previous 1.7 (colored)

be consistent about offsets in kernel objects.  vm_map_min(kernel_map)
should always be the base [fixes problem on m68k detected by jason thorpe]

add comments to uvm_km.c explaining kernel memory management in more detail

Revision 1.7 / (download) - annotate - [select for diffs], Wed Feb 18 14:50:32 1998 UTC (15 years, 3 months ago) by drochner
Branch: MAIN
Changes since 1.6: +2 -3 lines
Diff to previous 1.6 (colored)

fix map range boundary check

Revision 1.6 / (download) - annotate - [select for diffs], Tue Feb 10 14:12:18 1998 UTC (15 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.5: +4 -3 lines
Diff to previous 1.5 (colored)

- add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Feb 8 07:52:28 1998 UTC (15 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.4: +5 -3 lines
Diff to previous 1.4 (colored)

move pdhist initialisation to the same place as maphist.  also, declare
the history buffers are "struct uvm_history_ent" to ensure proper
alignment (eg, alpha).  this fixes a boottime panic when the pdhist was
used before it had been initialised.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Feb 7 12:31:32 1998 UTC (15 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

bzero the entire vmspace, like the old vm does.  makes ps report sane values of VSZ for swapper/pagedaemon

Revision 1.3 / (download) - annotate - [select for diffs], Sat Feb 7 11:08:57 1998 UTC (15 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.2: +1 -0 lines
Diff to previous 1.2 (colored)

restore rcsids

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 6 22:32:01 1998 UTC (15 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

RCS ID police.

Revision 1.1 / (download) - annotate - [select for diffs], Thu Feb 5 06:25:09 1998 UTC (15 years, 3 months ago) by mrg
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>