The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.237 / (download) - annotate - [select for diffs], Fri Mar 15 07:09:37 2024 UTC (5 weeks ago) by andvar
Branch: MAIN
CVS Tags: HEAD
Changes since 1.236: +3 -3 lines
Diff to previous 1.236 (colored) to selected 1.114 (colored)

Fix !VMSWAP build:
Added __unused for few local variables, which are used in VMSWAP block only.
Adjust !VMSWAP uvm_swap_stats() definition to make it build with compat code.
Copied "int (*uvm_swap_stats50)(...)" definition from uvm_swap to uvm_swapstub
to avoid missing uvm_swap_stats50 reference on linking.

Fixes INSTALL_CPMBR1400, INSTALL_ZYXELKX evbmips kernel configs as a result.

Reviewed by simon and phone in IRC (thanks).

Revision 1.236 / (download) - annotate - [select for diffs], Tue Sep 19 22:14:25 2023 UTC (6 months, 4 weeks ago) by ad
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.235: +7 -6 lines
Diff to previous 1.235 (colored) to selected 1.114 (colored)

Don't needlessly bump a couple of fault counters if upgrading the rwlock
failed.

Revision 1.235 / (download) - annotate - [select for diffs], Fri Sep 1 10:57:20 2023 UTC (7 months, 2 weeks ago) by andvar
Branch: MAIN
Changes since 1.234: +3 -3 lines
Diff to previous 1.234 (colored) to selected 1.114 (colored)

s/unnmapped/unmapped/ in comment.

Revision 1.206.2.3 / (download) - annotate - [select for diffs], Tue Aug 15 09:46:23 2023 UTC (8 months ago) by martin
Branch: netbsd-9
Changes since 1.206.2.2: +12 -3 lines
Diff to previous 1.206.2.2 (colored) to branchpoint 1.206 (colored) next main 1.207 (colored) to selected 1.114 (colored)

Pull up following revision(s) (requested by chs in ticket #1714):

	sys/uvm/uvm_fault.c: revision 1.234

uvm: prevent TLB invalidation races during COW resolution

When a thread takes a page fault which results in COW resolution,
other threads in the same process can be concurrently accessing that
same mapping on other CPUs.  When the faulting thread updates the pmap
entry at the end of COW processing, the resulting TLB invalidations to
other CPUs are not done atomically, so another thread can write to the
new writable page and then a third thread might still read from the
old read-only page, resulting in inconsistent views of the page by the
latter two threads.  Fix this by removing the pmap entry entirely for
the original page before we install the new pmap entry for the new
page, so that the new page can only be modified after the old page is
no longer accessible.

This fixes PR 56535 as well as the netbsd versions of problems
described in various bug trackers:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225584
https://reviews.freebsd.org/D14347
https://github.com/golang/go/issues/34988

Revision 1.231.2.1 / (download) - annotate - [select for diffs], Tue Aug 15 09:44:09 2023 UTC (8 months ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.231: +12 -3 lines
Diff to previous 1.231 (colored) next main 1.232 (colored) to selected 1.114 (colored)

Pull up following revision(s) (requested by chs in ticket #327):

	sys/uvm/uvm_fault.c: revision 1.234

uvm: prevent TLB invalidation races during COW resolution

When a thread takes a page fault which results in COW resolution,
other threads in the same process can be concurrently accessing that
same mapping on other CPUs.  When the faulting thread updates the pmap
entry at the end of COW processing, the resulting TLB invalidations to
other CPUs are not done atomically, so another thread can write to the
new writable page and then a third thread might still read from the
old read-only page, resulting in inconsistent views of the page by the
latter two threads.  Fix this by removing the pmap entry entirely for
the original page before we install the new pmap entry for the new
page, so that the new page can only be modified after the old page is
no longer accessible.

This fixes PR 56535 as well as the netbsd versions of problems
described in various bug trackers:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225584
https://reviews.freebsd.org/D14347
https://github.com/golang/go/issues/34988

Revision 1.234 / (download) - annotate - [select for diffs], Sun Aug 13 23:06:07 2023 UTC (8 months ago) by chs
Branch: MAIN
Changes since 1.233: +12 -3 lines
Diff to previous 1.233 (colored) to selected 1.114 (colored)

uvm: prevent TLB invalidation races during COW resolution

When a thread takes a page fault which results in COW resolution,
other threads in the same process can be concurrently accessing that
same mapping on other CPUs.  When the faulting thread updates the pmap
entry at the end of COW processing, the resulting TLB invalidations to
other CPUs are not done atomically, so another thread can write to the
new writable page and then a third thread might still read from the
old read-only page, resulting in inconsistent views of the page by the
latter two threads.  Fix this by removing the pmap entry entirely for
the original page before we install the new pmap entry for the new
page, so that the new page can only be modified after the old page is
no longer accessible.

This fixes PR 56535 as well as the netbsd versions of problems
described in various bug trackers:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225584
https://reviews.freebsd.org/D14347
https://github.com/golang/go/issues/34988

Revision 1.233 / (download) - annotate - [select for diffs], Mon Jul 17 12:55:37 2023 UTC (9 months ago) by riastradh
Branch: MAIN
Changes since 1.232: +4 -3 lines
Diff to previous 1.232 (colored) to selected 1.114 (colored)

uvm(9): One rndsource for faults -- not one per CPU.

All relevant state is per-CPU anyway; the only substantive difference
this makes is how many entries appear in `rndctl -l' output and what
they are called -- formerly the somewhat confusing `cpuN', meaning
`page faults on cpuN', and now just `uvmfault'.  I don't think
there's any real value in being able to enable or disable measurement
or counting of page faults on one CPU vs others, so although this
could be a minor compatibility change, it's hard to imagine it
matters much.

XXX kernel ABI change in struct cpu_info

Revision 1.232 / (download) - annotate - [select for diffs], Sun Apr 9 09:00:56 2023 UTC (12 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.231: +6 -5 lines
Diff to previous 1.231 (colored) to selected 1.114 (colored)

uvm(9): KASSERT(A && B) -> KASSERT(A); KASSERT(B)

Revision 1.231 / (download) - annotate - [select for diffs], Wed Oct 26 23:27:32 2022 UTC (17 months, 3 weeks ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base
Branch point for: netbsd-10
Changes since 1.230: +2 -8 lines
Diff to previous 1.230 (colored) to selected 1.114 (colored)

sys/kernel.h: New home for extern start_init_exec.

Revision 1.230 / (download) - annotate - [select for diffs], Fri Jun 3 00:21:44 2022 UTC (22 months, 2 weeks ago) by dholland
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.229: +3 -3 lines
Diff to previous 1.229 (colored) to selected 1.114 (colored)

typo in comment

Revision 1.229 / (download) - annotate - [select for diffs], Sun Dec 5 07:28:20 2021 UTC (2 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.228: +3 -3 lines
Diff to previous 1.228 (colored) to selected 1.114 (colored)

s/recusive/recursive/ in comment.

Revision 1.228 / (download) - annotate - [select for diffs], Thu Jul 9 05:57:15 2020 UTC (3 years, 9 months ago) by skrll
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.227: +22 -23 lines
Diff to previous 1.227 (colored) to selected 1.114 (colored)

Consistently use UVMHIST(__func__)

Convert UVMHIST_{CALLED,LOG} into UVMHIST_CALLARGS

Revision 1.227 / (download) - annotate - [select for diffs], Sun May 17 19:38:17 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.226: +135 -206 lines
Diff to previous 1.226 (colored) to selected 1.114 (colored)

Start trying to reduce cache misses on vm_page during fault processing.

- Make PGO_LOCKED getpages imply PGO_NOBUSY and remove the latter.  Mark
  pages busy only when there's actually I/O to do.

- When doing COW on a uvm_object, don't mess with neighbouring pages.  In
  all likelyhood they're already entered.

- Don't mess with neighbouring VAs that have existing mappings as replacing
  those mappings with same can be quite costly.

- Don't enqueue pages for neighbour faults unless not enqueued already, and
  don't activate centre pages unless uvmpdpol says its useful.

Also:

- Make PGO_LOCKED getpages on UAOs work more like vnodes: do gang lookup in
  the radix tree, and don't allocate new pages.

- Fix many assertion failures around faults/loans with tmpfs.

Revision 1.226 / (download) - annotate - [select for diffs], Fri May 15 22:35:05 2020 UTC (3 years, 11 months ago) by ad
Branch: MAIN
Changes since 1.225: +7 -3 lines
Diff to previous 1.225 (colored) to selected 1.114 (colored)

Reported-by: syzbot+3e3c7cfa8093f8de047e@syzkaller.appspotmail.com

Comment out an assertion that's now bogus and add a comment.

Revision 1.204.2.4 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:46 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.204.2.3: +8 -3 lines
Diff to previous 1.204.2.3 (colored) to branchpoint 1.204 (colored) next main 1.205 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.224.2.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:14 2020 UTC (4 years ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.224: +8 -3 lines
Diff to previous 1.224 (colored) next main 1.225 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.225 / (download) - annotate - [select for diffs], Mon Apr 13 22:22:19 2020 UTC (4 years ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Changes since 1.224: +8 -3 lines
Diff to previous 1.224 (colored) to selected 1.114 (colored)

uvm_fault_check(): if MADV_SEQUENTIAL, change lower lock type to RW_WRITER
in case many threads are concurrently doing "sequential" access, to avoid
excessive mixing of read/write lock holds.

Revision 1.204.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:21 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.204.2.2: +17 -8 lines
Diff to previous 1.204.2.2 (colored) to branchpoint 1.204 (colored) to selected 1.114 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.204.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:09:04 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.204.2.1: +510 -210 lines
Diff to previous 1.204.2.1 (colored) to branchpoint 1.204 (colored) to selected 1.114 (colored)

Merge changes from current as of 20200406

Revision 1.224 / (download) - annotate - [select for diffs], Mon Mar 23 10:35:56 2020 UTC (4 years ago) by skrll
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.223: +5 -2 lines
Diff to previous 1.223 (colored) to selected 1.114 (colored)

Fix UVMHIST build

Revision 1.223 / (download) - annotate - [select for diffs], Mon Mar 23 10:35:08 2020 UTC (4 years ago) by skrll
Branch: MAIN
Changes since 1.222: +7 -7 lines
Diff to previous 1.222 (colored) to selected 1.114 (colored)

Trailing whitespace

Revision 1.222 / (download) - annotate - [select for diffs], Sun Mar 22 18:32:42 2020 UTC (4 years ago) by ad
Branch: MAIN
Changes since 1.221: +383 -78 lines
Diff to previous 1.221 (colored) to selected 1.114 (colored)

Process concurrent page faults on individual uvm_objects / vm_amaps in
parallel, where the relevant pages are already in-core.  Proposed on
tech-kern.

Temporarily disabled on MP architectures with __HAVE_UNLOCKED_PMAP until
adjustments are made to their pmaps.

Revision 1.221 / (download) - annotate - [select for diffs], Fri Mar 20 19:08:54 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.220: +3 -3 lines
Diff to previous 1.220 (colored) to selected 1.114 (colored)

Go back to freeing struct vm_anon one by one.  There may have been an
advantage circa ~2008 but there isn't now.

Revision 1.220 / (download) - annotate - [select for diffs], Fri Mar 20 18:50:09 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.219: +15 -16 lines
Diff to previous 1.219 (colored) to selected 1.114 (colored)

uvm_fault_upper_lookup(): don't call pmap_extract() and pmap_update() more
often than needed.

Revision 1.219 / (download) - annotate - [select for diffs], Tue Mar 17 18:31:39 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.218: +21 -12 lines
Diff to previous 1.218 (colored) to selected 1.114 (colored)

Tweak the March 14th change to make page waits interlocked by pg->interlock.
Remove unneeded changes and only deal with the PQ_WANTED flag, to exclude
possible bugs.

Revision 1.218 / (download) - annotate - [select for diffs], Sat Mar 14 20:23:51 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.217: +23 -41 lines
Diff to previous 1.217 (colored) to selected 1.114 (colored)

Make page waits (WANTED vs BUSY) interlocked by pg->interlock.  Gets RW
locks out of the equation for sleep/wakeup, and allows observing+waiting
for busy pages when holding only a read lock.  Proposed on tech-kern.

Revision 1.206.2.2 / (download) - annotate - [select for diffs], Sun Mar 8 11:01:22 2020 UTC (4 years, 1 month ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.206.2.1: +9 -5 lines
Diff to previous 1.206.2.1 (colored) to branchpoint 1.206 (colored) to selected 1.114 (colored)

Pull up following revision(s) (requested by chs in ticket #764):

	sys/uvm/uvm_fault.c: revision 1.207

fix two bugs reported in
https://syzkaller.appspot.com/bug?id=8840dce484094a926e1ec388ffb83acb2fa291c9

 - in uvm_fault_check(), if the map entry is wired, handle the fault the same way
   that we would handle UVM_FAULT_WIRE.  faulting on wired mappings is valid
   if the mapped object was truncated and then later grown again.

 - in uvm_fault_unwire_locked(), we must hold the locks for the vm_map_entry
   while calling pmap_extract() in order to avoid races with the mapped object
   being truncated while we are unwiring it.

Revision 1.214.2.2 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:11 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.214.2.1: +42 -42 lines
Diff to previous 1.214.2.1 (colored) to branchpoint 1.214 (colored) next main 1.215 (colored) to selected 1.114 (colored)

Sync with head.

Revision 1.217 / (download) - annotate - [select for diffs], Mon Feb 24 12:38:57 2020 UTC (4 years, 1 month ago) by rin
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.216: +7 -7 lines
Diff to previous 1.216 (colored) to selected 1.114 (colored)

0x%#x --> %#x for non-external codes.
Also, stop mixing up 0x%x and %#x in single files as far as possible.

Revision 1.216 / (download) - annotate - [select for diffs], Sun Feb 23 15:46:43 2020 UTC (4 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.215: +37 -37 lines
Diff to previous 1.215 (colored) to selected 1.114 (colored)

UVM locking changes, proposed on tech-kern:

- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart.  v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap.  Others to follow later.

Revision 1.214.2.1 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:38 2020 UTC (4 years, 3 months ago) by ad
Branch: ad-namecache
Changes since 1.214: +38 -29 lines
Diff to previous 1.214 (colored) to selected 1.114 (colored)

Sync with head.

Revision 1.215 / (download) - annotate - [select for diffs], Wed Jan 15 17:55:45 2020 UTC (4 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1
Changes since 1.214: +38 -29 lines
Diff to previous 1.214 (colored) to selected 1.114 (colored)

Merge from yamt-pagecache (after much testing):

- Reduce unnecessary page scan in putpages esp. when an object has a ton of
  pages cached but only a few of them are dirty.

- Reduce the number of pmap operations by tracking page dirtiness more
  precisely in uvm layer.

Revision 1.214 / (download) - annotate - [select for diffs], Tue Dec 31 22:42:51 2019 UTC (4 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.213: +24 -3 lines
Diff to previous 1.213 (colored) to selected 1.114 (colored)

- Add and use wrapper functions that take and acquire page interlocks, and pairs
  of page interlocks.  Require that the page interlock be held over calls to
  uvm_pageactivate(), uvm_pagewire() and similar.

- Solve the concurrency problem with page replacement state.  Rather than
  updating the global state synchronously, set an intended state on
  individual pages (active, inactive, enqueued, dequeued) while holding the
  page interlock.  After the interlock is released put the pages on a 128
  entry per-CPU queue for their state changes to be made real in batch.
  This results in in a ~400 fold decrease in contention on my test system.
  Proposed on tech-kern but modified to use the page interlock rather than
  atomics to synchronise as it's much easier to maintain that way, and
  cheaper.

Revision 1.213 / (download) - annotate - [select for diffs], Mon Dec 16 22:47:55 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.212: +36 -57 lines
Diff to previous 1.212 (colored) to selected 1.114 (colored)

- Extend the per-CPU counters matt@ did to include all of the hot counters
  in UVM, excluding uvmexp.free, which needs special treatment and will be
  done with a separate commit.  Cuts system time for a build by 20-25% on
  a 48 CPU machine w/DIAGNOSTIC.

- Avoid 64-bit integer divide on every fault (for rnd_add_uint32).

Revision 1.212 / (download) - annotate - [select for diffs], Fri Dec 13 20:10:22 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.211: +6 -31 lines
Diff to previous 1.211 (colored) to selected 1.114 (colored)

Break the global uvm_pageqlock into a per-page identity lock and a private
lock for use of the pagedaemon policy code.  Discussed on tech-kern.

PR kern/54209: NetBSD 8 large memory performance extremely low
PR kern/54210: NetBSD-8 processes presumably not exiting
PR kern/54727: writing a large file causes unreasonable system behaviour

Revision 1.211 / (download) - annotate - [select for diffs], Sun Dec 1 14:30:01 2019 UTC (4 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.210: +4 -4 lines
Diff to previous 1.210 (colored) to selected 1.114 (colored)

Deactivate pages in batch instead of acquiring uvm_pageqlock repeatedly.

Revision 1.210 / (download) - annotate - [select for diffs], Sun Dec 1 10:19:59 2019 UTC (4 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.209: +3 -2 lines
Diff to previous 1.209 (colored) to selected 1.114 (colored)

Add missing <sys/atomic.h> include

Revision 1.209 / (download) - annotate - [select for diffs], Sun Dec 1 08:19:09 2019 UTC (4 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.208: +36 -19 lines
Diff to previous 1.208 (colored) to selected 1.114 (colored)

Use atomic_{load,store}_relaxed() on global counters.

Revision 1.206.2.1 / (download) - annotate - [select for diffs], Mon Nov 11 17:13:28 2019 UTC (4 years, 5 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.206: +10 -5 lines
Diff to previous 1.206 (colored) to selected 1.114 (colored)

Pull up following revision(s) (requested by chs in ticket #414):

	sys/uvm/uvm_fault.c: revision 1.208

in uvm_fault_lower_io(), fetch all the map entry values that we need
before we unlock everything.

Revision 1.208 / (download) - annotate - [select for diffs], Sun Nov 10 20:38:33 2019 UTC (4 years, 5 months ago) by chs
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.207: +10 -5 lines
Diff to previous 1.207 (colored) to selected 1.114 (colored)

in uvm_fault_lower_io(), fetch all the map entry values that we need
before we unlock everything.

Reported-by: syzbot+bb6f0092562222b489a3@syzkaller.appspotmail.com

Revision 1.207 / (download) - annotate - [select for diffs], Mon Aug 5 17:36:42 2019 UTC (4 years, 8 months ago) by chs
Branch: MAIN
Changes since 1.206: +9 -5 lines
Diff to previous 1.206 (colored) to selected 1.114 (colored)

fix two bugs reported in
https://syzkaller.appspot.com/bug?id=8840dce484094a926e1ec388ffb83acb2fa291c9

 - in uvm_fault_check(), if the map entry is wired, handle the fault the same way
   that we would handle UVM_FAULT_WIRE.  faulting on wired mappings is valid
   if the mapped object was truncated and then later grown again.

 - in uvm_fault_unwire_locked(), we must hold the locks for the vm_map_entry
   while calling pmap_extract() in order to avoid races with the mapped object
   being truncated while we are unwiring it.

Reported-by: syzbot+2e0ae2fc35ab7301c7b8@syzkaller.appspotmail.com

Revision 1.204.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:58 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.204: +13 -3 lines
Diff to previous 1.204 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.206 / (download) - annotate - [select for diffs], Tue May 28 08:59:35 2019 UTC (4 years, 10 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base
Branch point for: netbsd-9
Changes since 1.205: +3 -3 lines
Diff to previous 1.205 (colored) to selected 1.114 (colored)

s/recieve/receive/

Revision 1.199.6.4 / (download) - annotate - [select for diffs], Mon Apr 22 08:05:51 2019 UTC (4 years, 11 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.199.6.3: +12 -2 lines
Diff to previous 1.199.6.3 (colored) to branchpoint 1.199 (colored) next main 1.200 (colored) to selected 1.114 (colored)

Pull up following revision(s) (requested by chs in ticket #1236):

	sys/uvm/uvm_fault.c: revision 1.205

If a pager fault method returns ENOMEM but some memory appears to be reclaimable,
wake up the pagedaemon and retry the fault.  This fixes the problems with Xorg
being killed with an "out of swap" message due to a transient memory shortage.

Revision 1.205 / (download) - annotate - [select for diffs], Sun Apr 21 15:27:59 2019 UTC (5 years ago) by chs
Branch: MAIN
Changes since 1.204: +12 -2 lines
Diff to previous 1.204 (colored) to selected 1.114 (colored)

If a pager fault method returns ENOMEM but some memory appears to be reclaimable,
wake up the pagedaemon and retry the fault.  This fixes the problems with Xorg
being killed with an "out of swap" message due to a transient memory shortage.

Revision 1.202.2.1 / (download) - annotate - [select for diffs], Mon May 21 04:36:17 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.202: +27 -2 lines
Diff to previous 1.202 (colored) next main 1.203 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.204 / (download) - annotate - [select for diffs], Tue May 8 19:33:57 2018 UTC (5 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, isaki-audio2-base, isaki-audio2
Branch point for: phil-wifi
Changes since 1.203: +8 -10 lines
Diff to previous 1.203 (colored) to selected 1.114 (colored)

don't store the rssmax in the lwp rusage, it is a per proc property. Instead
utilize an unused field in the vmspace struct to store it. Also conditionalize
on platforms that have pmap statistics available.

Revision 1.203 / (download) - annotate - [select for diffs], Mon May 7 21:00:14 2018 UTC (5 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.202: +29 -2 lines
Diff to previous 1.202 (colored) to selected 1.114 (colored)

update maxrss (used to always be 0). Patterned after the OpenBSD changes.

Revision 1.199.6.3 / (download) - annotate - [select for diffs], Tue Feb 27 09:07:33 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.199.6.2: +22 -8 lines
Diff to previous 1.199.6.2 (colored) to branchpoint 1.199 (colored) to selected 1.114 (colored)

Pull up following revision(s) (requested by mrg in ticket #593):
	sys/dev/marvell/mvxpsec.c: revision 1.2
	sys/arch/m68k/m68k/pmap_motorola.c: revision 1.70
	sys/opencrypto/crypto.c: revision 1.102
	sys/arch/sparc64/sparc64/pmap.c: revision 1.308
	sys/ufs/chfs/chfs_malloc.c: revision 1.5
	sys/arch/powerpc/oea/pmap.c: revision 1.95
	sys/sys/pool.h: revision 1.80,1.82
	sys/kern/subr_pool.c: revision 1.209-1.216,1.219-1.220
	sys/arch/alpha/alpha/pmap.c: revision 1.262
	sys/kern/uipc_mbuf.c: revision 1.173
	sys/uvm/uvm_fault.c: revision 1.202
	sys/sys/mbuf.h: revision 1.172
	sys/kern/subr_extent.c: revision 1.86
	sys/arch/x86/x86/pmap.c: revision 1.266 (via patch)
	sys/dev/dtv/dtv_scatter.c: revision 1.4

Allow only one pending call to a pool's backing allocator at a time.
Candidate fix for problems with hanging after kva fragmentation related
to PR kern/45718.

Proposed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2017/10/23/msg022472.html
Tested by bouyer@ on i386.

This makes one small change to the semantics of pool_prime and
pool_setlowat: they may fail with EWOULDBLOCK instead of ENOMEM, if
there is a pending call to the backing allocator in another thread but
we are not actually out of memory.  That is unlikely because nearly
always these are used during initialization, when the pool is not in
use.

Define the new flag too for previous commit.

pool_grow can now fail even when sleeping is ok. Catch this case in pool_get
and retry.

Assert that pool_get failure happens only with PR_NOWAIT.
This would have caught the mistake I made last week leading to null
pointer dereferences all over the place, a mistake which I evidently
poorly scheduled alongside maxv's change to the panic message on x86
for null pointer dereferences.

Since pr_lock is now used to wait for two things now (PR_GROWING and
PR_WANTED) we need to loop for the condition we wanted.
make the KASSERTMSG/panic strings consistent as '%s: [%s], __func__, wchan'
Handle the ERESTART case from pool_grow()

don't pass 0 to the pool flags
Guess pool_cache_get(pc, 0) means PR_WAITOK here.
Earlier on in the same context we use kmem_alloc(sz, KM_SLEEP).

use PR_WAITOK everywhere.
use PR_NOWAIT.

Don't use 0 for PR_NOWAIT

use PR_NOWAIT instead of 0

panic ex nihilo -- PR_NOWAITing for zerot

Add assertions that either PR_WAITOK or PR_NOWAIT are set.
- fix an assert; we can reach there if we are nowait or limitfail.
- when priming the pool and failing with ERESTART, don't decrement the number
  of pages; this avoids the issue of returning an ERESTART when we get to 0,
  and is more correct.
- simplify the pool_grow code, and don't wakeup things if we ENOMEM.

In pmap_enter_ma(), only try to allocate pves if we might need them,
and even if that fails, only fail the operation if we later discover
that we really do need them.  This implements the requirement that
pmap_enter(PMAP_CANFAIL) must not fail when replacing an existing
mapping with the first mapping of a new page, which is an unintended
consequence of the changes from the rmind-uvmplock branch in 2011.

The problem arises when pmap_enter(PMAP_CANFAIL) is used to replace an existing
pmap mapping with a mapping of a different page (eg. to resolve a copy-on-write).
If that fails and leaves the old pmap entry in place, then UVM won't hold
the right locks when it eventually retries.  This entanglement of the UVM and
pmap locking was done in rmind-uvmplock in order to improve performance,
but it also means that the UVM state and pmap state need to be kept in sync
more than they did before.  It would be possible to handle this in the UVM code
instead of in the pmap code, but these pmap changes improve the handling of
low memory situations in general, and handling this in UVM would be clunky,
so this seemed like the better way to go.

This somewhat indirectly fixes PR 52706, as well as the failing assertion
about "uvm_page_locked_p(old_pg)".  (but only on x86, various other platforms
will need their own changes to handle this issue.)
In uvm_fault_upper_enter(), if pmap_enter(PMAP_CANFAIL) fails, assert that
the pmap did not leave around a now-stale pmap mapping for an old page.
If such a pmap mapping still existed after we unlocked the vm_map,
the UVM code would not know later that it would need to lock the
lower layer object while calling the pmap to remove or replace that
stale pmap mapping.  See PR 52706 for further details.
hopefully workaround the irregularly "fork fails in init" problem.
if a pool is growing, and the grower is PR_NOWAIT, mark this.
if another caller wants to grow the pool and is also PR_NOWAIT,
busy-wait for the original caller, which should either succeed
or hard-fail fairly quickly.

implement the busy-wait by unlocking and relocking this pools
mutex and returning ERESTART.  other methods (such as having
the caller do this) were significantly more code and this hack
is fairly localised.
ok chs@ riastradh@

Don't release the lock in the PR_NOWAIT allocation. Move flags setting
after the acquiring the mutex. (from Tobias Nygren)
apply the change from arch/x86/x86/pmap.c rev. 1.266 commitid vZRjvmxG7YTHLOfA:

In pmap_enter_ma(), only try to allocate pves if we might need them,
and even if that fails, only fail the operation if we later discover
that we really do need them.  If we are replacing an existing mapping,
reuse the pv structure where possible.

This implements the requirement that pmap_enter(PMAP_CANFAIL) must not fail
when replacing an existing mapping with the first mapping of a new page,
which is an unintended consequence of the changes from the rmind-uvmplock
branch in 2011.

The problem arises when pmap_enter(PMAP_CANFAIL) is used to replace an existing
pmap mapping with a mapping of a different page (eg. to resolve a copy-on-write).
If that fails and leaves the old pmap entry in place, then UVM won't hold
the right locks when it eventually retries.  This entanglement of the UVM and
pmap locking was done in rmind-uvmplock in order to improve performance,
but it also means that the UVM state and pmap state need to be kept in sync
more than they did before.  It would be possible to handle this in the UVM code
instead of in the pmap code, but these pmap changes improve the handling of
low memory situations in general, and handling this in UVM would be clunky,
so this seemed like the better way to go.

This somewhat indirectly fixes PR 52706 on the remaining platforms where
this problem existed.

Revision 1.194.2.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:22 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.194.2.1: +55 -38 lines
Diff to previous 1.194.2.1 (colored) to branchpoint 1.194 (colored) next main 1.195 (colored) to selected 1.114 (colored)

update from HEAD

Revision 1.202 / (download) - annotate - [select for diffs], Mon Nov 20 21:06:54 2017 UTC (6 years, 4 months ago) by chs
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.201: +22 -8 lines
Diff to previous 1.201 (colored) to selected 1.114 (colored)

In uvm_fault_upper_enter(), if pmap_enter(PMAP_CANFAIL) fails, assert that
the pmap did not leave around a now-stale pmap mapping for an old page.
If such a pmap mapping still existed after we unlocked the vm_map,
the UVM code would not know later that it would need to lock the
lower layer object while calling the pmap to remove or replace that
stale pmap mapping.  See PR 52706 for further details.

Revision 1.199.6.2 / (download) - annotate - [select for diffs], Thu Nov 2 21:29:53 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.199.6.1: +30 -28 lines
Diff to previous 1.199.6.1 (colored) to branchpoint 1.199 (colored) to selected 1.114 (colored)

Pull up following revision(s) (requested by pgoyette in ticket #335):
	share/man/man9/kernhist.9: 1.5-1.8
	sys/arch/acorn26/acorn26/pmap.c: 1.39
	sys/arch/arm/arm32/fault.c: 1.105 via patch
	sys/arch/arm/arm32/pmap.c: 1.350, 1.359
	sys/arch/arm/broadcom/bcm2835_bsc.c: 1.7
	sys/arch/arm/omap/if_cpsw.c: 1.20
	sys/arch/arm/omap/tiotg.c: 1.7
	sys/arch/evbarm/conf/RPI2_INSTALL: 1.3
	sys/dev/ic/sl811hs.c: 1.98
	sys/dev/usb/ehci.c: 1.256
	sys/dev/usb/if_axe.c: 1.83
	sys/dev/usb/motg.c: 1.18
	sys/dev/usb/ohci.c: 1.274
	sys/dev/usb/ucom.c: 1.119
	sys/dev/usb/uhci.c: 1.277
	sys/dev/usb/uhub.c: 1.137
	sys/dev/usb/umass.c: 1.160-1.162
	sys/dev/usb/umass_quirks.c: 1.100
	sys/dev/usb/umass_scsipi.c: 1.55
	sys/dev/usb/usb.c: 1.168
	sys/dev/usb/usb_mem.c: 1.70
	sys/dev/usb/usb_subr.c: 1.221
	sys/dev/usb/usbdi.c: 1.175
	sys/dev/usb/usbdi_util.c: 1.67-1.70
	sys/dev/usb/usbroothub.c: 1.3
	sys/dev/usb/xhci.c: 1.75
	sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: 1.34
	sys/kern/kern_history.c: 1.15
	sys/kern/kern_xxx.c: 1.74
	sys/kern/vfs_bio.c: 1.275-1.276
	sys/miscfs/genfs/genfs_io.c: 1.71
	sys/sys/kernhist.h: 1.21
	sys/ufs/ffs/ffs_balloc.c: 1.63
	sys/ufs/lfs/lfs_vfsops.c: 1.361
	sys/ufs/lfs/ulfs_inode.c: 1.21
	sys/ufs/lfs/ulfs_vnops.c: 1.52
	sys/ufs/ufs/ufs_inode.c: 1.102
	sys/ufs/ufs/ufs_vnops.c: 1.239
	sys/uvm/pmap/pmap.c: 1.37-1.39
	sys/uvm/pmap/pmap_tlb.c: 1.22
	sys/uvm/uvm_amap.c: 1.108
	sys/uvm/uvm_anon.c: 1.64
	sys/uvm/uvm_aobj.c: 1.126
	sys/uvm/uvm_bio.c: 1.91
	sys/uvm/uvm_device.c: 1.66
	sys/uvm/uvm_fault.c: 1.201
	sys/uvm/uvm_km.c: 1.144
	sys/uvm/uvm_loan.c: 1.85
	sys/uvm/uvm_map.c: 1.353
	sys/uvm/uvm_page.c: 1.194
	sys/uvm/uvm_pager.c: 1.111
	sys/uvm/uvm_pdaemon.c: 1.109
	sys/uvm/uvm_swap.c: 1.175
	sys/uvm/uvm_vnode.c: 1.103
	usr.bin/vmstat/vmstat.c: 1.219
Reorder to test for null before null deref in debug code
--
Reorder to test for null before null deref in debug code
--
KNF
--
No need for '\n' in UVMHIST_LOG
--
normalise a BIOHIST log message
--
Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...
(As proposed on tech-kern@ with additional changes and enhancements.)
Details of changes:
* All history arguments are now stored as uintmax_t values[1], both in
   the kernel and in the structures used for exporting the history data
   to userland via sysctl(9).  This avoids problems on some architectures
   where passing a 64-bit (or larger) value to printf(3) can cause it to
   process the value as multiple arguments.  (This can be particularly
   problematic when printf()'s format string is not a literal, since in
   that case the compiler cannot know how large each argument should be.)
* Update the data structures used for exporting kernel history data to
   include a version number as well as the length of history arguments.
* All [2] existing users of kernhist(9) have had their format strings
   updated.  Each format specifier now includes an explicit length
   modifier 'j' to refer to numeric values of the size of uintmax_t.
* All [2] existing users of kernhist(9) have had their format strings
   updated to replace uses of "%p" with "%#jx", and the pointer
   arguments are now cast to (uintptr_t) before being subsequently cast
   to (uintmax_t).  This is needed to avoid compiler warnings about
   casting "pointer to integer of a different size."
* All [2] existing users of kernhist(9) have had instances of "%s" or
   "%c" format strings replaced with numeric formats; several instances
   of mis-match between format string and argument list have been fixed.
* vmstat(1) has been modified to handle the new size of arguments in the
   history data as exported by sysctl(9).
* vmstat(1) now provides a warning message if the history requested with
   the -u option does not exist (previously, this condition was silently
   ignored, with only a single blank line being printed).
* vmstat(1) now checks the version and argument length included in the
   data exported via sysctl(9) and exits if they do not match the values
   with which vmstat was built.
* The kernhist(9) man-page has been updated to note the additional
   requirements imposed on the format strings, along with several other
   minor changes and enhancements.
[1] It would have been possible to use an explicit length (for example,
     uint64_t) for the history arguments.  But that would require another
     "rototill" of all the users in the future when we add support for an
     architecture that supports a larger size.  Also, the printf(3)
format
     specifiers for explicitly-sized values, such as "%"PRIu64, are much
     more verbose (and less aesthetically appealing, IMHO) than simply
     using "%ju".
[2] I've tried very hard to find "all [the] existing users of
kernhist(9)"
     but it is possible that I've missed some of them.  I would be glad
to
     update any stragglers that anyone identifies.
--
For some reason this single kernel seems to have outgrown its declared
size as a result of the kernhist(9) changes.  Bump the size.
XXX The amount of increase may be excessive - anyone with more detailed
XXX knowledge please feel free to further adjust the value
appropriately.
--
Misssed one cast of pointer --> uintptr_t in previous kernhist(9) commit
--
And yet another one.  :(
--
Use correct mark-up for NetBSD version.
--
More improvements in grammar and readability.
--
Remove a stray '"' (obvious typo) and add a couple of casts that are
probably needed.
--
And replace an instance of "%p" conversion with "%#jx"
--
Whitespace fix. Give Bl tag table a width. Fix Xr.

Revision 1.201 / (download) - annotate - [select for diffs], Sat Oct 28 00:37:13 2017 UTC (6 years, 5 months ago) by pgoyette
Branch: MAIN
Changes since 1.200: +30 -28 lines
Diff to previous 1.200 (colored) to selected 1.114 (colored)

Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...

(As proposed on tech-kern@ with additional changes and enhancements.)

Details of changes:

* All history arguments are now stored as uintmax_t values[1], both in
  the kernel and in the structures used for exporting the history data
  to userland via sysctl(9).  This avoids problems on some architectures
  where passing a 64-bit (or larger) value to printf(3) can cause it to
  process the value as multiple arguments.  (This can be particularly
  problematic when printf()'s format string is not a literal, since in
  that case the compiler cannot know how large each argument should be.)

* Update the data structures used for exporting kernel history data to
  include a version number as well as the length of history arguments.

* All [2] existing users of kernhist(9) have had their format strings
  updated.  Each format specifier now includes an explicit length
  modifier 'j' to refer to numeric values of the size of uintmax_t.

* All [2] existing users of kernhist(9) have had their format strings
  updated to replace uses of "%p" with "%#jx", and the pointer
  arguments are now cast to (uintptr_t) before being subsequently cast
  to (uintmax_t).  This is needed to avoid compiler warnings about
  casting "pointer to integer of a different size."

* All [2] existing users of kernhist(9) have had instances of "%s" or
  "%c" format strings replaced with numeric formats; several instances
  of mis-match between format string and argument list have been fixed.

* vmstat(1) has been modified to handle the new size of arguments in the
  history data as exported by sysctl(9).

* vmstat(1) now provides a warning message if the history requested with
  the -u option does not exist (previously, this condition was silently
  ignored, with only a single blank line being printed).

* vmstat(1) now checks the version and argument length included in the
  data exported via sysctl(9) and exits if they do not match the values
  with which vmstat was built.

* The kernhist(9) man-page has been updated to note the additional
  requirements imposed on the format strings, along with several other
  minor changes and enhancements.

[1] It would have been possible to use an explicit length (for example,
    uint64_t) for the history arguments.  But that would require another
    "rototill" of all the users in the future when we add support for an
    architecture that supports a larger size.  Also, the printf(3) format
    specifiers for explicitly-sized values, such as "%"PRIu64, are much
    more verbose (and less aesthetically appealing, IMHO) than simply
    using "%ju".

[2] I've tried very hard to find "all [the] existing users of kernhist(9)"
    but it is possible that I've missed some of them.  I would be glad to
    update any stragglers that anyone identifies.

Revision 1.196.4.2 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:17 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.196.4.1: +11 -10 lines
Diff to previous 1.196.4.1 (colored) to branchpoint 1.196 (colored) next main 1.197 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.199.6.1 / (download) - annotate - [select for diffs], Mon Jul 24 06:03:42 2017 UTC (6 years, 8 months ago) by snj
Branch: netbsd-8
Changes since 1.199: +3 -3 lines
Diff to previous 1.199 (colored) to selected 1.114 (colored)

Pull up following revision(s) (requested by kamil in ticket #120):
	sys/uvm/uvm_fault.c: revision 1.200
	tests/lib/libc/sys/t_write.c: revision 1.4-1.6
PR/52384: make uvm_fault_check() return EFAULT not EACCES, like our man
pages
(but not OpenGroup which does not document EFAULT for read/write, and onl=
y
documents EACCES for sockets) say for read/write.
--
check for EFAULT on reads and writes to memory with not permission.
--
add munmap
#define for const.
--
add another missing munmap (Kamil)

Revision 1.200 / (download) - annotate - [select for diffs], Sun Jul 9 20:53:09 2017 UTC (6 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Changes since 1.199: +3 -3 lines
Diff to previous 1.199 (colored) to selected 1.114 (colored)

PR/52384: make uvm_fault_check() return EFAULT not EACCES, like our man pages
(but not OpenGroup which does not document EFAULT for read/write, and only
documents EACCES for sockets) say for read/write.

Revision 1.197.2.2 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:32 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.197.2.1: +9 -6 lines
Diff to previous 1.197.2.1 (colored) to branchpoint 1.197 (colored) next main 1.198 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.197.4.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:09 2017 UTC (7 years ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.197: +10 -9 lines
Diff to previous 1.197 (colored) next main 1.198 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.199 / (download) - annotate - [select for diffs], Mon Mar 20 15:51:41 2017 UTC (7 years, 1 month ago) by skrll
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, netbsd-8-base, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.198: +9 -6 lines
Diff to previous 1.198 (colored) to selected 1.114 (colored)

Ensure we pass the prot in flags to pmap_enter when creating a wired
mapping

Revision 1.197.2.1 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:54 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.197: +3 -5 lines
Diff to previous 1.197 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.198 / (download) - annotate - [select for diffs], Sun Mar 19 23:44:34 2017 UTC (7 years, 1 month ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320
Changes since 1.197: +3 -5 lines
Diff to previous 1.197 (colored) to selected 1.114 (colored)

__diagused police

Revision 1.196.4.1 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:17 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.196: +11 -11 lines
Diff to previous 1.196 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.197 / (download) - annotate - [select for diffs], Mon Jun 22 06:24:17 2015 UTC (8 years, 10 months ago) by matt
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, localcount-20160914, bouyer-socketcan-base
Branch point for: pgoyette-localcount, bouyer-socketcan
Changes since 1.196: +11 -11 lines
Diff to previous 1.196 (colored) to selected 1.114 (colored)

Use %p, %#xl etc. for pointers and addresses.

Revision 1.194.2.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:45 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.194: +4 -36 lines
Diff to previous 1.194 (colored) to selected 1.114 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.196 / (download) - annotate - [select for diffs], Sun Aug 10 16:44:37 2014 UTC (9 years, 8 months ago) by tls
Branch: MAIN
CVS Tags: tls-maxphys-base, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Branch point for: nick-nhusb
Changes since 1.195: +3 -35 lines
Diff to previous 1.195 (colored) to selected 1.114 (colored)

Merge tls-earlyentropy branch into HEAD.

Revision 1.190.2.6 / (download) - annotate - [select for diffs], Thu May 22 11:41:19 2014 UTC (9 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.190.2.5: +3 -3 lines
Diff to previous 1.190.2.5 (colored) to branchpoint 1.190 (colored) next main 1.191 (colored) to selected 1.114 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.194.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:22 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.194: +3 -3 lines
Diff to previous 1.194 (colored) next main 1.195 (colored) to selected 1.114 (colored)

sync with head

Revision 1.195.2.1 / (download) - annotate - [select for diffs], Mon Apr 7 03:37:33 2014 UTC (10 years ago) by tls
Branch: tls-earlyentropy
Changes since 1.195: +3 -35 lines
Diff to previous 1.195 (colored) next main 1.196 (colored) to selected 1.114 (colored)

Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
   RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
   and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
   places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
   that had stubbed out code, other minor cleanups.

Revision 1.195 / (download) - annotate - [select for diffs], Sun Sep 15 15:52:35 2013 UTC (10 years, 7 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-earlyentropy-base, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.194: +3 -3 lines
Diff to previous 1.194 (colored) to selected 1.114 (colored)

Mark a variable as potentially unused

Revision 1.190.2.5 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:58 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.190.2.4: +99 -29 lines
Diff to previous 1.190.2.4 (colored) to branchpoint 1.190 (colored) to selected 1.114 (colored)

sync with head

Revision 1.125.6.1.4.6 / (download) - annotate - [select for diffs], Thu Apr 12 19:38:27 2012 UTC (12 years ago) by matt
Branch: matt-nb5-mips64
Changes since 1.125.6.1.4.5: +10 -6 lines
Diff to previous 1.125.6.1.4.5 (colored) to branchpoint 1.125.6.1 (colored) next main 1.125.6.2 (colored) to selected 1.114 (colored)

Apply colormask to get a valid color.

Revision 1.125.6.1.4.5 / (download) - annotate - [select for diffs], Thu Apr 12 01:40:27 2012 UTC (12 years ago) by matt
Branch: matt-nb5-mips64
Changes since 1.125.6.1.4.4: +7 -6 lines
Diff to previous 1.125.6.1.4.4 (colored) to branchpoint 1.125.6.1 (colored) to selected 1.114 (colored)

Separate object-less anon pages out of the active list if there is no swap
device.  Make uvm_reclaimable and uvm.*estimatable understand colors and
kmem allocations.

Revision 1.125.6.1.4.4 / (download) - annotate - [select for diffs], Wed Feb 29 18:03:38 2012 UTC (12 years, 1 month ago) by matt
Branch: matt-nb5-mips64
Changes since 1.125.6.1.4.3: +11 -11 lines
Diff to previous 1.125.6.1.4.3 (colored) to branchpoint 1.125.6.1 (colored) to selected 1.114 (colored)

Improve UVM_PAGE_TRKOWN.
Add more asserts to uvm_page.

Revision 1.191.2.2 / (download) - annotate - [select for diffs], Fri Feb 24 09:11:51 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.191.2.1: +2 -4 lines
Diff to previous 1.191.2.1 (colored) to branchpoint 1.191 (colored) next main 1.192 (colored) to selected 1.114 (colored)

sync to -current.

Revision 1.194 / (download) - annotate - [select for diffs], Sun Feb 19 00:05:55 2012 UTC (12 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: tls-maxphys, rmind-smpnet
Changes since 1.193: +2 -4 lines
Diff to previous 1.193 (colored) to selected 1.114 (colored)

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

Revision 1.191.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:58 2012 UTC (12 years, 2 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.191: +63 -22 lines
Diff to previous 1.191 (colored) to selected 1.114 (colored)

merge to -current.

Revision 1.193 / (download) - annotate - [select for diffs], Thu Feb 2 19:43:08 2012 UTC (12 years, 2 months ago) by tls
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base2
Changes since 1.192: +62 -3 lines
Diff to previous 1.192 (colored) to selected 1.114 (colored)

Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.

Revision 1.192 / (download) - annotate - [select for diffs], Fri Jan 27 19:48:41 2012 UTC (12 years, 2 months ago) by para
Branch: MAIN
Changes since 1.191: +3 -21 lines
Diff to previous 1.191 (colored) to selected 1.114 (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.190.2.4 / (download) - annotate - [select for diffs], Wed Dec 28 13:22:47 2011 UTC (12 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.190.2.3: +8 -3 lines
Diff to previous 1.190.2.3 (colored) to branchpoint 1.190 (colored) to selected 1.114 (colored)

- assertions
- __unused

Revision 1.190.2.3 / (download) - annotate - [select for diffs], Mon Dec 26 16:03:10 2011 UTC (12 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.190.2.2: +48 -26 lines
Diff to previous 1.190.2.2 (colored) to branchpoint 1.190 (colored) to selected 1.114 (colored)

- use O->A loan to serve read(2).  based on a patch from Chuck Silvers
- associated O->A loan fixes.

Revision 1.191 / (download) - annotate - [select for diffs], Mon Nov 28 14:06:59 2011 UTC (12 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.190: +38 -7 lines
Diff to previous 1.190 (colored) to selected 1.114 (colored)

comments

Revision 1.190.2.2 / (download) - annotate - [select for diffs], Mon Nov 14 14:23:16 2011 UTC (12 years, 5 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.190.2.1: +5 -1 lines
Diff to previous 1.190.2.1 (colored) to branchpoint 1.190 (colored) to selected 1.114 (colored)

assertions

Revision 1.190.2.1 / (download) - annotate - [select for diffs], Wed Nov 2 21:54:00 2011 UTC (12 years, 5 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.190: +28 -26 lines
Diff to previous 1.190 (colored) to selected 1.114 (colored)

page cache related changes

- maintain object pages in radix tree rather than rb tree.
- reduce unnecessary page scan in putpages.  esp. when an object has a ton of
  pages cached but only a few of them are dirty.
- reduce the number of pmap operations by tracking page dirtiness more
  precisely in uvm layer.
- fix nfs commit range tracking.
- fix nfs write clustering.  XXX hack

Revision 1.190 / (download) - annotate - [select for diffs], Sat Aug 6 17:25:03 2011 UTC (12 years, 8 months ago) by rmind
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.189: +3 -3 lines
Diff to previous 1.189 (colored) to selected 1.114 (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.189 / (download) - annotate - [select for diffs], Tue Jul 5 13:47:24 2011 UTC (12 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.188: +2 -4 lines
Diff to previous 1.188 (colored) to selected 1.114 (colored)

reduce the number of atomic ops in common cases.  it's exceptional for
anons to remain longer than amap.

Revision 1.188 / (download) - annotate - [select for diffs], Fri Jun 24 01:39:22 2011 UTC (12 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.187: +3 -3 lines
Diff to previous 1.187 (colored) to selected 1.114 (colored)

Fix uvmplock regression - a lock against oneself case in amap_swap_off().
Happens since amap is NULL in uvmfault_anonget(), so uvmfault_unlockall()
keeps anon locked, when it should unlock it.

Revision 1.187 / (download) - annotate - [select for diffs], Thu Jun 23 17:36:59 2011 UTC (12 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.186: +79 -72 lines
Diff to previous 1.186 (colored) to selected 1.114 (colored)

uvmfault_anonget: clean-up, improve some comments, misc.

Revision 1.185.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:35 2011 UTC (12 years, 10 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.185: +135 -134 lines
Diff to previous 1.185 (colored) next main 1.186 (colored) to selected 1.114 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.186 / (download) - annotate - [select for diffs], Sun Jun 12 03:36:02 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.185: +135 -134 lines
Diff to previous 1.185 (colored) to selected 1.114 (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.180.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:10:21 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.180: +27 -23 lines
Diff to previous 1.180 (colored) next main 1.181 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.125.6.1.4.3 / (download) - annotate - [select for diffs], Fri Jun 3 07:59:57 2011 UTC (12 years, 10 months ago) by matt
Branch: matt-nb5-mips64
Changes since 1.125.6.1.4.2: +2 -2 lines
Diff to previous 1.125.6.1.4.2 (colored) to branchpoint 1.125.6.1 (colored) to selected 1.114 (colored)

Restore $NetBSD$

Revision 1.173.2.9 / (download) - annotate - [select for diffs], Tue May 31 03:05:14 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.173.2.8: +3 -5 lines
Diff to previous 1.173.2.8 (colored) to branchpoint 1.173 (colored) next main 1.174 (colored) to selected 1.114 (colored)

sync with head

Revision 1.125.6.1.4.2 / (download) - annotate - [select for diffs], Wed May 25 23:58:49 2011 UTC (12 years, 10 months ago) by matt
Branch: matt-nb5-mips64
Changes since 1.125.6.1.4.1: +3 -3 lines
Diff to previous 1.125.6.1.4.1 (colored) to branchpoint 1.125.6.1 (colored) to selected 1.114 (colored)

Make uvm_map recognize UVM_FLAG_COLORMATCH which tells uvm_map that the
'align' argument specifies the starting color of the KVA range to be returned.

When calling uvm_km_alloc with UVM_KMF_VAONLY, also specify the starting
color of the kva range returned (UMV_KMF_COLORMATCH) and pass those to
uvm_map.

In uvm_pglistalloc, make sure the pages being returned have sequentially
advancing colors (so they can be mapped in a contiguous address range).
Add a few missing UVM_FLAG_COLORMATCH flags to uvm_pagealloc calls.

Make the socket and pipe loan color-safe.

Make the mips pmap enforce strict page color (color(VA) == color(PA)).

Revision 1.173.2.8 / (download) - annotate - [select for diffs], Sat May 21 21:26:48 2011 UTC (12 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.173.2.7: +7 -9 lines
Diff to previous 1.173.2.7 (colored) to branchpoint 1.173 (colored) to selected 1.114 (colored)

uvm_fault_lower_promote: fix assert (move a bit up, where logic applies).

Revision 1.185 / (download) - annotate - [select for diffs], Sat May 21 11:49:34 2011 UTC (12 years, 11 months ago) by tsutsui
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.184: +3 -3 lines
Diff to previous 1.184 (colored) to selected 1.114 (colored)

No need to pass UVM_FLAG_COLORMATCH to uvm_pagealloc()
if no valid vaddr is specified.

Revision 1.173.2.7 / (download) - annotate - [select for diffs], Thu May 19 03:43:05 2011 UTC (12 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.173.2.6: +13 -13 lines
Diff to previous 1.173.2.6 (colored) to branchpoint 1.173 (colored) to selected 1.114 (colored)

Implement sharing of vnode_t::v_interlock amongst vnodes:
- Lock is shared amongst UVM objects using uvm_obj_setlock() or getnewvnode().
- Adjust vnode cache to handle unsharing, add VI_LOCKSHARE flag for that.
- Use sharing in tmpfs and layerfs for underlying object.
- Simplify locking in ubc_fault().
- Sprinkle some asserts.

Discussed with ad@.

Revision 1.184 / (download) - annotate - [select for diffs], Sat Apr 23 18:14:12 2011 UTC (13 years ago) by rmind
Branch: MAIN
Changes since 1.183: +2 -4 lines
Diff to previous 1.183 (colored) to selected 1.114 (colored)

Replace "malloc" in comments, remove unnecessary header inclusions.

Revision 1.173.2.6 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:22 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.173.2.5: +22 -8 lines
Diff to previous 1.173.2.5 (colored) to branchpoint 1.173 (colored) to selected 1.114 (colored)

sync with head

Revision 1.183 / (download) - annotate - [select for diffs], Fri Apr 8 10:42:51 2011 UTC (13 years ago) by yamt
Branch: MAIN
Changes since 1.182: +25 -12 lines
Diff to previous 1.182 (colored) to selected 1.114 (colored)

- ensure that the promoted page is on the queue even when later pmap_enter
 failed.
- don't activate a page twice.
- remove an argument which is used only for an assertion.
- assertions and comments.

Revision 1.173.2.5 / (download) - annotate - [select for diffs], Sat Mar 5 20:56:35 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.173.2.4: +92 -86 lines
Diff to previous 1.173.2.4 (colored) to branchpoint 1.173 (colored) to selected 1.114 (colored)

sync with head

Revision 1.180.4.2 / (download) - annotate - [select for diffs], Thu Feb 17 12:00:52 2011 UTC (13 years, 2 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.180.4.1: +3 -3 lines
Diff to previous 1.180.4.1 (colored) to branchpoint 1.180 (colored) next main 1.181 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.182 / (download) - annotate - [select for diffs], Thu Feb 10 21:05:52 2011 UTC (13 years, 2 months ago) by skrll
Branch: MAIN
CVS Tags: uebayasi-xip-base7, bouyer-quota2-nbase, bouyer-quota2-base
Changes since 1.181: +3 -3 lines
Diff to previous 1.181 (colored) to selected 1.114 (colored)

Spell uvm_fault_lower_neighbor correctly in UVMHIST_FUNC by using
__func__

Revision 1.180.4.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:20:06 2011 UTC (13 years, 2 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.180: +2 -9 lines
Diff to previous 1.180 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.181 / (download) - annotate - [select for diffs], Wed Feb 2 15:13:34 2011 UTC (13 years, 2 months ago) by chuck
Branch: MAIN
Changes since 1.180: +2 -9 lines
Diff to previous 1.180 (colored) to selected 1.114 (colored)

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

no functional change with this commit.

Revision 1.180 / (download) - annotate - [select for diffs], Thu Jan 6 05:51:57 2011 UTC (13 years, 3 months ago) by enami
Branch: MAIN
CVS Tags: jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.179: +5 -4 lines
Diff to previous 1.179 (colored) to selected 1.114 (colored)

Fix bugs introduced by previous commit; allocated page needs to be bound
with the anon, and uvmfault_anonget may be called with ufi NULL.

Revision 1.179 / (download) - annotate - [select for diffs], Tue Jan 4 08:26:33 2011 UTC (13 years, 3 months ago) by matt
Branch: MAIN
Changes since 1.178: +6 -5 lines
Diff to previous 1.178 (colored) to selected 1.114 (colored)

Add better color matching selecting free pages.  KM pages will now allocated
so that VA and PA have the same color.  On a page fault, choose a physical
page that has the same color as the virtual address.

When allocating kernel memory pages, allow the MD to specify a preferred
VM_FREELIST from which to choose pages.  For machines with large amounts
of memory (> 4GB), all kernel memory to come from <4GB to reduce the amount
of bounce buffering needed with 32bit DMA devices.

Revision 1.178 / (download) - annotate - [select for diffs], Mon Dec 20 00:25:47 2010 UTC (13 years, 4 months ago) by matt
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.177: +3 -3 lines
Diff to previous 1.177 (colored) to selected 1.114 (colored)

Move counting of faults, traps, intrs, soft[intr]s, syscalls, and nswtch
from uvmexp to per-cpu cpu_data and move them to 64bits.  Remove unneeded
includes of <uvm/uvm_extern.h> and/or <uvm/uvm.h>.

Revision 1.177 / (download) - annotate - [select for diffs], Fri Dec 17 22:00:43 2010 UTC (13 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.176: +86 -75 lines
Diff to previous 1.176 (colored) to selected 1.114 (colored)

cosmetics.  no functional changes.
- constify
- wrap long lines
- assertions
- comments

Revision 1.176 / (download) - annotate - [select for diffs], Wed Dec 15 13:44:17 2010 UTC (13 years, 4 months ago) by pooka
Branch: MAIN
Changes since 1.175: +2 -7 lines
Diff to previous 1.175 (colored) to selected 1.114 (colored)

Remove duplicate asserts from when uvm_fault_lower1() was merged
into uvm_fault_lower() (the duplicates were there already before,
just in different functions).

reported by Alexander Nasonov on tech-kern

Revision 1.125.6.2 / (download) - annotate - [select for diffs], Sun Nov 21 18:09:00 2010 UTC (13 years, 5 months ago) by riz
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.125.6.1: +6 -5 lines
Diff to previous 1.125.6.1 (colored) to branchpoint 1.125 (colored) next main 1.126 (colored) to selected 1.114 (colored)

Pull up following revision(s) (requested by rmind in ticket #1421):
	sys/uvm/uvm_bio.c: revision 1.70
	sys/uvm/uvm_map.c: revision 1.292
	sys/uvm/uvm_pager.c: revision 1.98
	sys/uvm/uvm_fault.c: revision 1.175
	sys/uvm/uvm_bio.c: revision 1.69
ubc_fault: split-off code part handling a single page into ubc_fault_page().
Keep the lock around pmap_update() where required.  While fixing this
in ubc_fault(), rework logic to &quot;remember&quot; 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.166.2.27 / (download) - annotate - [select for diffs], Sun Nov 21 15:00:12 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.26: +25 -25 lines
Diff to previous 1.166.2.26 (colored) next main 1.167 (colored) to selected 1.114 (colored)

Rename PGO_ZERO as PGO_HOLE, and s/uvm_page_zeropage/uvm_page_holepage/.

Revision 1.166.2.26 / (download) - annotate - [select for diffs], Sun Nov 21 14:52:48 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.25: +5 -5 lines
Diff to previous 1.166.2.25 (colored) to selected 1.114 (colored)

UVMHIST log for XIP hole COW.

Revision 1.166.2.25 / (download) - annotate - [select for diffs], Sun Nov 21 12:42:59 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.24: +42 -13 lines
Diff to previous 1.166.2.24 (colored) to selected 1.114 (colored)

Resurrect PGO_ZERO support.

When vnode pager encounters hole pages in XIP'ed vnodes, it fills
page slots with PGO_ZERO and returns them back to the caller (fault
handler).  Fault handlers are responsible to check page slots and
redirect PGO_ZERO to the single "zero page" allocated by calling
uvm_page_zeropage_alloc(9).

The zero page is wired, read-only (PG_RDONLY) page.  It's shared
by multiple vnodes, it has no single owner.

XIP'ed vnodes are supposed to be "stable" during I/O (unlocked).
Because XIP'ed mounts are always read-only.  There's no chance to
change mappings of XIP'ed vnodes and their XIP'ed pages.  Thus the
cached uobj is reused after pgo_get() for PGO_ZERO.

(Do we need a new concept of "read-only UVM object"?)

Revision 1.166.2.24 / (download) - annotate - [select for diffs], Fri Nov 19 01:44:47 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.23: +7 -5 lines
Diff to previous 1.166.2.23 (colored) to selected 1.114 (colored)

Make XIP genfs_getpages_xip() return pages in I/O path, preparing
merge into the generic genfs_getpages().

Revision 1.166.2.23 / (download) - annotate - [select for diffs], Thu Nov 4 08:47:38 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.22: +4 -4 lines
Diff to previous 1.166.2.22 (colored) to selected 1.114 (colored)

Split physical device segment pages from "managed" to "managed
device".  Cache that information as a flag PG_DEVICE so that callers
don't need to walk physsegs everytime.

Remove PQ_FIXED, which means that page daemon doesn't need to know
device segment pages at all.  But still fault handlers need to know
them.

I think this is what I can do best now.

Revision 1.166.2.22 / (download) - annotate - [select for diffs], Tue Aug 17 06:48:14 2010 UTC (13 years, 8 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.21: +21 -8 lines
Diff to previous 1.166.2.21 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.166.2.21 / (download) - annotate - [select for diffs], Thu Aug 12 03:41:55 2010 UTC (13 years, 8 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.20: +3 -3 lines
Diff to previous 1.166.2.20 (colored) to selected 1.114 (colored)

Fix a #if/#ifdef miuse.

Revision 1.124.4.3 / (download) - annotate - [select for diffs], Wed Aug 11 22:55:16 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.124.4.2: +21 -8 lines
Diff to previous 1.124.4.2 (colored) to branchpoint 1.124 (colored) next main 1.125 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.166.2.20 / (download) - annotate - [select for diffs], Thu Jul 22 07:49:45 2010 UTC (13 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.19: +4 -4 lines
Diff to previous 1.166.2.19 (colored) to selected 1.114 (colored)

s/PG_XIP/PQ_FIXED/, meaning that the fault handler sees XIP pages as
"fixed", and doesn't pass them to paging activity.

("XIP" is a vnode specific knowledge.  It was wrong that the fault
handler had to know such a special thing.)

Revision 1.166.2.19 / (download) - annotate - [select for diffs], Thu Jul 15 08:33:46 2010 UTC (13 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.18: +8 -11 lines
Diff to previous 1.166.2.18 (colored) to selected 1.114 (colored)

Rename PG_DIRECT to PG_XIP.  PG_XIP is marked to XIP vnode pages.

Revision 1.166.2.18 / (download) - annotate - [select for diffs], Wed Jul 14 06:33:31 2010 UTC (13 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.17: +2 -12 lines
Diff to previous 1.166.2.17 (colored) to selected 1.114 (colored)

One more XIP code reduction.

Revision 1.166.2.17 / (download) - annotate - [select for diffs], Tue Jul 13 01:47:23 2010 UTC (13 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.16: +3 -5 lines
Diff to previous 1.166.2.16 (colored) to selected 1.114 (colored)

Reduce more diffs from the original.

Revision 1.166.2.16 / (download) - annotate - [select for diffs], Mon Jul 12 06:25:14 2010 UTC (13 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.15: +8 -20 lines
Diff to previous 1.166.2.15 (colored) to selected 1.114 (colored)

Reduce more diff by backing out XIP page specific code.  Allow XIP pages
to be loaned.

Revision 1.166.2.15 / (download) - annotate - [select for diffs], Mon Jul 12 02:28:33 2010 UTC (13 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.14: +10 -6 lines
Diff to previous 1.166.2.14 (colored) to selected 1.114 (colored)

Now XIP pages have vm_page, adjust some code and reduce diff to the
original code.

Revision 1.166.2.14 / (download) - annotate - [select for diffs], Fri Jul 9 12:58:00 2010 UTC (13 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.13: +3 -2 lines
Diff to previous 1.166.2.13 (colored) to selected 1.114 (colored)

Whitespace.

Revision 1.166.2.13 / (download) - annotate - [select for diffs], Fri Jul 9 12:49:21 2010 UTC (13 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.12: +19 -25 lines
Diff to previous 1.166.2.12 (colored) to selected 1.114 (colored)

Mark XIP pages as PG_CLEAN and/or PG_BUSY when appropriate.  Protect
vnode lock when vm_page::flags is manipulated.

Revision 1.166.2.12 / (download) - annotate - [select for diffs], Thu Jul 8 06:55:13 2010 UTC (13 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.11: +6 -9 lines
Diff to previous 1.166.2.11 (colored) to selected 1.114 (colored)

Mark XIP pages as PG_RDONLY.

Revision 1.166.2.11 / (download) - annotate - [select for diffs], Thu Jul 8 02:23:28 2010 UTC (13 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.10: +4 -3 lines
Diff to previous 1.166.2.10 (colored) to selected 1.114 (colored)

Whitespace.

Revision 1.166.2.10 / (download) - annotate - [select for diffs], Wed Jul 7 16:35:26 2010 UTC (13 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.9: +2 -3 lines
Diff to previous 1.166.2.9 (colored) to selected 1.114 (colored)

Clean up; merge options DIRECT_PAGE into options XIP.

Revision 1.166.2.9 / (download) - annotate - [select for diffs], Wed Jul 7 14:29:37 2010 UTC (13 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.8: +4 -4 lines
Diff to previous 1.166.2.8 (colored) to selected 1.114 (colored)

To simplify things, revert global vm_page_md hash and allocate struct
vm_page [] for XIP physical segments.

Revision 1.173.2.4 / (download) - annotate - [select for diffs], Sat Jul 3 01:20:06 2010 UTC (13 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.173.2.3: +5 -4 lines
Diff to previous 1.173.2.3 (colored) to branchpoint 1.173 (colored) to selected 1.114 (colored)

sync with head

Revision 1.175 / (download) - annotate - [select for diffs], Tue Jun 22 18:34:50 2010 UTC (13 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.174: +7 -5 lines
Diff to previous 1.174 (colored) to selected 1.114 (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.166.2.8 / (download) - annotate - [select for diffs], Wed Jun 9 15:29:58 2010 UTC (13 years, 10 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.7: +4 -4 lines
Diff to previous 1.166.2.7 (colored) to selected 1.114 (colored)

Fix build with DIAGNOSTIC.

Revision 1.166.2.7 / (download) - annotate - [select for diffs], Mon May 31 13:26:38 2010 UTC (13 years, 10 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.6: +20 -20 lines
Diff to previous 1.166.2.6 (colored) to selected 1.114 (colored)

Re-define the definition of "device page"; device pages are pages of
device memory.  Pages which don't have vm_page (== can't be used for
generic use), but whose PV are tracked, are called "direct pages" from
now.

Revision 1.173.2.3 / (download) - annotate - [select for diffs], Sun May 30 05:18:09 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.173.2.2: +16 -5 lines
Diff to previous 1.173.2.2 (colored) to branchpoint 1.173 (colored) to selected 1.114 (colored)

sync with head

Revision 1.174 / (download) - annotate - [select for diffs], Fri May 28 23:41:14 2010 UTC (13 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.173: +16 -5 lines
Diff to previous 1.173 (colored) to selected 1.114 (colored)

uvm_fault_{upper,lower}_done: move drop-swap outside the page-queues lock.
Assert for object lock being held (or ref count 0) in uao_set_swslot().

Revision 1.173.2.2 / (download) - annotate - [select for diffs], Wed Mar 17 06:03:17 2010 UTC (14 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.173.2.1: +109 -111 lines
Diff to previous 1.173.2.1 (colored) to branchpoint 1.173 (colored) to selected 1.114 (colored)

Reorganise UVM locking to protect P->V state and serialise pmap(9)
operations on the same page(s) by always locking their owner.  Hence
lock order: "vmpage"-lock -> pmap-lock.

Patch, proposed on tech-kern@, from Andrew Doran.

Revision 1.173.2.1 / (download) - annotate - [select for diffs], Tue Mar 16 15:38:17 2010 UTC (14 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.173: +16 -16 lines
Diff to previous 1.173 (colored) to selected 1.114 (colored)

Change struct uvm_object::vmobjlock to be dynamically allocated with
mutex_obj_alloc().  It allows us to share the locks among UVM objects.

Revision 1.124.4.2 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:46 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.124.4.1: +1055 -656 lines
Diff to previous 1.124.4.1 (colored) to branchpoint 1.124 (colored) to selected 1.114 (colored)

sync with head

Revision 1.166.2.6 / (download) - annotate - [select for diffs], Sun Feb 28 06:52:12 2010 UTC (14 years, 1 month ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.5: +19 -9 lines
Diff to previous 1.166.2.5 (colored) to selected 1.114 (colored)

Put comments why device pages skip some code paths.  Don't skip accounting
for "neighbor" device pages.

Revision 1.166.2.5 / (download) - annotate - [select for diffs], Wed Feb 24 16:22:58 2010 UTC (14 years, 1 month ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.4: +363 -300 lines
Diff to previous 1.166.2.4 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.173 / (download) - annotate - [select for diffs], Wed Feb 24 15:58:26 2010 UTC (14 years, 1 month ago) by uebayasi
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1, uebayasi-xip-base
Branch point for: rmind-uvmplock
Changes since 1.172: +294 -187 lines
Diff to previous 1.172 (colored) to selected 1.114 (colored)

Merge more indirect functions.  Some comments.

Revision 1.172 / (download) - annotate - [select for diffs], Wed Feb 24 06:18:19 2010 UTC (14 years, 1 month ago) by uebayasi
Branch: MAIN
Changes since 1.171: +7 -8 lines
Diff to previous 1.171 (colored) to selected 1.114 (colored)

uvm_fault_upper_lookup, uvm_fault_upper_neighbor: There is no point to call
pmap_update() without calling pmap_enter().

(Probably calling only once after loop (as done in uvm_fault_lower_lookup())
is enough.  If done so, other threads see entered neighbor pages as reflected
a little latter.)

Revision 1.171 / (download) - annotate - [select for diffs], Wed Feb 24 05:26:28 2010 UTC (14 years, 1 month ago) by uebayasi
Branch: MAIN
Changes since 1.170: +8 -7 lines
Diff to previous 1.170 (colored) to selected 1.114 (colored)

Minor clean up.

Revision 1.170 / (download) - annotate - [select for diffs], Wed Feb 24 05:00:55 2010 UTC (14 years, 1 month ago) by uebayasi
Branch: MAIN
Changes since 1.169: +0 -5 lines
Diff to previous 1.169 (colored) to selected 1.114 (colored)

Revert a thinko.

Revision 1.169 / (download) - annotate - [select for diffs], Wed Feb 24 04:32:58 2010 UTC (14 years, 1 month ago) by uebayasi
Branch: MAIN
Changes since 1.168: +21 -22 lines
Diff to previous 1.168 (colored) to selected 1.114 (colored)

Slightly clean up uvm_fault() code path after pmap_enter().  Now tasks
needed for page cache are concentrated in own functions (uvm_fault_*_done()).

Revision 1.168 / (download) - annotate - [select for diffs], Wed Feb 24 04:20:45 2010 UTC (14 years, 1 month ago) by uebayasi
Branch: MAIN
Changes since 1.167: +12 -9 lines
Diff to previous 1.167 (colored) to selected 1.114 (colored)

Record if "promote" is done in UVMHIST.  Do it for "upper" fault too.

Revision 1.167 / (download) - annotate - [select for diffs], Wed Feb 24 04:18:09 2010 UTC (14 years, 1 month ago) by uebayasi
Branch: MAIN
Changes since 1.166: +24 -54 lines
Diff to previous 1.166 (colored) to selected 1.114 (colored)

Merge some indirect "lower" fault handlers back.  Prompted by rmind@.

Revision 1.166.2.4 / (download) - annotate - [select for diffs], Tue Feb 23 07:11:46 2010 UTC (14 years, 1 month ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.3: +9 -3 lines
Diff to previous 1.166.2.3 (colored) to selected 1.114 (colored)

uvm_fault_lower_promote: One more missing part for device pages to by-pass
page cache handling.  When a page in a uobj is promoted, its content is copied
to another owned by the newly allocated anon.  The old page cache is then
disposed.  Of course we don't need to dispose device pages in such a case,
so skip it.

Don't forget opt_device_page.h.

Count lower fault correctly.

Revision 1.166.2.3 / (download) - annotate - [select for diffs], Fri Feb 12 16:09:56 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.2: +51 -16 lines
Diff to previous 1.166.2.2 (colored) to selected 1.114 (colored)

Teach device page handling to the "lower" fault handler.  Skip all the paging
activities, no loaning, no wired count.  Only compile tested so far.

Revision 1.166.2.2 / (download) - annotate - [select for diffs], Fri Feb 12 16:06:50 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166.2.1: +2284 -0 lines
Diff to previous 1.166.2.1 (colored) to selected 1.114 (colored)

uvmfault_promote: For promotion from a "lower" page, pass the belonging struct
uvm_object * from callers, because device page struct vm_page * doesn't have
a back-pointer to the uvm_object.

Revision 1.166.2.1, Mon Feb 8 00:02:50 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.166: +0 -2289 lines
FILE REMOVED

file uvm_fault.c was added on branch uebayasi-xip on 2010-02-12 16:06:50 +0000

Revision 1.166 / (download) - annotate - [select for diffs], Mon Feb 8 00:02:50 2010 UTC (14 years, 2 months ago) by mlelstv
Branch: MAIN
Branch point for: uebayasi-xip
Changes since 1.165: +1 -0 lines
Diff to previous 1.165 (colored) to selected 1.114 (colored)

pgo_get needs the page array to be initialized.

Revision 1.165 / (download) - annotate - [select for diffs], Mon Feb 8 00:01:39 2010 UTC (14 years, 2 months ago) by mlelstv
Branch: MAIN
Changes since 1.164: +4 -8 lines
Diff to previous 1.164 (colored) to selected 1.114 (colored)

Move assertion to make check more clear.

Revision 1.164 / (download) - annotate - [select for diffs], Sun Feb 7 23:25:07 2010 UTC (14 years, 2 months ago) by mlelstv
Branch: MAIN
Changes since 1.163: +25 -6 lines
Diff to previous 1.163 (colored) to selected 1.114 (colored)

Make UVMHIST build again.

Revision 1.163 / (download) - annotate - [select for diffs], Fri Feb 5 02:27:15 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.162: +95 -93 lines
Diff to previous 1.162 (colored) to selected 1.114 (colored)

Cosmetic.  Shorten some long names.

Revision 1.162 / (download) - annotate - [select for diffs], Fri Feb 5 00:55:31 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.161: +2 -0 lines
Diff to previous 1.161 (colored) to selected 1.114 (colored)

Fix !DIAGNOSTIC build.  Reported by Geoff Wing.

Revision 1.161 / (download) - annotate - [select for diffs], Thu Feb 4 05:48:26 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.160: +42 -41 lines
Diff to previous 1.160 (colored) to selected 1.114 (colored)

Reduce diff between upper/lower neighbor handlers.

Revision 1.160 / (download) - annotate - [select for diffs], Thu Feb 4 03:32:21 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.159: +106 -161 lines
Diff to previous 1.159 (colored) to selected 1.114 (colored)

Merge "obfuscating layers" for readability.  Inline some functions.
Requested by rmind@.

Revision 1.159 / (download) - annotate - [select for diffs], Thu Feb 4 03:19:08 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.158: +63 -76 lines
Diff to previous 1.158 (colored) to selected 1.114 (colored)

Move uvm_fault_* static func decls in one place.

Revision 1.158 / (download) - annotate - [select for diffs], Wed Feb 3 12:40:39 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.157: +21 -21 lines
Diff to previous 1.157 (colored) to selected 1.114 (colored)

uvm_fault_lower_generic_io: Reduce diff from uvm_loanuobj().

Revision 1.157 / (download) - annotate - [select for diffs], Wed Feb 3 07:48:18 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.156: +1 -0 lines
Diff to previous 1.156 (colored) to selected 1.114 (colored)

uvm_fault_lower_generic_io: One missing mutex_exit(vmobjlock).  Found while
comparing this function with uvm_loanuobj().  (Part of) these should be
merged.

Revision 1.156 / (download) - annotate - [select for diffs], Tue Feb 2 18:49:23 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.155: +27 -29 lines
Diff to previous 1.155 (colored) to selected 1.114 (colored)

uobj->pgops->pgo_get doing PGO_SYNCIO returns a uobjpage whose uobj backpointer
refers to another "uobj" used to call pgo_get.  Revert the wrong assertion
I made.  My bad.

(This and pgo_get's possible ERESTART return value check is the only 2 behavioral
changes I made.)

Reported by drochner@, thanks.

Revision 1.155 / (download) - annotate - [select for diffs], Tue Feb 2 17:40:43 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.154: +4 -1 lines
Diff to previous 1.154 (colored) to selected 1.114 (colored)

Don't pass an unnecessary reference to uvm_loanbreak_anon().

Requested by rmind@.

Revision 1.154 / (download) - annotate - [select for diffs], Tue Feb 2 06:52:59 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.153: +1 -2 lines
Diff to previous 1.153 (colored) to selected 1.114 (colored)

Be consistent to decide if PMAP_WIRED or not.

Revision 1.153 / (download) - annotate - [select for diffs], Tue Feb 2 06:06:02 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.152: +1 -67 lines
Diff to previous 1.152 (colored) to selected 1.114 (colored)

Move A->K loan break code to uvm_loan.c.

Revision 1.152 / (download) - annotate - [select for diffs], Tue Feb 2 05:58:16 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.151: +146 -148 lines
Diff to previous 1.151 (colored) to selected 1.114 (colored)

Indent.

Revision 1.151 / (download) - annotate - [select for diffs], Tue Feb 2 04:35:35 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.150: +111 -31 lines
Diff to previous 1.150 (colored) to selected 1.114 (colored)

uvm_fault: Split "neighbor" fault and loan handling into functions.

Revision 1.150 / (download) - annotate - [select for diffs], Tue Feb 2 01:54:48 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.149: +4 -4 lines
Diff to previous 1.149 (colored) to selected 1.114 (colored)

Sort struct uvm_faultctx members for better alignment.

Revision 1.149 / (download) - annotate - [select for diffs], Mon Feb 1 16:12:36 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.148: +313 -314 lines
Diff to previous 1.148 (colored) to selected 1.114 (colored)

Indent.

Revision 1.148 / (download) - annotate - [select for diffs], Mon Feb 1 16:08:27 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.147: +232 -35 lines
Diff to previous 1.147 (colored) to selected 1.114 (colored)

More split.

Revision 1.147 / (download) - annotate - [select for diffs], Mon Feb 1 11:58:39 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.146: +2 -0 lines
Diff to previous 1.146 (colored) to selected 1.114 (colored)

Fix build without DIAGNOSTIC.

Revision 1.146 / (download) - annotate - [select for diffs], Mon Feb 1 10:22:40 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.145: +19 -15 lines
Diff to previous 1.145 (colored) to selected 1.114 (colored)

uvm_fault: Clarify when to wire what.

Revision 1.145 / (download) - annotate - [select for diffs], Mon Feb 1 09:18:41 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.144: +26 -22 lines
Diff to previous 1.144 (colored) to selected 1.114 (colored)

uvm_fault_upper_lookup: This is totally my personal preference, but can't help
adding one goto to reduce one indent.

Revision 1.144 / (download) - annotate - [select for diffs], Mon Feb 1 09:06:43 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.143: +37 -41 lines
Diff to previous 1.143 (colored) to selected 1.114 (colored)

uvm_fault:
- Lower fault routines don't care the vm_anon array found in upper lookup.
  Don't pass the pointer down.
- The flag "shadowed" is known when we lookup upper layer.  Don't need to
  keep in the fault context struct.

Revision 1.143 / (download) - annotate - [select for diffs], Mon Feb 1 08:23:13 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.142: +40 -50 lines
Diff to previous 1.142 (colored) to selected 1.114 (colored)

Indent.

Revision 1.142 / (download) - annotate - [select for diffs], Mon Feb 1 08:19:17 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.141: +8 -12 lines
Diff to previous 1.141 (colored) to selected 1.114 (colored)

Rewrite uvm_fault() loop using while () than goto.

Revision 1.141 / (download) - annotate - [select for diffs], Mon Feb 1 08:16:32 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.140: +154 -166 lines
Diff to previous 1.140 (colored) to selected 1.114 (colored)

Split uvm_fault() into 2 more functions, uvm_fault_check() and
uvm_fault_upper_lookup().  Omit unnecessary arguments passed around.

Revision 1.140 / (download) - annotate - [select for diffs], Mon Feb 1 06:56:22 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.139: +118 -144 lines
Diff to previous 1.139 (colored) to selected 1.114 (colored)

uvm_fault: Pack variables shared during fault / re-fault into a struct named
uvm_faultctx.  Unfortunately ~all of those values are overriden in various
ways.  Constification doesn't help much...

Revision 1.139 / (download) - annotate - [select for diffs], Mon Feb 1 05:48:19 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.138: +23 -17 lines
Diff to previous 1.138 (colored) to selected 1.114 (colored)

ERESTART is already negative.  Give up negating error values to not override
the original values.  Pointed out by rmind@, thanks.

In the lower fault case, if (*pgo_get)() can return ERESTART and we should
re-fault for that remains a question.  The original code just returned the
error, so keep that behaviour for now.  In case (*pgo_get)() really returns
ERESTART, pass EIO to tell the uvm_fault caller that (*pgo_get)() failed.

(As far as I grep callers don't check if the return value is ERESTART or not.
So assuming (*pgo_get)() never returns ERESTART should be a safe bet.)

Revision 1.138 / (download) - annotate - [select for diffs], Sun Jan 31 17:13:38 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.137: +241 -87 lines
Diff to previous 1.137 (colored) to selected 1.114 (colored)

Ax uvm_fault_internal() & break it into functions.  "Upper" fault and "lower"
fault routines are separated now.

Revision 1.137 / (download) - annotate - [select for diffs], Sun Jan 31 09:20:31 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.136: +57 -13 lines
Diff to previous 1.136 (colored) to selected 1.114 (colored)

uvm_fault_internal:

Move local variables around to isolate contexts.  Note that remaining variables
are global in that function, and some hold state across re-fault.

Slilently clean-up the "eoff" mess.

(Superfluous braces will go once things settle down.)

Revision 1.136 / (download) - annotate - [select for diffs], Sun Jan 31 07:47:29 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.135: +88 -88 lines
Diff to previous 1.135 (colored) to selected 1.114 (colored)

Indent.

Revision 1.135 / (download) - annotate - [select for diffs], Sun Jan 31 07:46:03 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.134: +7 -5 lines
Diff to previous 1.134 (colored) to selected 1.114 (colored)

uvm_fault_internal: In lower fault handling case, put another goto to clarify
that we don't care lower neighboring pages for the zero-fill object.

Revision 1.134 / (download) - annotate - [select for diffs], Sun Jan 31 07:37:24 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.133: +6 -2 lines
Diff to previous 1.133 (colored) to selected 1.114 (colored)

uvm_fault_internal: Skip another long code segment (lower "neighbor" fault)
by a goto.

Revision 1.133 / (download) - annotate - [select for diffs], Sun Jan 31 07:32:35 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.132: +13 -14 lines
Diff to previous 1.132 (colored) to selected 1.114 (colored)

uvm_fault_internal: Put a goto label "Case1" as well as "Case2".  Clarify
that if the faulting page is shadowed, we don't care the lower layer at all.

Revision 1.132 / (download) - annotate - [select for diffs], Sun Jan 31 01:40:12 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.131: +2 -1 lines
Diff to previous 1.131 (colored) to selected 1.114 (colored)

Correct previous; fix a miscalculation of offset-into-entry in MADV_SEQUENTIAL
case.  Pointed out by pooka@.

Revision 1.131 / (download) - annotate - [select for diffs], Sat Jan 30 15:13:25 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.130: +5 -5 lines
Diff to previous 1.130 (colored) to selected 1.114 (colored)

Calculate the offset from vm_map_entry's start to vm_page array's start once.

Revision 1.125.6.1.4.1 / (download) - annotate - [select for diffs], Tue Jan 26 21:26:28 2010 UTC (14 years, 2 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.125.6.1: +8 -6 lines
Diff to previous 1.125.6.1 (colored) to selected 1.114 (colored)

Pass hints to uvm_pagealloc* to get it to use the right page color rather
than guess the right page color.

Revision 1.130 / (download) - annotate - [select for diffs], Sun Jan 24 15:03:02 2010 UTC (14 years, 2 months ago) by uebayasi
Branch: MAIN
Changes since 1.129: +9 -9 lines
Diff to previous 1.129 (colored) to selected 1.114 (colored)

Clean up an internal flag usage.  No functional changes.

Revision 1.129 / (download) - annotate - [select for diffs], Thu Dec 17 01:25:10 2009 UTC (14 years, 4 months ago) by rmind
Branch: MAIN
Changes since 1.128: +2 -3 lines
Diff to previous 1.128 (colored) to selected 1.114 (colored)

Replace few USER_TO_UAREA/UAREA_TO_USER uses, reduce sys/user.h inclusions.

Revision 1.128 / (download) - annotate - [select for diffs], Sat Dec 5 22:34:43 2009 UTC (14 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.127: +4 -4 lines
Diff to previous 1.127 (colored) to selected 1.114 (colored)

Convert tsleep(&lbolt) to kpause().  Make ltsleep/mtsleep on lbolt
illegal.  I examined all places where lbolt is referenced to make
sure there were pointer aliases of it passed to tsleep, but put a
KASSERT in m/ltsleep() just to be sure.

Revision 1.127 / (download) - annotate - [select for diffs], Sun Nov 1 11:16:32 2009 UTC (14 years, 5 months ago) by uebayasi
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.126: +8 -8 lines
Diff to previous 1.126 (colored) to selected 1.114 (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.124.4.1 / (download) - annotate - [select for diffs], Mon May 4 08:14:39 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.124: +5 -6 lines
Diff to previous 1.124 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.125.6.1 / (download) - annotate - [select for diffs], Mon Feb 2 18:31:37 2009 UTC (15 years, 2 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.125: +3 -3 lines
Diff to previous 1.125 (colored) to selected 1.114 (colored)

Pull up following revision(s) (requested by ad in ticket #354):
	sys/uvm/uvm_fault.c: revision 1.126
	sys/uvm/uvm_map.c: revision 1.268
Move a couple of calls to pmap_update().

Revision 1.125.4.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:20:36 2009 UTC (15 years, 3 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.125: +3 -3 lines
Diff to previous 1.125 (colored) next main 1.126 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.123.6.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:43 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.123.6.2: +1 -1 lines
Diff to previous 1.123.6.2 (colored) to branchpoint 1.123 (colored) next main 1.124 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.126 / (download) - annotate - [select for diffs], Sat Dec 20 11:33:38 2008 UTC (15 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, mjf-devfs2-base, jymxensuspend-base, jym-xensuspend-base, jym-xensuspend
Changes since 1.125: +3 -3 lines
Diff to previous 1.125 (colored) to selected 1.114 (colored)

Move a couple of calls to pmap_update().

Revision 1.123.6.2 / (download) - annotate - [select for diffs], Sun Sep 28 10:41:07 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.123.6.1: +2 -3 lines
Diff to previous 1.123.6.1 (colored) to branchpoint 1.123 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.124.6.1 / (download) - annotate - [select for diffs], Thu Sep 18 04:37:06 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.124: +4 -5 lines
Diff to previous 1.124 (colored) next main 1.125 (colored) to selected 1.114 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.124.8.1 / (download) - annotate - [select for diffs], Fri Jul 18 16:37:57 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.124: +4 -5 lines
Diff to previous 1.124 (colored) next main 1.125 (colored) to selected 1.114 (colored)

Sync with head.

Revision 1.125 / (download) - annotate - [select for diffs], Fri Jul 4 10:22:35 2008 UTC (15 years, 9 months ago) by ad
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, netbsd-5-0-RC1, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.124: +4 -5 lines
Diff to previous 1.124 (colored) to selected 1.114 (colored)

Update a comment.

Revision 1.123.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:14 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.123: +6 -6 lines
Diff to previous 1.123 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.124 / (download) - annotate - [select for diffs], Thu Mar 27 19:06:52 2008 UTC (16 years ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-nfs-mp-base2, yamt-nfs-mp-base, wrstuden-revivesa-base-1, wrstuden-revivesa-base, hpcarm-cleanup-nbase
Branch point for: yamt-nfs-mp, wrstuden-revivesa, simonb-wapbl
Changes since 1.123: +6 -6 lines
Diff to previous 1.123 (colored) to selected 1.114 (colored)

Make rusage collection per-LWP and collate in the appropriate places.
cloned threads need a little bit more work but the locking needs to
be fixed first.

Revision 1.120.6.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:13 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.120.6.2: +2 -3 lines
Diff to previous 1.120.6.2 (colored) to branchpoint 1.120 (colored) next main 1.121 (colored) to selected 1.114 (colored)

sync with HEAD

Revision 1.121.4.1 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:32 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.121: +60 -60 lines
Diff to previous 1.121 (colored) next main 1.122 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.95.2.6 / (download) - annotate - [select for diffs], Mon Jan 21 09:48:20 2008 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.95.2.5: +60 -60 lines
Diff to previous 1.95.2.5 (colored) next main 1.96 (colored) to selected 1.114 (colored)

sync with head

Revision 1.121.10.2 / (download) - annotate - [select for diffs], Sat Jan 19 12:15:48 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.121.10.1: +0 -1 lines
Diff to previous 1.121.10.1 (colored) to branchpoint 1.121 (colored) next main 1.122 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.123 / (download) - annotate - [select for diffs], Fri Jan 18 10:48:23 2008 UTC (16 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base, ad-socklock-base1
Branch point for: mjf-devfs2
Changes since 1.122: +2 -3 lines
Diff to previous 1.122 (colored) to selected 1.114 (colored)

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

Revision 1.120.6.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:58:39 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.120.6.1: +60 -59 lines
Diff to previous 1.120.6.1 (colored) to branchpoint 1.120 (colored) to selected 1.114 (colored)

sync with HEAD

Revision 1.121.10.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:58:35 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.121: +60 -59 lines
Diff to previous 1.121 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.122 / (download) - annotate - [select for diffs], Wed Jan 2 11:49:16 2008 UTC (16 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.121: +60 -59 lines
Diff to previous 1.121 (colored) to selected 1.114 (colored)

Merge vmlocking2 to head.

Revision 1.121.6.1 / (download) - annotate - [select for diffs], Tue Dec 4 13:03:58 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking2
Changes since 1.121: +60 -59 lines
Diff to previous 1.121 (colored) next main 1.122 (colored) to selected 1.114 (colored)

Pull the vmlocking changes into a new branch.

Revision 1.120.6.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:35:28 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.120: +2 -3 lines
Diff to previous 1.120 (colored) to selected 1.114 (colored)

sync with HEAD

Revision 1.95.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:36:53 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.95.2.4: +2 -3 lines
Diff to previous 1.95.2.4 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.120.4.1 / (download) - annotate - [select for diffs], Fri Oct 26 15:49:41 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.120: +2 -3 lines
Diff to previous 1.120 (colored) next main 1.121 (colored) to selected 1.114 (colored)

Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.120.8.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:49:24 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.120: +2 -3 lines
Diff to previous 1.120 (colored) next main 1.121 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.121 / (download) - annotate - [select for diffs], Thu Oct 11 19:53:43 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, vmlocking-base, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, jmcneill-base, cube-autoconf-base, cube-autoconf, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: vmlocking2, mjf-devfs, bouyer-xeni386
Changes since 1.120: +2 -3 lines
Diff to previous 1.120 (colored) to selected 1.114 (colored)

Remove LOCK_ASSERT(!simple_lock_held(&foo));

Revision 1.95.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:47:06 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.95.2.3: +19 -19 lines
Diff to previous 1.95.2.3 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.119.12.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:51:21 2007 UTC (16 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.119: +19 -19 lines
Diff to previous 1.119 (colored) next main 1.120 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.120.10.2 / (download) - annotate - [select for diffs], Sat Jul 21 19:21:55 2007 UTC (16 years, 9 months ago) by ad
Branch: matt-mips64
Changes since 1.120.10.1: +1966 -0 lines
Diff to previous 1.120.10.1 (colored) to branchpoint 1.120 (colored) next main 1.121 (colored) to selected 1.114 (colored)

Merge unobtrusive locking changes from the vmlocking branch.

Revision 1.120.10.1, Sat Jul 21 19:21:54 2007 UTC (16 years, 9 months ago) by ad
Branch: matt-mips64
Changes since 1.120: +0 -1966 lines
FILE REMOVED

file uvm_fault.c was added on branch matt-mips64 on 2007-07-21 19:21:55 +0000

Revision 1.120 / (download) - annotate - [select for diffs], Sat Jul 21 19:21:54 2007 UTC (16 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5, matt-mips64-base, hpcarm-cleanup
Branch point for: yamt-x86pmap, matt-mips64, matt-armv6, jmcneill-pm
Changes since 1.119: +19 -19 lines
Diff to previous 1.119 (colored) to selected 1.114 (colored)

Merge unobtrusive locking changes from the vmlocking branch.

Revision 1.119.4.1 / (download) - annotate - [select for diffs], Tue Mar 13 17:51:55 2007 UTC (17 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.119: +77 -77 lines
Diff to previous 1.119 (colored) next main 1.120 (colored) to selected 1.114 (colored)

Pull in the initial set of changes for the vmlocking branch.

Revision 1.117.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:55:26 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.117: +33 -33 lines
Diff to previous 1.117 (colored) next main 1.118 (colored) to selected 1.114 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.95.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:12:28 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.95.2.2: +33 -33 lines
Diff to previous 1.95.2.2 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.119 / (download) - annotate - [select for diffs], Thu Feb 22 06:05:00 2007 UTC (17 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, nick-csl-alignment-base, mjf-ufs-trans-base, mjf-ufs-trans, ad-audiomp-base, ad-audiomp
Branch point for: vmlocking, nick-csl-alignment
Changes since 1.118: +29 -29 lines
Diff to previous 1.118 (colored) to selected 1.114 (colored)

TRUE -> true, FALSE -> false

Revision 1.118 / (download) - annotate - [select for diffs], Wed Feb 21 23:00:12 2007 UTC (17 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.117: +6 -6 lines
Diff to previous 1.117 (colored) to selected 1.114 (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.111.8.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:25 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.111.8.1: +5 -6 lines
Diff to previous 1.111.8.1 (colored) to branchpoint 1.111 (colored) next main 1.112 (colored) to selected 1.114 (colored)

Sync with head.

Revision 1.95.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:51:05 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.95.2.1: +12 -11 lines
Diff to previous 1.95.2.1 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.112.2.3 / (download) - annotate - [select for diffs], Mon Dec 18 11:42:27 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.112.2.2: +3 -3 lines
Diff to previous 1.112.2.2 (colored) to branchpoint 1.112 (colored) next main 1.113 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.117 / (download) - annotate - [select for diffs], Fri Dec 15 13:51:30 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-idlelwp
Changes since 1.116: +3 -3 lines
Diff to previous 1.116 (colored) to selected 1.114 (colored)

put ->K loaned pages on the page queue, so that page loaning doesn't
disturb pagedaemon/pdpolicy.

Revision 1.112.2.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:33 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.112.2.1: +4 -5 lines
Diff to previous 1.112.2.1 (colored) to branchpoint 1.112 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.116 / (download) - annotate - [select for diffs], Fri Dec 1 19:15:22 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.115: +3 -3 lines
Diff to previous 1.115 (colored) to selected 1.114 (colored)

uvm_fault: fix an assertion.  PR/35134 from Christos Zoulas.
it can be triggered by minherit as well.

Revision 1.115 / (download) - annotate - [select for diffs], Tue Nov 28 13:16:37 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.114: +3 -4 lines
Diff to previous 1.114 (colored)

uvm_fault: unwrap a short line.

Revision 1.111.8.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:49 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.111: +9 -7 lines
Diff to previous 1.111 (colored) to selected 1.114 (colored)

Sync with head.

Revision 1.112.2.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:52 2006 UTC (17 years, 6 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.112: +3 -3 lines
Diff to previous 1.112 (colored) to selected 1.114 (colored)

sync with head

Revision 1.114 / (download) - annotate - [selected], Thu Oct 12 10:14:20 2006 UTC (17 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.113: +2 -3 lines
Diff to previous 1.113 (colored)

move some knowledge about vnode into uvm_vnode.c.

Revision 1.113 / (download) - annotate - [select for diffs], Tue Oct 3 18:26:03 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.112: +3 -2 lines
Diff to previous 1.112 (colored) to selected 1.114 (colored)

Coverity CID 3170,3171: Add KASSERT.

Revision 1.112 / (download) - annotate - [select for diffs], Fri Sep 15 15:51:13 2006 UTC (17 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base
Branch point for: yamt-splraiseipl
Changes since 1.111: +8 -6 lines
Diff to previous 1.111 (colored) to selected 1.114 (colored)

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

Revision 1.107.2.1 / (download) - annotate - [select for diffs], Sat Sep 9 03:00:13 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.107: +54 -15 lines
Diff to previous 1.107 (colored) next main 1.108 (colored) to selected 1.114 (colored)

sync with head

Revision 1.95.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:12:39 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.95: +257 -116 lines
Diff to previous 1.95 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.110.2.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:48 2006 UTC (17 years, 11 months ago) by tron
Branch: peter-altq
Changes since 1.110: +37 -3 lines
Diff to previous 1.110 (colored) next main 1.111 (colored) to selected 1.114 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.107.4.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:28 2006 UTC (18 years ago) by simonb
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.107: +54 -15 lines
Diff to previous 1.107 (colored) next main 1.108 (colored) to selected 1.114 (colored)

Sync with head.

Revision 1.109.4.1 / (download) - annotate - [select for diffs], Wed Apr 19 03:58:21 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.109: +52 -13 lines
Diff to previous 1.109 (colored) next main 1.110 (colored) to selected 1.114 (colored)

oops - *really* sync to head this time.

Revision 1.109.2.3 / (download) - annotate - [select for diffs], Tue Apr 11 11:55:59 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.109.2.2: +37 -3 lines
Diff to previous 1.109.2.2 (colored) to branchpoint 1.109 (colored) next main 1.110 (colored) to selected 1.114 (colored)

sync with head

Revision 1.111 / (download) - annotate - [select for diffs], Tue Apr 11 09:28:14 2006 UTC (18 years ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, simonb-timecounters-base, rpaulo-netinet-merge-pcb-base, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: newlock2
Changes since 1.110: +37 -3 lines
Diff to previous 1.110 (colored) to selected 1.114 (colored)

add assertions.

Revision 1.109.2.2 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:57 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.109.2.1: +17 -12 lines
Diff to previous 1.109.2.1 (colored) to branchpoint 1.109 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.110 / (download) - annotate - [select for diffs], Wed Mar 15 18:09:25 2006 UTC (18 years, 1 month ago) by drochner
Branch: MAIN
CVS Tags: yamt-pdpolicy-base3, peter-altq-base
Branch point for: peter-altq
Changes since 1.109: +17 -12 lines
Diff to previous 1.109 (colored) to selected 1.114 (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.109.2.1 / (download) - annotate - [select for diffs], Sun Mar 5 12:51:09 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.109: +8 -6 lines
Diff to previous 1.109 (colored) to selected 1.114 (colored)

separate page replacement policy from the rest of kernel.

Revision 1.103.2.3 / (download) - annotate - [select for diffs], Wed Mar 1 09:28:51 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.103.2.2: +3 -3 lines
Diff to previous 1.103.2.2 (colored) next main 1.104 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.109 / (download) - annotate - [select for diffs], Wed Feb 22 22:28:18 2006 UTC (18 years, 2 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base2, yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, elad-kernelauth
Changes since 1.108: +3 -3 lines
Diff to previous 1.108 (colored) to selected 1.114 (colored)

kill the "fault_type" argument to pager's pgo_fault() methods
it is never used
(and using it would comprise an abstraction violation imho)

Revision 1.103.2.2 / (download) - annotate - [select for diffs], Sat Feb 18 15:39:31 2006 UTC (18 years, 2 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.103.2.1: +3 -3 lines
Diff to previous 1.103.2.1 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.108 / (download) - annotate - [select for diffs], Wed Feb 15 14:06:45 2006 UTC (18 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.107: +1 -1 lines
Diff to previous 1.107 (colored) to selected 1.114 (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.103.2.1 / (download) - annotate - [select for diffs], Wed Feb 1 14:52:48 2006 UTC (18 years, 2 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.103: +187 -100 lines
Diff to previous 1.103 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.107 / (download) - annotate - [select for diffs], Tue Jan 31 14:11:25 2006 UTC (18 years, 2 months ago) by yamt
Branch: MAIN
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.106: +3 -1 lines
Diff to previous 1.106 (colored) to selected 1.114 (colored)

handle "strange" filesystems like layered filesystems and tmpfs,
where pgo_get returns pages which don't belong to the uobj.
also fix an XXX in uvm_loananon and lock-unlock mismatch in uvm_loanuobj.

PR/28372, PR/32665 (Alan Barrett).

Revision 1.106 / (download) - annotate - [select for diffs], Tue Jan 31 14:05:47 2006 UTC (18 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.105: +183 -98 lines
Diff to previous 1.105 (colored) to selected 1.114 (colored)

re-apply uvm_fault.c 1.104.  fixes will follow.

Revision 1.105 / (download) - annotate - [select for diffs], Mon Jan 30 11:50:17 2006 UTC (18 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.104: +98 -183 lines
Diff to previous 1.104 (colored) to selected 1.114 (colored)

revert uvm_fault.c 1.104 for now.  see PR/28372, PR/32665.

Revision 1.104 / (download) - annotate - [select for diffs], Sat Jan 21 13:13:07 2006 UTC (18 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.103: +185 -100 lines
Diff to previous 1.103 (colored) to selected 1.114 (colored)

- uvm_fault: move a common code of 1B and 2B to a new function.
  don't attempt to allocate anons with kernel_map locked.  PR/32543.
- amap_copy: add an assertion.

Revision 1.103 / (download) - annotate - [select for diffs], Sat Dec 24 20:45:10 2005 UTC (18 years, 3 months ago) by perry
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.102: +3 -3 lines
Diff to previous 1.102 (colored) to selected 1.114 (colored)

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

Revision 1.102 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:29 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.101: +2 -2 lines
Diff to previous 1.101 (colored) to selected 1.114 (colored)

merge ktrace-lwp.

Revision 1.82.2.7 / (download) - annotate - [select for diffs], Thu Nov 10 14:12:39 2005 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.6: +56 -56 lines
Diff to previous 1.82.2.6 (colored) next main 1.83 (colored) to selected 1.114 (colored)

Sync with HEAD. Here we go again...

Revision 1.101 / (download) - annotate - [select for diffs], Tue Sep 13 22:00:05 2005 UTC (18 years, 7 months ago) by yamt
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
Changes since 1.100: +10 -2 lines
Diff to previous 1.100 (colored) to selected 1.114 (colored)

wrap swap related code by #ifdef VMSWAP.  always #define VMSWAP for now.

Revision 1.91.2.1 / (download) - annotate - [select for diffs], Wed Aug 24 18:43:38 2005 UTC (18 years, 7 months ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.91: +11 -4 lines
Diff to previous 1.91 (colored) next main 1.92 (colored) to selected 1.114 (colored)

Pull up following revision(s) (requested by yamt in ticket #688):
	sys/miscfs/genfs/genfs_vnops.c: revision 1.98 via patch
	sys/ufs/ffs/ffs_vfsops.c: revision 1.165
	sys/ufs/lfs/lfs_extern.h: revision 1.69
	sys/fs/filecorefs/filecore_vfsops.c: revision 1.20
	sys/nfs/nfs_node.c: revision 1.80
	sys/fs/smbfs/smbfs_node.c: revision 1.24
	sys/fs/cd9660/cd9660_vfsops.c: revision 1.24
	sys/fs/msdosfs/msdosfs_denode.c: revision 1.8
	sys/miscfs/genfs/genfs_node.h: revision 1.6
	sys/ufs/lfs/lfs_vfsops.c: revision 1.183
	sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.86
	sys/fs/adosfs/advfsops.c: revision 1.23
	sys/fs/ntfs/ntfs_vfsops.c: revision 1.31
- constify genfs_ops.
- use member designators.

        sys/miscfs/genfs/genfs_vnops.c: revision 1.99 via patch
genfs_getpages: don't forget to put the vnode onto the syncer's work que
ue
even in the case of PGO_LOCKED.

        sys/uvm/uvm_bio.c: revision 1.40
        sys/uvm/uvm_pager.h: revision 1.29
        sys/miscfs/genfs/genfs_vnops.c: revision 1.100 via patch
        sys/ufs/ufs/ufs_inode.c: revision 1.50
- introduce PGO_NOBLOCKALLOC and use it for ubc mapping
  to prevent unnecessary block allocations in the case that
  page size > block size.
- ufs_balloc_range: use VM_PROT_WRITE+PGO_NOBLOCKALLOC rather than
  VM_PROT_READ.

        sys/uvm/uvm_fault.c: revision 1.96
        sys/miscfs/genfs/genfs_vnops.c: revision 1.101 via patch
        sys/uvm/uvm_object.h: revision 1.19
        sys/miscfs/genfs/genfs_node.h: revision 1.7
ensure that vnodes with dirty pages are always on syncer's queue.
- genfs_putpages: wait for i/o completion of PG_RELEASED/PG_PAGEOUT pages by
  setting "wasclean" false when encountering them.
  suggested by Stephan Uphoff in PR/24596 (1).
- genfs_putpages: write protect pages when cleaning out, if
  we're going to take the vnode off the syncer's queue.
  uvm_fault: don't write-map pages unless its vnode is already on
  the syncer's queue.
  fix PR/24596 (3) but in the different way from the suggested fix.
  (to keep our current behaviour, ie. not to require explicit msync.
  discussed on tech-kern@.)
- genfs_putpages: don't mistakenly take a vnode off the queue
  by introducing a generation number in genfs_node.
  genfs_getpages: increment the generation number.
  suggested by Stephan Uphoff in PR/24596 (2).
- add some assertions.

        sys/miscfs/genfs/genfs_vnops.c: revision 1.102 via patch
genfs_putpages: don't bother to clean the vnode unless VONWORKLST.

        sys/ufs/ffs/ffs_vnops.c: revision 1.71
ffs_full_fsync: because VBLK/VCHR can be mmap'ed,
do VOP_PUTPAGES for them as well.

        sys/uvm/uvm_fault.c: revision 1.97
uvm_fault: check a correct object in the case of layered filesystems.
fix PR/30811 from Jukka Salmi.

        sys/uvm/uvm_object.h: revision 1.20
        sys/ufs/ffs/ffs_vfsops.c: revision 1.167
        sys/uvm/uvm_bio.c: revision 1.41
        sys/ufs/ufs/ufs_vnops.c: revision 1.129
        sys/uvm/uvm_mmap.c: revision 1.92
        sys/uvm/uvm_fault.c: revision 1.98
        sys/kern/vfs_subr.c: revision 1.252
        sys/fs/msdosfs/denode.h: revision 1.5
        sys/miscfs/genfs/genfs_vnops.c: revision 1.103 via patch
        sys/fs/msdosfs/msdosfs_denode.c: revision 1.9
        sys/sys/vnode.h: revision 1.141
        sys/ufs/ufs/ufs_inode.c: revision 1.51
        sys/ufs/ufs/ufs_extern.h: revision 1.45 via patch
        sys/miscfs/genfs/genfs_node.h: revision 1.8
        sys/ufs/lfs/lfs_vfsops.c: revision 1.184
        sys/uvm/uvm_pager.h: revision 1.30
        sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.87
update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.

        sys/miscfs/genfs/genfs_vnops.c: revision 1.104 via patch
don't write-protect wired pages.  pointed by Chuck Silvers.
for now, leave a vnode on the syncer's queue, as suggested by him.

        sys/ufs/ffs/ffs_vnops.c: revision 1.72
revert VCHR part of ffs_vnops.c 1.71.
as VCHR uses the device pager, no point to call VOP_PUTPAGES here.
pointed by Chuck Silvers.

Revision 1.100 / (download) - annotate - [select for diffs], Sun Jul 31 04:04:47 2005 UTC (18 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.99: +2 -10 lines
Diff to previous 1.99 (colored) to selected 1.114 (colored)

revert "defflag VMSWAP" changes for now.
there seems to be far more people who don't want to edit
their kernel config files than i thought.

Revision 1.99 / (download) - annotate - [select for diffs], Sat Jul 30 06:33:36 2005 UTC (18 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.98: +10 -2 lines
Diff to previous 1.98 (colored) to selected 1.114 (colored)

defflag VMSWAP.

Revision 1.98 / (download) - annotate - [select for diffs], Sat Jul 23 12:18:41 2005 UTC (18 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.97: +4 -4 lines
Diff to previous 1.97 (colored) to selected 1.114 (colored)

update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.

Revision 1.97 / (download) - annotate - [select for diffs], Fri Jul 22 14:57:39 2005 UTC (18 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.96: +6 -6 lines
Diff to previous 1.96 (colored) to selected 1.114 (colored)

uvm_fault: check a correct object in the case of layered filesystems.
fix PR/30811 from Jukka Salmi.

Revision 1.96 / (download) - annotate - [select for diffs], Sun Jul 17 12:27:47 2005 UTC (18 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.95: +11 -4 lines
Diff to previous 1.95 (colored) to selected 1.114 (colored)

ensure that vnodes with dirty pages are always on syncer's queue.

- genfs_putpages: wait for i/o completion of PG_RELEASED/PG_PAGEOUT pages by
  setting "wasclean" false when encountering them.
  suggested by Stephan Uphoff in PR/24596 (1).

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

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

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

- add some assertions.

Revision 1.95 / (download) - annotate - [select for diffs], Mon Jun 27 02:19:48 2005 UTC (18 years, 9 months ago) by thorpej
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.94: +13 -31 lines
Diff to previous 1.94 (colored) to selected 1.114 (colored)

Use ANSI function decls.

Revision 1.87.2.1.2.1 / (download) - annotate - [select for diffs], Wed May 11 19:15:41 2005 UTC (18 years, 11 months ago) by riz
Branch: netbsd-2
CVS Tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1
Changes since 1.87.2.1: +5 -6 lines
Diff to previous 1.87.2.1 (colored) next main 1.88 (colored) to selected 1.114 (colored)

Pull up revision 1.90 (requested by dbj in ticket #1409):
uvm_fault: fix integer overflow so that MADV_SEQUENTIAL
can work on large files.

Revision 1.94 / (download) - annotate - [select for diffs], Wed May 11 13:02:25 2005 UTC (18 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.93: +23 -23 lines
Diff to previous 1.93 (colored) to selected 1.114 (colored)

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

Revision 1.89.2.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:40 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.89: +14 -12 lines
Diff to previous 1.89 (colored) next main 1.90 (colored) to selected 1.114 (colored)

sync with -current

Revision 1.93 / (download) - annotate - [select for diffs], Wed Apr 27 15:19:17 2005 UTC (18 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.92: +3 -0 lines
Diff to previous 1.92 (colored) to selected 1.114 (colored)

uvmfault_anonget: check uvm_reclaimable() where appropriate.

Revision 1.92 / (download) - annotate - [select for diffs], Tue Apr 12 13:11:45 2005 UTC (19 years ago) by yamt
Branch: MAIN
Changes since 1.91: +6 -6 lines
Diff to previous 1.91 (colored) to selected 1.114 (colored)

fix unreasonably frequent "killed: out of swap" on systems which have
little or no swap.
- even on a severe swap shortage, if we have some amount of file-backed pages,
  don't bother to kill processes.
- if all pages in queue will be likely reactivated, just give up
  page type balancing rather than spinning unnecessarily.

Revision 1.89.4.2 / (download) - annotate - [select for diffs], Sat Mar 19 08:37:07 2005 UTC (19 years, 1 month ago) by yamt
Branch: yamt-km
Changes since 1.89.4.1: +4 -4 lines
Diff to previous 1.89.4.1 (colored) to branchpoint 1.89 (colored) next main 1.90 (colored) to selected 1.114 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.82.2.6 / (download) - annotate - [select for diffs], Fri Mar 4 16:55:00 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.5: +4 -4 lines
Diff to previous 1.82.2.5 (colored) to selected 1.114 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.91 / (download) - annotate - [select for diffs], Mon Feb 28 15:33:04 2005 UTC (19 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.90: +4 -4 lines
Diff to previous 1.90 (colored) to selected 1.114 (colored)

use TRUE and FALSE instead of 1 and 0 for boolean_t.

Revision 1.89.4.1 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:56 2005 UTC (19 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.89: +5 -6 lines
Diff to previous 1.89 (colored) to selected 1.114 (colored)

sync with head.

Revision 1.82.2.5 / (download) - annotate - [select for diffs], Wed Feb 9 08:26:14 2005 UTC (19 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.4: +5 -6 lines
Diff to previous 1.82.2.4 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.90 / (download) - annotate - [select for diffs], Mon Feb 7 11:57:38 2005 UTC (19 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-km-base2
Changes since 1.89: +5 -6 lines
Diff to previous 1.89 (colored) to selected 1.114 (colored)

uvm_fault: fix integer overflow so that MADV_SEQUENTIAL
can work on large files.

Revision 1.82.2.4 / (download) - annotate - [select for diffs], Mon Jan 17 19:33:11 2005 UTC (19 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.3: +3 -4 lines
Diff to previous 1.82.2.3 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.89 / (download) - annotate - [select for diffs], Sat Jan 1 09:14:49 2005 UTC (19 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge
Branch point for: yamt-km, kent-audio2
Changes since 1.88: +3 -4 lines
Diff to previous 1.88 (colored) to selected 1.114 (colored)

uvm_fault: pass NULL pap to pmap_extract where we don't need paddr.

Revision 1.82.2.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:39:25 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.2: +2 -2 lines
Diff to previous 1.82.2.2 (colored) to selected 1.114 (colored)

Fix the sync with head I botched.

Revision 1.82.2.2 / (download) - annotate - [select for diffs], Sat Sep 18 14:57:11 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.1: +0 -0 lines
Diff to previous 1.82.2.1 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.82.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:57:05 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82: +54 -25 lines
Diff to previous 1.82 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.87.2.1 / (download) - annotate - [select for diffs], Mon May 10 14:27:00 2004 UTC (19 years, 11 months ago) by tron
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2
Changes since 1.87: +29 -4 lines
Diff to previous 1.87 (colored) next main 1.88 (colored) to selected 1.114 (colored)

Pull up revision 1.88 (requested by yamt in ticket #271):
fix a amap_wirerange deadlock problem by re-introducing
PG_RELEASED for anon pages.  PR/23171 from Christian Limpach.
for details, see discussion filed in the PR database.
uvm_anon_release: a new function to free anon-owned PG_RELEASED page.
uvm_anfree: we can't wait for the page here because the caller might hold
	amap lock.  instead, just mark the page as PG_RELEASED.
	who unbusy the page should check the PG_RELEASED.
uvm_aio_aiodone: uvm_anon_release() instead of uvm_page_unbusy()
	if appropriate.
uvmfault_anonget: check PG_RELEASED.

Revision 1.88 / (download) - annotate - [select for diffs], Wed May 5 11:54:32 2004 UTC (19 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.87: +29 -4 lines
Diff to previous 1.87 (colored) to selected 1.114 (colored)

fix a amap_wirerange deadlock problem by re-introducing
PG_RELEASED for anon pages.  PR/23171 from Christian Limpach.
for details, see discussion filed in the PR database.

uvm_anon_release: a new function to free anon-owned PG_RELEASED page.
uvm_anfree: we can't wait for the page here because the caller might hold
	amap lock.  instead, just mark the page as PG_RELEASED.
	who unbusy the page should check the PG_RELEASED.
uvm_aio_aiodone: uvm_anon_release() instead of uvm_page_unbusy()
	if appropriate.
uvmfault_anonget: check PG_RELEASED.

Revision 1.87 / (download) - annotate - [select for diffs], Wed Mar 24 07:55:01 2004 UTC (20 years, 1 month ago) by junyoung
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.86: +4 -4 lines
Diff to previous 1.86 (colored) to selected 1.114 (colored)

Nuke __P().

Revision 1.86 / (download) - annotate - [select for diffs], Tue Mar 2 11:43:44 2004 UTC (20 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.85: +18 -11 lines
Diff to previous 1.85 (colored) to selected 1.114 (colored)

uvm_fault: check loan_count of neighborhood object page properly.

PR/24595 from Stephan Uphoff.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Feb 10 00:40:06 2004 UTC (20 years, 2 months ago) by dbj
Branch: MAIN
Changes since 1.84: +3 -3 lines
Diff to previous 1.84 (colored) to selected 1.114 (colored)

s/fauling/faulting/

Revision 1.84 / (download) - annotate - [select for diffs], Mon Aug 11 16:45:43 2003 UTC (20 years, 8 months ago) by pk
Branch: MAIN
Changes since 1.83: +4 -3 lines
Diff to previous 1.83 (colored) to selected 1.114 (colored)

Make sure to call uvm_swap_free() and uvm_swap_markbad() with valid (i.e.
positive) slot numbers.

Revision 1.83 / (download) - annotate - [select for diffs], Mon Aug 11 16:33:31 2003 UTC (20 years, 8 months ago) by pk
Branch: MAIN
Changes since 1.82: +6 -10 lines
Diff to previous 1.82 (colored) to selected 1.114 (colored)

Introduce uvm_swapisfull(), which computes the available swap space by
taking into account swap devices that are in the process of being removed.

Revision 1.82 / (download) - annotate - [select for diffs], Sat May 3 17:57:50 2003 UTC (20 years, 11 months ago) by yamt
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.81: +4 -52 lines
Diff to previous 1.81 (colored) to selected 1.114 (colored)

use uvm_loanbreak in uvm_fault.

Revision 1.81 / (download) - annotate - [select for diffs], Sun Feb 9 22:32:21 2003 UTC (21 years, 2 months ago) by pk
Branch: MAIN
Changes since 1.80: +4 -2 lines
Diff to previous 1.80 (colored) to selected 1.114 (colored)

uvm_fault: case 1B: lock page queue before calling uvm_pageactivate().

Revision 1.80 / (download) - annotate - [select for diffs], Sat Jan 18 09:42:59 2003 UTC (21 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.79: +6 -6 lines
Diff to previous 1.79 (colored) to selected 1.114 (colored)

Merge the nathanw_sa branch.

Revision 1.76.4.3 / (download) - annotate - [select for diffs], Tue Dec 10 07:14:41 2002 UTC (21 years, 4 months ago) by jmc
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.76.4.2: +4 -3 lines
Diff to previous 1.76.4.2 (colored) to branchpoint 1.76 (colored) next main 1.77 (colored) to selected 1.114 (colored)

Pull up revisions 1.78-1.79 (requested by thorpej in ticket #952)
 change uoff to voff_t from vaddr_t as it's offset within uvm object.
 fix PR/18855.

Revision 1.76.4.2 / (download) - annotate - [select for diffs], Sat Nov 30 14:09:06 2002 UTC (21 years, 4 months ago) by he
Branch: netbsd-1-6
Changes since 1.76.4.1: +23 -5 lines
Diff to previous 1.76.4.1 (colored) to branchpoint 1.76 (colored) to selected 1.114 (colored)

Pull up revision 1.78 (requested by thorpej in ticket #759):
  When breaking a loan due to a page fault, check to see if
  the other kind of reference-holder (anon or object) is
  referencing the page.  If not, the page must be removed
  from the paging queue.

Revision 1.76.4.1 / (download) - annotate - [select for diffs], Sat Nov 30 14:07:13 2002 UTC (21 years, 4 months ago) by he
Branch: netbsd-1-6
Changes since 1.76: +3 -2 lines
Diff to previous 1.76 (colored) to selected 1.114 (colored)

Pull up revision 1.77 (requested by chs in ticket #770):
  Be sure that the page we allocate to break a loan is put
  on a paging queue.  Fixes PR#18037.

Revision 1.56.2.13 / (download) - annotate - [select for diffs], Wed Oct 30 19:13:31 2002 UTC (21 years, 5 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.56.2.12: +4 -3 lines
Diff to previous 1.56.2.12 (colored) next main 1.57 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.79 / (download) - annotate - [select for diffs], Wed Oct 30 05:24:33 2002 UTC (21 years, 5 months ago) by yamt
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.78: +4 -3 lines
Diff to previous 1.78 (colored) to selected 1.114 (colored)

change "uoff" to voff_t from vaddr_t as it's offset within uvm object.

fix PR/18855.

Revision 1.56.2.12 / (download) - annotate - [select for diffs], Tue Sep 17 21:24:06 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.56.2.11: +24 -5 lines
Diff to previous 1.56.2.11 (colored) to selected 1.114 (colored)

Catch up to -current.

Revision 1.67.2.5 / (download) - annotate - [select for diffs], Fri Sep 6 08:50:22 2002 UTC (21 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.67.2.4: +24 -5 lines
Diff to previous 1.67.2.4 (colored) to branchpoint 1.67 (colored) next main 1.68 (colored) to selected 1.114 (colored)

sync kqueue branch with HEAD

Revision 1.78 / (download) - annotate - [select for diffs], Mon Sep 2 21:09:50 2002 UTC (21 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge
Changes since 1.77: +23 -5 lines
Diff to previous 1.77 (colored) to selected 1.114 (colored)

When breaking an loan due to a page fault, check to see if the other
kind of reference-holder (anon or object) is referencing the page.  If
not, then the page must be removed from the pageq's.

Reviewed by Chuck Silvers.

Revision 1.76.2.1 / (download) - annotate - [select for diffs], Sat Aug 31 16:38:27 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.76: +3 -2 lines
Diff to previous 1.76 (colored) next main 1.77 (colored) to selected 1.114 (colored)

catch up with -current.

Revision 1.77 / (download) - annotate - [select for diffs], Thu Aug 29 05:03:30 2002 UTC (21 years, 7 months ago) by chs
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.76: +3 -2 lines
Diff to previous 1.76 (colored) to selected 1.114 (colored)

be sure that the page we allocate to break a loan is put on a paging queue.
fixes PR 18037.

Revision 1.56.2.11 / (download) - annotate - [select for diffs], Fri Jul 12 01:40:42 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.56.2.10: +2 -3 lines
Diff to previous 1.56.2.10 (colored) to selected 1.114 (colored)

No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.56.2.10 / (download) - annotate - [select for diffs], Mon Jun 24 22:12:49 2002 UTC (21 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.56.2.9: +6 -6 lines
Diff to previous 1.56.2.9 (colored) to selected 1.114 (colored)

Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).

Revision 1.67.2.4 / (download) - annotate - [select for diffs], Sun Jun 23 17:52:16 2002 UTC (21 years, 10 months ago) by jdolecek
Branch: kqueue
Changes since 1.67.2.3: +5 -4 lines
Diff to previous 1.67.2.3 (colored) to branchpoint 1.67 (colored) to selected 1.114 (colored)

catch up with -current on kqueue branch

Revision 1.56.2.9 / (download) - annotate - [select for diffs], Mon Apr 1 07:49:21 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.56.2.8: +7 -5 lines
Diff to previous 1.56.2.8 (colored) to selected 1.114 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.76 / (download) - annotate - [select for diffs], Mon Mar 25 01:56:48 2002 UTC (22 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.75: +5 -4 lines
Diff to previous 1.75 (colored) to selected 1.114 (colored)

when processing PG_RDONLY, mask off VM_PROT_WRITE instead of hard-wiring
VM_PROT_READ (since we might have VM_PROT_EXEC too).  this fixes problems
running binaries out of NFS on macppc.  yet another fix courtesy of enami.

Revision 1.67.2.3 / (download) - annotate - [select for diffs], Sat Mar 16 16:02:28 2002 UTC (22 years, 1 month ago) by jdolecek
Branch: kqueue
Changes since 1.67.2.2: +4 -3 lines
Diff to previous 1.67.2.2 (colored) to branchpoint 1.67 (colored) to selected 1.114 (colored)

Catch up with -current.

Revision 1.75 / (download) - annotate - [select for diffs], Sat Mar 9 04:29:03 2002 UTC (22 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: newlock-base, newlock, eeh-devprop-base, eeh-devprop
Changes since 1.74: +4 -3 lines
Diff to previous 1.74 (colored) to selected 1.114 (colored)

a vm_prot_t is a bit-mask, fix an assertion which was treating one
more like an enumerated type.

Revision 1.67.2.2 / (download) - annotate - [select for diffs], Thu Jan 10 20:05:33 2002 UTC (22 years, 3 months ago) by thorpej
Branch: kqueue
Changes since 1.67.2.1: +99 -158 lines
Diff to previous 1.67.2.1 (colored) to branchpoint 1.67 (colored) to selected 1.114 (colored)

Sync kqueue branch with -current.

Revision 1.56.2.8 / (download) - annotate - [select for diffs], Tue Jan 8 00:35:00 2002 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.56.2.7: +33 -25 lines
Diff to previous 1.56.2.7 (colored) to selected 1.114 (colored)

Catch up to -current.

Revision 1.74 / (download) - annotate - [select for diffs], Wed Jan 2 01:10:36 2002 UTC (22 years, 3 months ago) by chs
Branch: MAIN
CVS Tags: ifpoll-base
Changes since 1.73: +7 -7 lines
Diff to previous 1.73 (colored) to selected 1.114 (colored)

in uvm_fault_unwire_locked(), if we find that a pmap entry is missing,
just skip that page.  this situation can arise legitimately when a file
with a wired mapping is truncated so that a wired page is no longer
part of the file.

Revision 1.73 / (download) - annotate - [select for diffs], Tue Jan 1 22:18:39 2002 UTC (22 years, 3 months ago) by chs
Branch: MAIN
Changes since 1.72: +13 -11 lines
Diff to previous 1.72 (colored) to selected 1.114 (colored)

redo part of the last commit.

Revision 1.72 / (download) - annotate - [select for diffs], Mon Dec 31 22:34:39 2001 UTC (22 years, 3 months ago) by chs
Branch: MAIN
Changes since 1.71: +18 -12 lines
Diff to previous 1.71 (colored) to selected 1.114 (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.56.2.7 / (download) - annotate - [select for diffs], Wed Nov 14 19:19:04 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.56.2.6: +6 -3 lines
Diff to previous 1.56.2.6 (colored) to selected 1.114 (colored)

Catch up to -current.

Revision 1.70.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:19:53 2001 UTC (22 years, 5 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.70: +6 -3 lines
Diff to previous 1.70 (colored) next main 1.71 (colored) to selected 1.114 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.71 / (download) - annotate - [select for diffs], Sat Nov 10 07:36:59 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.70: +6 -3 lines
Diff to previous 1.70 (colored) to selected 1.114 (colored)

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

Revision 1.67.4.2 / (download) - annotate - [select for diffs], Thu Oct 11 00:02:36 2001 UTC (22 years, 6 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.67.4.1: +2 -2 lines
Diff to previous 1.67.4.1 (colored) to branchpoint 1.67 (colored) next main 1.68 (colored) to selected 1.114 (colored)

Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.

Revision 1.56.2.6 / (download) - annotate - [select for diffs], Mon Oct 8 20:11:55 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.56.2.5: +2 -2 lines
Diff to previous 1.56.2.5 (colored) to selected 1.114 (colored)

Catch up to -current.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Oct 3 05:17:58 2001 UTC (22 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3
Branch point for: thorpej-mips-cache
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored) to selected 1.114 (colored)

skip the MADV_SEQUENTIAL processing if we refault.  fixes PR 14060.

Revision 1.67.4.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:48:39 2001 UTC (22 years, 6 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.67: +66 -136 lines
Diff to previous 1.67 (colored) to selected 1.114 (colored)

Catch up with -current.

Revision 1.56.2.5 / (download) - annotate - [select for diffs], Fri Sep 21 22:37:12 2001 UTC (22 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.56.2.4: +66 -136 lines
Diff to previous 1.56.2.4 (colored) to selected 1.114 (colored)

Catch up to -current.

Revision 1.69 / (download) - annotate - [select for diffs], Sat Sep 15 20:36:45 2001 UTC (22 years, 7 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base2, post-chs-ubcperf
Changes since 1.68: +62 -132 lines
Diff to previous 1.68 (colored) to selected 1.114 (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.67.2.1 / (download) - annotate - [select for diffs], Thu Sep 13 01:16:31 2001 UTC (22 years, 7 months ago) by thorpej
Branch: kqueue
Changes since 1.67: +5 -5 lines
Diff to previous 1.67 (colored) to selected 1.114 (colored)

Update the kqueue branch to HEAD.

Revision 1.68 / (download) - annotate - [select for diffs], Mon Sep 10 21:19:42 2001 UTC (22 years, 7 months ago) by chris
Branch: MAIN
CVS Tags: pre-chs-ubcperf
Changes since 1.67: +5 -5 lines
Diff to previous 1.67 (colored) to selected 1.114 (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.56.2.4 / (download) - annotate - [select for diffs], Fri Aug 24 00:13:35 2001 UTC (22 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.56.2.3: +2 -15 lines
Diff to previous 1.56.2.3 (colored) to selected 1.114 (colored)

Catch up with -current.

Revision 1.67 / (download) - annotate - [select for diffs], Tue Jun 26 17:55:14 2001 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-devvp-base
Branch point for: thorpej-devvp, kqueue
Changes since 1.66: +1 -15 lines
Diff to previous 1.66 (colored) to selected 1.114 (colored)

Reduce some complexity in the fault path -- Rather than maintaining
an spl-protected "interrupt safe map" list, simply require that callers
of uvm_fault() never call us in interrupt context (MD code must make
the assertion), and check for interrupt-safe maps in uvmfault_lookup()
before we lock the map.

Revision 1.66 / (download) - annotate - [select for diffs], Tue Jun 26 17:27:31 2001 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.65: +2 -1 lines
Diff to previous 1.65 (colored) to selected 1.114 (colored)

Note that uvm_fault() must NEVER EVER EVER be called in interrupt
context.

Revision 1.56.2.3 / (download) - annotate - [select for diffs], Thu Jun 21 20:10:27 2001 UTC (22 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.56.2.2: +94 -71 lines
Diff to previous 1.56.2.2 (colored) to selected 1.114 (colored)

Catch up to -current.

Revision 1.48.4.2 / (download) - annotate - [select for diffs], Sat Jun 16 19:35:09 2001 UTC (22 years, 10 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.48.4.1: +9 -5 lines
Diff to previous 1.48.4.1 (colored) to branchpoint 1.48 (colored) next main 1.49 (colored) to selected 1.114 (colored)

Pull up revision 1.65 (via patch, requested by chuck):
  Work around overflow problem in uvm_fault_wire().

Revision 1.65 / (download) - annotate - [select for diffs], Thu Jun 14 05:12:56 2001 UTC (22 years, 10 months ago) by chs
Branch: MAIN
Changes since 1.64: +9 -5 lines
Diff to previous 1.64 (colored) to selected 1.114 (colored)

work around an overflow problem in uvm_fault_wire().
from Eduardo Horvath and Simon Burge.

Revision 1.64 / (download) - annotate - [select for diffs], Sat Jun 2 18:09:26 2001 UTC (22 years, 10 months ago) by chs
Branch: MAIN
Changes since 1.63: +6 -6 lines
Diff to previous 1.63 (colored) to selected 1.114 (colored)

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

Revision 1.63 / (download) - annotate - [select for diffs], Fri May 25 04:06:13 2001 UTC (22 years, 11 months ago) by chs
Branch: MAIN
Changes since 1.62: +61 -61 lines
Diff to previous 1.62 (colored) to selected 1.114 (colored)

remove trailing whitespace.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Apr 25 14:59:44 2001 UTC (23 years ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_beforemerge
Changes since 1.61: +4 -1 lines
Diff to previous 1.61 (colored) to selected 1.114 (colored)

Add a comment describing a problem.

Revision 1.61 / (download) - annotate - [select for diffs], Tue Apr 24 04:31:17 2001 UTC (23 years ago) by thorpej
Branch: MAIN
Changes since 1.60: +18 -2 lines
Diff to previous 1.60 (colored) to selected 1.114 (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.45.2.6 / (download) - annotate - [select for diffs], Sat Apr 21 17:47:06 2001 UTC (23 years ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.45.2.5: +6 -2 lines
Diff to previous 1.45.2.5 (colored) to branchpoint 1.45 (colored) next main 1.46 (colored) to selected 1.114 (colored)

Sync with HEAD

Revision 1.56.2.2 / (download) - annotate - [select for diffs], Mon Apr 9 01:59:13 2001 UTC (23 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.56.2.1: +49 -70 lines
Diff to previous 1.56.2.1 (colored) to selected 1.114 (colored)

Catch up with -current.

Revision 1.60 / (download) - annotate - [select for diffs], Sun Apr 1 16:45:53 2001 UTC (23 years ago) by chs
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_base
Changes since 1.59: +6 -2 lines
Diff to previous 1.59 (colored) to selected 1.114 (colored)

undo the part of a previous commit which turned a check for faulting
on an "intrsafe" map into a KASSERT.  this situation can be caused by
an application accessing /dev/kmem.

Revision 1.45.2.5 / (download) - annotate - [select for diffs], Tue Mar 27 15:32:48 2001 UTC (23 years ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.45.2.4: +40 -61 lines
Diff to previous 1.45.2.4 (colored) to branchpoint 1.45 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.59 / (download) - annotate - [select for diffs], Sat Mar 17 04:01:24 2001 UTC (23 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.58: +3 -6 lines
Diff to previous 1.58 (colored) to selected 1.114 (colored)

return the real error from pgo_fault().

Revision 1.58 / (download) - annotate - [select for diffs], Thu Mar 15 06:10:56 2001 UTC (23 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.57: +42 -60 lines
Diff to previous 1.57 (colored) to selected 1.114 (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.45.2.4 / (download) - annotate - [select for diffs], Mon Mar 12 13:32:11 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.45.2.3: +21 -33 lines
Diff to previous 1.45.2.3 (colored) to branchpoint 1.45 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.57 / (download) - annotate - [select for diffs], Sat Mar 10 22:46:49 2001 UTC (23 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.56: +16 -20 lines
Diff to previous 1.56 (colored) to selected 1.114 (colored)

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

VM_PAGER_OK		        0
VM_PAGER_BAD		        <unused>
VM_PAGER_FAIL		        <unused>
VM_PAGER_PEND		        0 (see below)
VM_PAGER_ERROR		        EIO
VM_PAGER_AGAIN		        EAGAIN
VM_PAGER_UNLOCK		        EBUSY
VM_PAGER_REFAULT	        ERESTART

for async i/o requests, it used to be possible for the request to
be convert to sync, and the pager would return VM_PAGER_OK or VM_PAGER_PEND
to indicate whether the caller should perform post-i/o cleanup.
this is no longer allowed; pagers must now return 0 to indicate that
the async i/o was successfully started, and the caller never needs to
worry about doing the post-i/o cleanup.

Revision 1.56.2.1 / (download) - annotate - [select for diffs], Mon Mar 5 22:50:09 2001 UTC (23 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.56: +6 -5 lines
Diff to previous 1.56 (colored) to selected 1.114 (colored)

Initial commit of scheduler activations and lightweight process support.

Revision 1.56 / (download) - annotate - [select for diffs], Sun Feb 18 21:19:08 2001 UTC (23 years, 2 months ago) by chs
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.55: +6 -14 lines
Diff to previous 1.55 (colored) to selected 1.114 (colored)

clean up DIAGNOSTIC checks, use KASSERT().

Revision 1.45.2.3 / (download) - annotate - [select for diffs], Sun Feb 11 19:17:48 2001 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.45.2.2: +35 -15 lines
Diff to previous 1.45.2.2 (colored) to branchpoint 1.45 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.55 / (download) - annotate - [select for diffs], Sun Jan 28 23:30:43 2001 UTC (23 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored) to selected 1.114 (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.54 / (download) - annotate - [select for diffs], Tue Jan 23 02:27:39 2001 UTC (23 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.53: +4 -3 lines
Diff to previous 1.53 (colored) to selected 1.114 (colored)

Change uvm_analloc() to return a locked anon, update all callers,
and fix an anon locking protocol error in uvm_loanzero().

Revision 1.53 / (download) - annotate - [select for diffs], Tue Jan 23 01:56:16 2001 UTC (23 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.52: +33 -14 lines
Diff to previous 1.52 (colored) to selected 1.114 (colored)

Sprinkle some assertions:
amap_free(): Assert that the amap is locked.
amap_share_protect(): Assert that the amap is locked.
amap_wipeout(): Assert that the amap is locked.
uvm_anfree(): Assert that the anon has a reference count of 0 and is
              not locked.
uvm_anon_lockloanpg(): Assert that the anon is locked.
anon_pagein(): Assert that the anon is locked.
uvmfault_anonget(): Assert that the anon is locked.
uvm_pagealloc_strat(): Assert that the uobj or the anon is locked

And fix the problems these have uncovered:
amap_cow_now(): Lock the new anon after allocating it, and unref and
                unlock it (rather than lock!) before freeing it in case
                of an error condition.  This should fix a problem reported
		by Dan Carosone using cdrecord on an i386 MP kernel.
uvm_fault(): Case1B -- Lock the new anon afer allocating it, and unlock
             it later when we unlock the old anon.
	     Case2 -- Lock the new anon after allocating it, and unlock
	     it later by passing it to uvmfault_unlockall() (we set anon
	     to NULL if we're not doing a promote fault).

Revision 1.45.2.2 / (download) - annotate - [select for diffs], Fri Dec 8 09:20:53 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.45.2.1: +67 -114 lines
Diff to previous 1.45.2.1 (colored) to branchpoint 1.45 (colored) to selected 1.114 (colored)

Sync with HEAD.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Nov 27 08:40:03 2000 UTC (23 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.51: +67 -114 lines
Diff to previous 1.51 (colored) to selected 1.114 (colored)

Initial integration of the Unified Buffer Cache project.

Revision 1.45.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:12:00 2000 UTC (23 years, 5 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.45: +155 -46 lines
Diff to previous 1.45 (colored) to selected 1.114 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.48.4.1 / (download) - annotate - [select for diffs], Sun Aug 6 17:12:09 2000 UTC (23 years, 8 months ago) by thorpej
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Changes since 1.48: +21 -13 lines
Diff to previous 1.48 (colored) to selected 1.114 (colored)

Pull up rev. 1.51:
Update a comment in uvmfault_anonget() to reflect reality, and
make uvm_fault() handle uvmfault_anonget() failure properly (i.e.
don't unlock a lock that's already unlocked).

Revision 1.51 / (download) - annotate - [select for diffs], Sun Aug 6 00:22:53 2000 UTC (23 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.50: +21 -13 lines
Diff to previous 1.50 (colored) to selected 1.114 (colored)

Update a comment in uvmfault_anonget() to reflect reality, and
make uvm_fault() handle uvmfault_anonget() failure properly (i.e.
don't unlock a lock that's already unlocked).

Revision 1.50 / (download) - annotate - [select for diffs], Tue Jun 27 17:29:21 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.49: +1 -3 lines
Diff to previous 1.49 (colored) to selected 1.114 (colored)

remove include of <vm/vm.h>

Revision 1.49 / (download) - annotate - [select for diffs], Mon Jun 26 14:21:17 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.48: +1 -3 lines
Diff to previous 1.48 (colored) to selected 1.114 (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.48 / (download) - annotate - [select for diffs], Mon Apr 10 01:17:41 2000 UTC (24 years ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-5-base, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.47: +15 -4 lines
Diff to previous 1.47 (colored) to selected 1.114 (colored)

Use UVM_PGA_ZERO in the promote-zero-fault case of uvm_fault().

Revision 1.47 / (download) - annotate - [select for diffs], Tue Jan 11 06:57:50 2000 UTC (24 years, 3 months ago) by chs
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.46: +33 -14 lines
Diff to previous 1.46 (colored) to selected 1.114 (colored)

add support for ``swapctl -d'' (removing swap space).
improve handling of i/o errors in swap space.

reviewed by:  Chuck Cranor

Revision 1.45.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:43 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.45: +95 -20 lines
Diff to previous 1.45 (colored) next main 1.46 (colored) to selected 1.114 (colored)

Pull up to last week's -current.

Revision 1.27.2.1.4.1 / (download) - annotate - [select for diffs], Tue Nov 30 13:36:25 1999 UTC (24 years, 4 months ago) by itojun
Branch: kame
CVS Tags: kame_141_19991130
Changes since 1.27.2.1: +19 -4 lines
Diff to previous 1.27.2.1 (colored) next main 1.27.2.2 (colored) to selected 1.114 (colored)

bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code).  Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.

Revision 1.45.4.1 / (download) - annotate - [select for diffs], Mon Nov 15 00:42:28 1999 UTC (24 years, 5 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.45: +95 -20 lines
Diff to previous 1.45 (colored) next main 1.46 (colored) to selected 1.114 (colored)

Sync with -current

Revision 1.46 / (download) - annotate - [select for diffs], Sat Nov 13 00:24:38 1999 UTC (24 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, fvdl-softdep-base
Changes since 1.45: +95 -20 lines
Diff to previous 1.45 (colored) to selected 1.114 (colored)

Change the pmap_enter() API slightly; pmap_enter() now returns an error
value (KERN_SUCCESS or KERN_RESOURCE_SHORTAGE) indicating if it succeeded
or failed.  Change the `wired' and `access_type' arguments to a single
`flags' argument, which includes the access type, and flags:

	PMAP_WIRED	the old `wired' boolean
	PMAP_CANFAIL	pmap_enter() is allowed to fail

If PMAP_CANFAIL is not specified, the pmap should behave as it always
has in the face of a drastic resource shortage: fall over dead.

Change the fault handler to deal with failure (which indicates resource
shortage) by unlocking everything, waiting for the pagedaemon to free
more memory, then retrying the fault.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Sep 12 01:17:35 1999 UTC (24 years, 7 months ago) by chs
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize, thorpej_scsipi, fvdl-softdep
Changes since 1.44: +8 -12 lines
Diff to previous 1.44 (colored) to selected 1.114 (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.27.2.1.2.5 / (download) - annotate - [select for diffs], Mon Aug 2 23:39:29 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.27.2.1.2.4: +1 -32 lines
Diff to previous 1.27.2.1.2.4 (colored) to branchpoint 1.27.2.1 (colored) next main 1.27.2.2 (colored) to selected 1.114 (colored)

Update from trunk.

Revision 1.27.2.1.2.4 / (download) - annotate - [select for diffs], Mon Aug 2 23:16:14 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.27.2.1.2.3: +9 -13 lines
Diff to previous 1.27.2.1.2.3 (colored) to branchpoint 1.27.2.1 (colored) to selected 1.114 (colored)

Update from trunk.

Revision 1.44 / (download) - annotate - [select for diffs], Thu Jul 22 22:58:38 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.43: +8 -8 lines
Diff to previous 1.43 (colored) to selected 1.114 (colored)

Garbage collect thread_sleep()/thread_wakeup() left over from the old
Mach VM code.  Also nuke iprintf(), which was no longer used anywhere.

Add proclist locking where appropriate.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jul 19 19:02:22 1999 UTC (24 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored) to selected 1.114 (colored)

make sure 'wide' fault handling is actually done only once per fault.
('narrow' was mistakenly set to FALSE instead of TRUE.)  Committed after
discussion with chuq.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Jul 11 17:47:12 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.41: +30 -26 lines
Diff to previous 1.41 (colored) to selected 1.114 (colored)

Back out the change I made yesterday.  It seems to cause some trouble
for some folks.

Revision 1.41 / (download) - annotate - [select for diffs], Sat Jul 10 21:46:56 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.40: +26 -30 lines
Diff to previous 1.40 (colored) to selected 1.114 (colored)

Simplify uvm_fault_unwire_locked() a little.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Jul 8 18:11:03 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.39: +4 -9 lines
Diff to previous 1.39 (colored) to selected 1.114 (colored)

Change the pmap_extract() interface to:
	boolean_t pmap_extract(pmap_t, vaddr_t, paddr_t *);
This makes it possible for the pmap to map physical address 0.

Revision 1.27.2.1.2.3 / (download) - annotate - [select for diffs], Sun Jul 4 02:00:33 1999 UTC (24 years, 9 months ago) by chs
Branch: chs-ubc2
Changes since 1.27.2.1.2.2: +4 -3 lines
Diff to previous 1.27.2.1.2.2 (colored) to branchpoint 1.27.2.1 (colored) to selected 1.114 (colored)

add PGO_SYNCIO to the flags to pgo_fault() and pgo_get() (unlocked).
this just makes things work out better in the handlers.

Revision 1.27.2.1.2.2 / (download) - annotate - [select for diffs], Mon Jun 21 01:47:20 1999 UTC (24 years, 10 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.27.2.1.2.1: +118 -35 lines
Diff to previous 1.27.2.1.2.1 (colored) to branchpoint 1.27.2.1 (colored) to selected 1.114 (colored)

Sync w/ -current.

Revision 1.27.2.2 / (download) - annotate - [select for diffs], Fri Jun 18 18:05:12 1999 UTC (24 years, 10 months ago) by perry
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001
Changes since 1.27.2.1: +19 -4 lines
Diff to previous 1.27.2.1 (colored) to branchpoint 1.27 (colored) next main 1.28 (colored) to selected 1.114 (colored)

pullup 1.28->1.29 (chuq): fixes loss of process data under heavy paging bug

Revision 1.39 / (download) - annotate - [select for diffs], Thu Jun 17 19:23:21 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored) to selected 1.114 (colored)

pmap_change_wiring() -> pmap_unwire().

Revision 1.38 / (download) - annotate - [select for diffs], Thu Jun 17 18:21:23 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.37: +2 -16 lines
Diff to previous 1.37 (colored) to selected 1.114 (colored)

Remove pmap_pageable(); no pmap implements it, and it is not really useful,
because pmap_enter()/pmap_change_wiring() (soon to be pmap_unwire())
communicate the information in greater detail.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Jun 16 23:02:40 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.36: +40 -6 lines
Diff to previous 1.36 (colored) to selected 1.114 (colored)

When unwiring a range in uvm_fault_unwire_locked(), don't call
pmap_change_wiring(...,FALSE) unless the map entry claims the address
is unwired.  This fixes the following scenario, as described on
tech-kern@netbsd.org on Wed 6/16/1999 12:25:23:

	- User mlock(2)'s a buffer, to guarantee it will never become
	  non-resident while he is using it.

	- User then does physio to that buffer.  Physio calls uvm_vslock()
	  to lock down the pages and ensure that page faults do not happen
	  while the I/O is in progress (possibly in interrupt context).

	- Physio does the I/O.

	- Physio calls uvm_vsunlock().  This calls uvm_fault_unwire().

	  >>> HERE IS WHERE THE PROBLEM OCCURS <<<

	  uvm_fault_unwire() calls pmap_change_wiring(..., FALSE),
	  which now gives the pmap free reign to recycle the mapping
	  information for that page, which is illegal; the mapping is
	  still wired (due to the mlock(2)), but now access of the
	  page could cause a non-protection page fault (disallowed).

	  NOTE: This could eventually lead to a panic when the user
	  subsequently munlock(2)'s the buffer and the mapping info
	  has been recycled for use by another mapping!

Revision 1.36 / (download) - annotate - [select for diffs], Wed Jun 16 22:11:23 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.35: +22 -5 lines
Diff to previous 1.35 (colored) to selected 1.114 (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.35 / (download) - annotate - [select for diffs], Wed Jun 16 18:43:28 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.34: +2 -3 lines
Diff to previous 1.34 (colored) to selected 1.114 (colored)

Remove a incorrect-and-no-longer-relevant comment.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Jun 16 00:29:04 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored) to selected 1.114 (colored)

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

Revision 1.27.2.1.2.1 / (download) - annotate - [select for diffs], Mon Jun 7 04:25:36 1999 UTC (24 years, 10 months ago) by chs
Branch: chs-ubc2
Changes since 1.27.2.1: +78 -43 lines
Diff to previous 1.27.2.1 (colored) to selected 1.114 (colored)

merge everything from chs-ubc branch.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Jun 4 23:38:41 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.32: +14 -1 lines
Diff to previous 1.32 (colored) to selected 1.114 (colored)

Keep interrupt-safe maps on an additional queue.  In uvm_fault(), if we're
looking up a kernel address, check to see if the address is on this
"interrupt-safe" list.  If so, return failure immediately.  This prevents
a locking screw if a page fault is taken on an interrupt-safe map in or
out of interrupt context.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jun 2 23:26:21 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.31: +12 -1 lines
Diff to previous 1.31 (colored) to selected 1.114 (colored)

A page fault on a non-pageable map is always fatal.

Revision 1.17.2.3 / (download) - annotate - [select for diffs], Wed Jun 2 05:02:46 1999 UTC (24 years, 10 months ago) by chs
Branch: chs-ubc
Changes since 1.17.2.2: +4 -3 lines
Diff to previous 1.17.2.2 (colored) to branchpoint 1.17 (colored) next main 1.18 (colored) to selected 1.114 (colored)

honor the new PG_RDONLY flag.

Revision 1.31 / (download) - annotate - [select for diffs], Fri May 28 20:49:51 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +10 -6 lines
Diff to previous 1.30 (colored) to selected 1.114 (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.30 / (download) - annotate - [select for diffs], Wed May 26 00:32:42 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +4 -3 lines
Diff to previous 1.29 (colored) to selected 1.114 (colored)

Pass an access_type to uvm_fault_wire(), which it forwards on to
uvm_fault().

Revision 1.29 / (download) - annotate - [select for diffs], Wed May 19 06:14:15 1999 UTC (24 years, 11 months ago) by chs
Branch: MAIN
Changes since 1.28: +19 -4 lines
Diff to previous 1.28 (colored) to selected 1.114 (colored)

when wiring swap-backed pages, clear the PG_CLEAN flag before
releasing any swap resources.  if we don't do this, we can
end up with a clean, swap-backed page, which is illegal.
tracked down by Bill Sommerfeld, fixes PR 7578.

Revision 1.27.2.1 / (download) - annotate - [select for diffs], Fri Apr 16 16:28:06 1999 UTC (25 years ago) by chs
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-RELEASE, kame_14_19990705, kame_14_19990628
Branch point for: kame, chs-ubc2
Changes since 1.27: +6 -6 lines
Diff to previous 1.27 (colored) to selected 1.114 (colored)

pull up 1.27 -> 1.28:
add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Apr 11 04:04:11 1999 UTC (25 years ago) by chs
Branch: MAIN
Changes since 1.27: +6 -6 lines
Diff to previous 1.27 (colored) to selected 1.114 (colored)

add a `flags' argument to uvm_pagealloc_strat().
define a flag UVM_PGA_USERESERVE to allow non-kernel object
allocations to use pages from the reserve.
use the new flag for allocations in pmap modules.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Mar 29 05:43:31 1999 UTC (25 years ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Changes since 1.26: +2 -3 lines
Diff to previous 1.26 (colored) to selected 1.114 (colored)

Duuuh.  Back and front pages should have an access_type of 0, since we don't
know they're going to be used.  What was I thinking??

Revision 1.26 / (download) - annotate - [select for diffs], Sun Mar 28 21:48:50 1999 UTC (25 years ago) by mycroft
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored) to selected 1.114 (colored)

Reduce the access_type for copy-on-write pages in the front and back regions.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Mar 28 21:01:25 1999 UTC (25 years ago) by mycroft
Branch: MAIN
Changes since 1.24: +3 -2 lines
Diff to previous 1.24 (colored) to selected 1.114 (colored)

Fix a case I missed in the previous.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Mar 28 19:53:49 1999 UTC (25 years ago) by mycroft
Branch: MAIN
Changes since 1.23: +9 -9 lines
Diff to previous 1.23 (colored) to selected 1.114 (colored)

Only turn off VM_PROT_WRITE for COW pages; not VM_PROT_EXECUTE.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Mar 26 21:58:39 1999 UTC (25 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.22: +7 -6 lines
Diff to previous 1.22 (colored) to selected 1.114 (colored)

Add a new `access type' argument to pmap_enter().  This indicates what type of
memory access a mapping was caused by.  This is passed through from uvm_fault()
and udv_fault(), and in most other cases is 0.
The pmap module may use this to preset R/M information.  On MMUs which require
R/M emulation, the implementation may preset the bits and avoid taking another
fault.  On MMUs which keep R/M information in hardware, the implementation may
preset its cached bits to speed up the next call to pmap_is_modified() or
pmap_is_referenced().

Revision 1.22 / (download) - annotate - [select for diffs], Fri Mar 26 17:34:16 1999 UTC (25 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.21: +19 -5 lines
Diff to previous 1.21 (colored) to selected 1.114 (colored)

add uvmexp.swpgonly and use it to detect out-of-swap conditions.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Mar 25 18:48:50 1999 UTC (25 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.20: +1 -5 lines
Diff to previous 1.20 (colored) to selected 1.114 (colored)

remove now >1 year old pre-release message.

Revision 1.17.2.2 / (download) - annotate - [select for diffs], Thu Feb 25 04:12:50 1999 UTC (25 years, 1 month ago) by chs
Branch: chs-ubc
Changes since 1.17.2.1: +36 -44 lines
Diff to previous 1.17.2.1 (colored) to branchpoint 1.17 (colored) to selected 1.114 (colored)

remove the hacky splhigh() around the pgo_fault() call.
thread_wakeup() -> wakeup().
use SLOCK_{,UN}LOCKED.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jan 31 09:27:18 1999 UTC (25 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.19: +3 -2 lines
Diff to previous 1.19 (colored) to selected 1.114 (colored)

80 cols.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Jan 24 23:53:15 1999 UTC (25 years, 3 months ago) by chuck
Branch: MAIN
Changes since 1.18: +5 -5 lines
Diff to previous 1.18 (colored) to selected 1.114 (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.18 / (download) - annotate - [select for diffs], Fri Nov 20 19:37:06 1998 UTC (25 years, 5 months ago) by chuck
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.17: +4 -2 lines
Diff to previous 1.17 (colored) to selected 1.114 (colored)

update outdated an_swslot comments

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Mon Nov 9 06:06:37 1998 UTC (25 years, 5 months ago) by chs
Branch: chs-ubc
Changes since 1.17: +72 -29 lines
Diff to previous 1.17 (colored) to selected 1.114 (colored)

initial snapshot.  lots left to do.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Nov 7 05:50:19 1998 UTC (25 years, 5 months ago) by mrg
Branch: MAIN
CVS Tags: chs-ubc-base
Branch point for: chs-ubc
Changes since 1.16: +20 -20 lines
Diff to previous 1.16 (colored) to selected 1.114 (colored)

minor KNF nits

Revision 1.16 / (download) - annotate - [select for diffs], Wed Nov 4 07:07:22 1998 UTC (25 years, 5 months ago) by chs
Branch: MAIN
Changes since 1.15: +4 -3 lines
Diff to previous 1.15 (colored) to selected 1.114 (colored)

be consistent with locking of amaps and anons when freeing them.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Oct 18 23:49:59 1998 UTC (25 years, 6 months ago) by chs
Branch: MAIN
Changes since 1.14: +7 -6 lines
Diff to previous 1.14 (colored) to selected 1.114 (colored)

shift by PAGE_SHIFT instead of multiplying or dividing by PAGE_SIZE.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Oct 16 19:34:57 1998 UTC (25 years, 6 months ago) by tv
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored) to selected 1.114 (colored)

Check for gcc the Right way when quashing -Wuninitialized goop.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Oct 11 23:07:42 1998 UTC (25 years, 6 months ago) by chuck
Branch: MAIN
Changes since 1.12: +19 -25 lines
Diff to previous 1.12 (colored) to selected 1.114 (colored)

remove unused share map code from UVM:
 - simplify uvm_faultinfo in uvm_fault.h (parent map tracking no longer needed)
 - adjust locking and lookup functions in uvm_fault_i.h to reflect the above
 - replace ufi.rvaddr with ufi.orig_rvaddr in uvm_fault.c since rvaddr is
	no longer needed.
 - no need to worry about share map translations in uvm_fault().  simplify.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Aug 13 02:11:00 1998 UTC (25 years, 8 months ago) by eeh
Branch: MAIN
Changes since 1.11: +10 -8 lines
Diff to previous 1.11 (colored) to selected 1.114 (colored)

Merge paddr_t changes into the main branch.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Thu Jul 30 14:04:10 1998 UTC (25 years, 8 months ago) by eeh
Branch: eeh-paddr_t
Changes since 1.11: +10 -8 lines
Diff to previous 1.11 (colored) next main 1.12 (colored) to selected 1.114 (colored)

Split vm_offset_t and vm_size_t into paddr_t, psize_t, vaddr_t, and vsize_t.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jun 2 20:51:24 1998 UTC (25 years, 10 months ago) by mark
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) to selected 1.114 (colored)

Use the sparc's GCC lossage fix for the arm32 port as well. Problem appears
to be a compiler bug resulting in an 'variable possibly used uninitialised'
warning when optimisation is used.

Revision 1.10 / (download) - annotate - [select for diffs], Tue May 5 20:51:05 1998 UTC (25 years, 11 months ago) by kleink
Branch: MAIN
Changes since 1.9: +1 -4 lines
Diff to previous 1.9 (colored) to selected 1.114 (colored)

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

Revision 1.9 / (download) - annotate - [select for diffs], Thu Mar 26 21:50:14 1998 UTC (26 years, 1 month ago) by chuck
Branch: MAIN
Changes since 1.8: +17 -3 lines
Diff to previous 1.8 (colored) to selected 1.114 (colored)

update per-process rusage fault counters (ru_majflt/ru_minflt) under UVM

Revision 1.8 / (download) - annotate - [select for diffs], Sun Mar 22 21:29:30 1998 UTC (26 years, 1 month ago) by chuck
Branch: MAIN
Changes since 1.7: +4 -13 lines
Diff to previous 1.7 (colored) to selected 1.114 (colored)

remove tmpwire arg from uvm_pagewire() -- it isn't needed anymore.
noted by chuck s.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Mar 9 00:58:56 1998 UTC (26 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.6: +1373 -1262 lines
Diff to previous 1.6 (colored) to selected 1.114 (colored)

KNF.

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

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

Revision 1.5 / (download) - annotate - [select for diffs], Sat Feb 7 17:00:42 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored) to selected 1.114 (colored)

implement counters for pages paged in/out

Revision 1.4 / (download) - annotate - [select for diffs], Sat Feb 7 11:08:25 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored) to selected 1.114 (colored)

restore rcsids

Revision 1.3 / (download) - annotate - [select for diffs], Sat Feb 7 02:19:55 1998 UTC (26 years, 2 months ago) by chs
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored) to selected 1.114 (colored)

don't try to relock amap if there isn't one.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 6 22:31:45 1998 UTC (26 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored) to selected 1.114 (colored)

RCS ID police.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Thu Feb 5 06:25:10 1998 UTC (26 years, 2 months ago) by mrg
Branch: CDC
CVS Tags: uvm980205
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored) to selected 1.114 (colored)

initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the UVM kernel code portion.


this will be KNF'd shortly.  :-)

Revision 1.1 / (download) - annotate - [select for diffs], Thu Feb 5 06:25:10 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Diff to selected 1.114 (colored)

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>