OpenBSD CVS

CVS log for src/sys/uvm/uvm_amap.h


[BACK] Up to [local] / src / sys / uvm

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.33 / (download) - annotate - [select for diffs], Tue Jan 19 13:21:36 2021 UTC (3 years, 4 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, HEAD
Changes since 1.32: +5 -1 lines
Diff to previous 1.32 (colored)

(re)Introduce locking for amaps & anons.

A rwlock is attached to every amap and is shared with all its anon.  The
same lock will be used by multiple amaps if they have anons in common.

This should be enough to get the upper part of the fault handler out of the
KERNEL_LOCK() which seems to bring up to 20% improvements in builds.

This is based/copied/adapted from the most recent work done in NetBSD which
is an evolution of the precendent simple_lock scheme.

Tested by many, thanks!

ok kettenis@, mvs@

Revision 1.32 / (download) - annotate - [select for diffs], Fri Nov 13 11:11:49 2020 UTC (3 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.31: +1 -18 lines
Diff to previous 1.31 (colored)

Introduce amap_adjref_anons() an helper to reference count amaps.

Reduce code duplication, reduce differences with NetBSD and simplify
upcoming locking diff.

ok jmatthew@

Revision 1.31 / (download) - annotate - [select for diffs], Wed May 15 06:12:19 2019 UTC (5 years ago) by anton
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.30: +3 -1 lines
Diff to previous 1.30 (colored)

free size for amap; ok visa@

Revision 1.30 / (download) - annotate - [select for diffs], Sun Feb 5 01:11:50 2017 UTC (7 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

Update a comment that suggested the stack was executable.  Nope!

Revision 1.29 / (download) - annotate - [select for diffs], Thu May 26 13:37:26 2016 UTC (8 years ago) by stefan
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.28: +63 -28 lines
Diff to previous 1.28 (colored)

Make amaps use less kernel memory (2nd try)

The original diff would crash at least i386 and powerpc, as spotted by
guenther@ The reason was an incorrect use of sizeof in amap_lookups().

Confirmation that powerpc works by mpi@ and mglocker@

"throw it in" deraadt@

Original commit message:

This is achieved by grouping amap slots into chunks that are allocated
on-demand by pool(9). Endless "fltamapcopy" loops because of kmem
shortage should be solved now. The kmem savings are also important to later
enable vmm(4) to use larged shared memory mappings for guest VM RAM.

This adapts libkvm also because the amap structure layout has changed.

Testing and fix of libkvm glitch in initial diff by tb@
Feedback and "time to get this in" kettenis@

Revision 1.28 / (download) - annotate - [select for diffs], Sun May 22 22:52:01 2016 UTC (8 years ago) by guenther
Branch: MAIN
Changes since 1.27: +27 -62 lines
Diff to previous 1.27 (colored)

Revert previous: breaks i386 and powerpc, probably all non-PMAP_DIRECT archs

Revision 1.27 / (download) - annotate - [select for diffs], Sun May 22 16:18:26 2016 UTC (8 years ago) by stefan
Branch: MAIN
Changes since 1.26: +63 -28 lines
Diff to previous 1.26 (colored)

Make amaps use less kernel memory

This is achieved by grouping amap slots into chunks that are allocated
on-demand by pool(9). Endless "fltamapcopy" loops because of kmem
shortage should be solved now. The kmem savings are also important to later
enable vmm(4) to use larged shared memory mappings for guest VM RAM.

This adapts libkvm also because the amap structure layout has changed.

Testing and fix of libkvm glitch in initial diff by tb@
Feedback and "time to get this in" kettenis@

Revision 1.26 / (download) - annotate - [select for diffs], Sun May 8 16:29:57 2016 UTC (8 years, 1 month ago) by stefan
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

Additional parameter for amap_alloc().

It is supposed to control whether an amap should allocate memory
to store anon pointers lazily or upfront. Needed for upcoming amap
changes.

ok kettenis@

Revision 1.25 / (download) - annotate - [select for diffs], Sun May 8 11:52:32 2016 UTC (8 years, 1 month ago) by stefan
Branch: MAIN
Changes since 1.24: +4 -2 lines
Diff to previous 1.24 (colored)

Wait for RAM in uvm_fault when allocating uvm structures fails

Only fail hard when running out of swap space also, as suggested by
kettenis@

While there, let amap_add() return a success status and handle
amap_add() errors in uvm_fault() similar to other out of RAM situations.
These bits are needed for further amap reorganization diffs.

lots of feedback and ok kettenis@

Revision 1.24 / (download) - annotate - [select for diffs], Sat Apr 16 18:39:31 2016 UTC (8 years, 1 month ago) by stefan
Branch: MAIN
Changes since 1.23: +2 -3 lines
Diff to previous 1.23 (colored)

Remove am_maxslot from amap.

am_maxslot represents the total number of slots an amap can be extended
to. Since we do not extend amaps, this field as well as rounding the
number of slots to the next malloc bucket is not useful.

This also removes the corresponding output from procmap(1).

ok kettenis@

Revision 1.23 / (download) - annotate - [select for diffs], Mon Apr 4 16:34:16 2016 UTC (8 years, 2 months ago) by stefan
Branch: MAIN
Changes since 1.22: +2 -6 lines
Diff to previous 1.22 (colored)

UVM_FLAG_AMAPPAD has no effect anymore, nuke it.

This flag caused amaps to be allocated with additional spare slots, to
make extending them cheaper. However, the kernel never extends amaps,
so allocating spare slots is pointless. Also UVM_FLAG_AMAPPAD only
has an effect in combination with UVM_FLAG_OVERLAY. The only function
that used both flags was sys_obreak, but that function had the use of
UVM_FLAG_OVERLAY removed recently.

While there, kill the unused prototypes amap_flags and amap_refs.
They're defined as macros already.

ok mlarkin@ kettenis@ mpi@

Revision 1.22 / (download) - annotate - [select for diffs], Sun Mar 27 09:51:37 2016 UTC (8 years, 2 months ago) by stefan
Branch: MAIN
Changes since 1.21: +1 -3 lines
Diff to previous 1.21 (colored)

amap_extend is never called, remove it.

In the code, this function is called when vm_map_entries are merged.
However, only kernel map entries are merged, and these do not use amaps.
Therefore amap_extend() is never called at runtime.

ok millert@, KASSERT suggestion and ok mpi@

Revision 1.21 / (download) - annotate - [select for diffs], Sun Mar 6 14:47:07 2016 UTC (8 years, 3 months ago) by stefan
Branch: MAIN
Changes since 1.20: +1 -3 lines
Diff to previous 1.20 (colored)

Remove unused amap_share_protect().

ok mpi@ visa@

Revision 1.20 / (download) - annotate - [select for diffs], Fri Jul 11 16:35:40 2014 UTC (9 years, 11 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.19: +1 -8 lines
Diff to previous 1.19 (colored)

Chuck Cranor rescinded clauses in his license
on the 2nd of February 2011 in NetBSD.

http://marc.info/?l=netbsd-source-changes&m=129658899212732&w=2
http://marc.info/?l=netbsd-source-changes&m=129659095515558&w=2
http://marc.info/?l=netbsd-source-changes&m=129659157916514&w=2
http://marc.info/?l=netbsd-source-changes&m=129665962324372&w=2
http://marc.info/?l=netbsd-source-changes&m=129666033625342&w=2
http://marc.info/?l=netbsd-source-changes&m=129666052825545&w=2
http://marc.info/?l=netbsd-source-changes&m=129666922906480&w=2
http://marc.info/?l=netbsd-source-changes&m=129667725518082&w=2

Revision 1.19 / (download) - annotate - [select for diffs], Thu May 30 16:29:46 2013 UTC (11 years ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

remove lots of comments about locking per beck's request

Revision 1.18 / (download) - annotate - [select for diffs], Wed Mar 25 20:00:18 2009 UTC (15 years, 2 months ago) by oga
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.17: +9 -20 lines
Diff to previous 1.17 (colored)

Move all of the pseudo-inline functions in uvm into C files.

By pseudo-inline, I mean that if a certain macro was defined, they would
be inlined. However, no architecture defines that, and none has for a
very very long time. Therefore mainly this just makes the code a damned
sight easier to read. Some k&r -> ansi declarations while I'm in there.

"just commit it" art@. ok weingart@.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jun 18 21:51:15 2007 UTC (16 years, 11 months ago) by pedro
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.16: +4 -1 lines
Diff to previous 1.16 (colored)

Bring back Mickey's UVM anon change. Testing by thib@, beck@ and
ckuethe@ for a while. Okay beck@, "it is good timing" deraadt@.

Revision 1.16 / (download) - annotate - [select for diffs], Thu May 31 21:20:30 2007 UTC (17 years ago) by thib
Branch: MAIN
Changes since 1.15: +1 -8 lines
Diff to previous 1.15 (colored)

zap the vm_amap am_l simplelock, and amap_{lock/unlock} macros for
simple_{lock/unlock}.

ok art@

Revision 1.15 / (download) - annotate - [select for diffs], Thu Jul 13 22:51:26 2006 UTC (17 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.14: +0 -4 lines
Diff to previous 1.14 (colored)

Back out the anon change.  Apparently it was tested by a few, but most of
us did not see it or get a chance to test it before it was commited. It
broke cvs, in the ami driver, making it not succeed at seeing it's devices.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jun 21 16:20:05 2006 UTC (17 years, 11 months ago) by mickey
Branch: MAIN
Changes since 1.13: +5 -1 lines
Diff to previous 1.13 (colored)

from netbsd: make anons dynamically allocated from pool.
this results in lesse kva waste due to static preallocation of those
for every phys page and also every swap page.
tested by beck krw miod

Revision 1.13 / (download) - annotate - [select for diffs], Thu Dec 30 08:28:39 2004 UTC (19 years, 5 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

Import M_CANFAIL support from NetBSD, removes a nasty panic during low-mem scenarios, instead generating an ENOMEM backfeed, ok tedu@, prodded by many

Revision 1.9.2.2 / (download) - annotate - [select for diffs], Mon Nov 4 18:02:32 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.9.2.1: +3 -3 lines
Diff to previous 1.9.2.1 (colored) to branchpoint 1.9 (colored) next main 1.10 (colored)

Huge sync to NetBSD plus lots of bugfixes.
 - uvm is as in netbsd-current minus uvm_map forward merge.
 - various locking bugfixes in nfs.
 - make sure that all specops and fifoops are correct in all vnodeop vectors.
 - make the filesystem code more like filsystem code and less like vm code.

Revision 1.9.2.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:33:03 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.9: +30 -30 lines
Diff to previous 1.9 (colored)

Sync UBC branch to -current

Revision 1.2.6.7 / (download) - annotate - [select for diffs], Thu Mar 28 14:54:26 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.2.6.6: +45 -54 lines
Diff to previous 1.2.6.6 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Merge in -current from roughly a week ago

Revision 1.12 / (download) - annotate - [select for diffs], Fri Mar 15 01:20:04 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: UBC_SYNC_B, UBC_SYNC_A, SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.11: +46 -33 lines
Diff to previous 1.11 (colored)

Cosmetic changes only, primarily making comments line up nicely after the
__P removal.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:18 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.10: +27 -49 lines
Diff to previous 1.10 (colored)

First round of __P removal in sys

Revision 1.2.6.6 / (download) - annotate - [select for diffs], Wed Mar 6 02:17:14 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.2.6.5: +21 -21 lines
Diff to previous 1.2.6.5 (colored) to branchpoint 1.2 (colored)

Merge in trunk

Revision 1.10 / (download) - annotate - [select for diffs], Wed Dec 19 08:58:07 2001 UTC (22 years, 5 months ago) by art
Branch: MAIN
Changes since 1.9: +21 -21 lines
Diff to previous 1.9 (colored)

UBC was a disaster. It worked very good when it worked, but on some
machines or some configurations or in some phase of the moon (we actually
don't know when or why) files disappeared. Since we've not been able to
track down the problem in two weeks intense debugging and we need -current
to be stable, back out everything to a state it had before UBC.

We apologise for the inconvenience.

Revision 1.2.6.5 / (download) - annotate - [select for diffs], Wed Dec 5 01:19:55 2001 UTC (22 years, 6 months ago) by niklas
Branch: SMP
Changes since 1.2.6.4: +21 -21 lines
Diff to previous 1.2.6.4 (colored) to branchpoint 1.2 (colored)

Merge in -current

Revision 1.9 / (download) - annotate - [select for diffs], Wed Nov 28 19:28:14 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
CVS Tags: UBC_BASE
Branch point for: UBC
Changes since 1.8: +22 -22 lines
Diff to previous 1.8 (colored)

Sync in more uvm from NetBSD. Mostly just cosmetic stuff.
Contains also support for page coloring.

Revision 1.2.6.4 / (download) - annotate - [select for diffs], Tue Nov 13 23:02:31 2001 UTC (22 years, 7 months ago) by niklas
Branch: SMP
Changes since 1.2.6.3: +7 -12 lines
Diff to previous 1.2.6.3 (colored) to branchpoint 1.2 (colored)

merge in -current

Revision 1.8 / (download) - annotate - [select for diffs], Sun Nov 11 01:16:56 2001 UTC (22 years, 7 months ago) by art
Branch: MAIN
Changes since 1.7: +5 -10 lines
Diff to previous 1.7 (colored)

Sync in more stuff from NetBSD.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Nov 7 02:55:50 2001 UTC (22 years, 7 months ago) by art
Branch: MAIN
Changes since 1.6: +5 -5 lines
Diff to previous 1.6 (colored)

Another sync of uvm to NetBSD. Just minor fiddling, no major changes.

Revision 1.2.6.3 / (download) - annotate - [select for diffs], Wed Jul 4 11:01:00 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.2.6.2: +4 -4 lines
Diff to previous 1.2.6.2 (colored) to branchpoint 1.2 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.2.6.2 / (download) - annotate - [select for diffs], Mon May 14 22:47:44 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.2.6.1: +8 -1 lines
Diff to previous 1.2.6.1 (colored) to branchpoint 1.2 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.6 / (download) - annotate - [select for diffs], Thu May 10 14:51:21 2001 UTC (23 years, 1 month ago) by art
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.5: +4 -4 lines
Diff to previous 1.5 (colored)

More sync to NetBSD.
The highlight is some more advices to madvise(2).
 o MADV_DONTNEED will deactive the pages in the given range giving a quicker
   reuse.
 o MADV_FREE will garbage-collect the pages and swap resources causing the
   next fault to either page in new pages from backing store (mapped vnode)
   or allocate new zero-fill pages (anonymous mapping).

Revision 1.5 / (download) - annotate - [select for diffs], Fri Mar 9 05:34:38 2001 UTC (23 years, 3 months ago) by smart
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.4: +8 -2 lines
Diff to previous 1.4 (colored)

Protect protypes, certain macros, and inlines from userland.  Checked userland
with a 'make build'.  From NetBSD.  art@ ok

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jan 29 02:07:42 2001 UTC (23 years, 4 months ago) by niklas
Branch: MAIN
Changes since 1.3: +1 -0 lines
Diff to previous 1.3 (colored)

$OpenBSD$

Revision 1.2.6.1 / (download) - annotate - [select for diffs], Fri Mar 24 09:09:48 2000 UTC (24 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.2: +0 -1 lines
Diff to previous 1.2 (colored)

Sync with -current

Revision 1.3 / (download) - annotate - [select for diffs], Wed Mar 15 15:50:18 2000 UTC (24 years, 3 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.2: +0 -1 lines
Diff to previous 1.2 (colored)

Fix the NetBSD id strings.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 26 05:32:06 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5
Branch point for: SMP
Changes since 1.1: +1 -0 lines
Diff to previous 1.1 (colored)

add OpenBSD tags

Revision 1.1 / (download) - annotate - [select for diffs], Fri Feb 26 01:30:10 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN

Import of uvm from NetBSD. Some local changes, some code disabled

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.