The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.152 / (download) - annotate - [select for diffs], Wed Nov 4 01:30:19 2020 UTC (4 weeks, 4 days ago) by chs
Branch: MAIN
CVS Tags: HEAD
Changes since 1.151: +20 -15 lines
Diff to previous 1.151 (colored)

In uvmpd_tryownerlock(), if the initial try-lock of the owner lock fails
then rather than do more try-locks and eventually sleep for a tick,
take a hold on the current owner's lock, drop the page interlock,
and acquire the lock that we took the hold on in a blocking fashion.
After we get the lock, check if the lock that we acquired is still
the lock for the owner of the page that we're interested in.
If the owner hasn't changed then can proceed with this page,
otherwise we will skip this page and move on to a different page.
This dramatically reduces the amount of time that the pagedaemon
sleeps trying to get locks, since even 1 tick is an eternity to sleep
in this context and it was easy to trigger that case in practice,
and with this new method the pagedaemon only very rarely actually blocks
to acquire the lock that it wants since the object locks are adaptive,
and when the pagedaemon does block then the amount of time it spends
sleeping will be generally be much less than 1 tick.

Revision 1.151 / (download) - annotate - [select for diffs], Wed Aug 19 15:36:41 2020 UTC (3 months, 2 weeks ago) by chs
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-futex
Changes since 1.150: +4 -2 lines
Diff to previous 1.150 (colored)

in uao_get(), if we unlock the uobj to read a page from swap,
we must clear the cached page array because it is now stale.
also add a missing call to uvm_page_array_fini() if the I/O fails.
fixes PR 55493.

Revision 1.150 / (download) - annotate - [select for diffs], Wed Aug 19 07:29:00 2020 UTC (3 months, 2 weeks ago) by simonb
Branch: MAIN
Changes since 1.149: +3 -3 lines
Diff to previous 1.149 (colored)

Remove trailing \n from UVMHIST_LOG() format strings.

Revision 1.149 / (download) - annotate - [select for diffs], Thu Jul 9 05:57:15 2020 UTC (4 months, 4 weeks ago) by skrll
Branch: MAIN
Changes since 1.148: +8 -8 lines
Diff to previous 1.148 (colored)

Consistently use UVMHIST(__func__)

Convert UVMHIST_{CALLED,LOG} into UVMHIST_CALLARGS

Revision 1.148 / (download) - annotate - [select for diffs], Wed Jul 8 13:26:22 2020 UTC (4 months, 4 weeks ago) by skrll
Branch: MAIN
Changes since 1.147: +3 -3 lines
Diff to previous 1.147 (colored)

Trailing whitespace

Revision 1.147 / (download) - annotate - [select for diffs], Mon May 25 22:04:51 2020 UTC (6 months, 1 week ago) by ad
Branch: MAIN
Changes since 1.146: +46 -58 lines
Diff to previous 1.146 (colored)

uao_get(): in the PGO_SYNCIO case use uvm_page_array and simplify control
flow a little bit.

Revision 1.146 / (download) - annotate - [select for diffs], Mon May 25 21:15:10 2020 UTC (6 months, 1 week ago) by ad
Branch: MAIN
Changes since 1.145: +9 -11 lines
Diff to previous 1.145 (colored)

- Alter the convention for uvm_page_array slightly, so the basic search
  parameters can't change part way through a search: move the "uobj" and
  "flags" arguments over to uvm_page_array_init() and store those with the
  array.

- With that, detect when it's not possible to find any more pages in the
  tree with the given search parameters, and avoid repeated tree lookups if
  the caller loops over uvm_page_array_fill_and_peek().

Revision 1.145 / (download) - annotate - [select for diffs], Mon May 25 20:13:00 2020 UTC (6 months, 1 week ago) by ad
Branch: MAIN
Changes since 1.144: +5 -2 lines
Diff to previous 1.144 (colored)

PR kern/55300: ubciomove triggers page not dirty assertion

If overwriting an existing page, mark it dirty since there may be no
managed mapping to track the modification.

Revision 1.144 / (download) - annotate - [select for diffs], Fri May 22 19:02:59 2020 UTC (6 months, 2 weeks ago) by ad
Branch: MAIN
Changes since 1.143: +13 -5 lines
Diff to previous 1.143 (colored)

uao_get(): handle PGO_OVERWRITE.

Revision 1.143 / (download) - annotate - [select for diffs], Wed May 20 12:47:36 2020 UTC (6 months, 2 weeks ago) by hannken
Branch: MAIN
Changes since 1.142: +5 -4 lines
Diff to previous 1.142 (colored)

Suppress GCC warnings and fix a UVMHIST_LOG() statement.

Kernels ALL/amd64 and ALL/i386 and port sparc64 build again.

Revision 1.142 / (download) - annotate - [select for diffs], Tue May 19 22:22:15 2020 UTC (6 months, 2 weeks ago) by ad
Branch: MAIN
Changes since 1.141: +27 -50 lines
Diff to previous 1.141 (colored)

PR kern/32166: pgo_get protocol is ambiguous
Also problems with tmpfs+nfs noted by hannken@.

Don't pass PGO_ALLPAGES to pgo_get, and ignore PGO_DONTCARE in the
!PGO_LOCKED case.  In uao_get() have uvm_pagealloc() take care of page
zeroing and release busy pages on error.

Revision 1.141 / (download) - annotate - [select for diffs], Sun May 17 19:38:17 2020 UTC (6 months, 2 weeks ago) by ad
Branch: MAIN
Changes since 1.140: +38 -51 lines
Diff to previous 1.140 (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.140 / (download) - annotate - [select for diffs], Fri May 15 22:27:04 2020 UTC (6 months, 3 weeks ago) by ad
Branch: MAIN
Changes since 1.139: +8 -5 lines
Diff to previous 1.139 (colored)

PR kern/55268: tmpfs is slow

uao_get(): in the PGO_LOCKED case, we're okay to allocate a new page as long
as the caller holds a write lock.  PGO_NOBUSY doesn't put a stop to that.

Revision 1.139 / (download) - annotate - [select for diffs], Sun Mar 22 18:32:42 2020 UTC (8 months, 2 weeks ago) by ad
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Changes since 1.138: +21 -7 lines
Diff to previous 1.138 (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.138 / (download) - annotate - [select for diffs], Tue Mar 17 18:31:39 2020 UTC (8 months, 2 weeks ago) by ad
Branch: MAIN
Changes since 1.137: +5 -4 lines
Diff to previous 1.137 (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.137 / (download) - annotate - [select for diffs], Sat Mar 14 20:23:51 2020 UTC (8 months, 3 weeks ago) by ad
Branch: MAIN
Changes since 1.136: +7 -18 lines
Diff to previous 1.136 (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.136 / (download) - annotate - [select for diffs], Mon Feb 24 12:38:57 2020 UTC (9 months, 1 week ago) by rin
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3
Changes since 1.135: +6 -6 lines
Diff to previous 1.135 (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.135 / (download) - annotate - [select for diffs], Sun Feb 23 15:46:43 2020 UTC (9 months, 1 week ago) by ad
Branch: MAIN
Changes since 1.134: +28 -28 lines
Diff to previous 1.134 (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.134 / (download) - annotate - [select for diffs], Wed Jan 15 17:55:45 2020 UTC (10 months, 3 weeks ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1
Changes since 1.133: +17 -11 lines
Diff to previous 1.133 (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.133 / (download) - annotate - [select for diffs], Tue Dec 31 22:42:51 2019 UTC (11 months ago) by ad
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.132: +6 -2 lines
Diff to previous 1.132 (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.132 / (download) - annotate - [select for diffs], Sun Dec 15 21:11:35 2019 UTC (11 months, 3 weeks ago) by ad
Branch: MAIN
Changes since 1.131: +25 -82 lines
Diff to previous 1.131 (colored)

Merge from yamt-pagecache:

- do gang lookup of pages using radixtree.
- remove now unused uvm_object::uo_memq and vm_page::listq.queue.

Revision 1.131 / (download) - annotate - [select for diffs], Fri Dec 13 20:10:22 2019 UTC (11 months, 3 weeks ago) by ad
Branch: MAIN
Changes since 1.130: +7 -34 lines
Diff to previous 1.130 (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.130 / (download) - annotate - [select for diffs], Sun Dec 1 20:31:40 2019 UTC (12 months ago) by ad
Branch: MAIN
Changes since 1.129: +6 -4 lines
Diff to previous 1.129 (colored)

Avoid calling pmap_page_protect() while under uvm_pageqlock.

Revision 1.129 / (download) - annotate - [select for diffs], Sun Dec 1 14:40:31 2019 UTC (12 months ago) by ad
Branch: MAIN
Changes since 1.128: +3 -5 lines
Diff to previous 1.128 (colored)

- Adjust uvmexp.swpgonly with atomics, and make uvm_swap_data_lock static.
- A bit more __cacheline_aligned on mutexes.

Revision 1.128 / (download) - annotate - [select for diffs], Sun Jul 28 05:28:53 2019 UTC (16 months, 1 week ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20191119, netbsd-9-base, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.127: +3 -3 lines
Diff to previous 1.127 (colored)

 Avoid undefined behavior in uao_pagein_page(). Found by kUBSan. OK'd by
 riastradh. I think this is a real bug on amd64 at least.

Revision 1.127 / (download) - annotate - [select for diffs], Mon May 28 21:04:35 2018 UTC (2 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: phil-wifi-base, phil-wifi-20190609, 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, isaki-audio2-base, isaki-audio2
Branch point for: phil-wifi
Changes since 1.126: +9 -7 lines
Diff to previous 1.126 (colored)

allow tmpfs files to be larger than 4GB.

Revision 1.126 / (download) - annotate - [select for diffs], Sat Oct 28 00:37:13 2017 UTC (3 years, 1 month ago) by pgoyette
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base, pgoyette-compat-0521, 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.125: +13 -12 lines
Diff to previous 1.125 (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.125 / (download) - annotate - [select for diffs], Tue May 30 17:09:17 2017 UTC (3 years, 6 months ago) by chs
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base
Branch point for: netbsd-8
Changes since 1.124: +3 -2 lines
Diff to previous 1.124 (colored)

add assertions that would have caught the recent audio mmap bugs.

Revision 1.124 / (download) - annotate - [select for diffs], Thu Jul 28 07:52:06 2016 UTC (4 years, 4 months ago) by martin
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.123: +3 -3 lines
Diff to previous 1.123 (colored)

PR kern/51371: fix misleading indentation

Revision 1.123 / (download) - annotate - [select for diffs], Mon Aug 24 22:50:32 2015 UTC (5 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160726, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921
Branch point for: pgoyette-localcount
Changes since 1.122: +4 -2 lines
Diff to previous 1.122 (colored)

to garnish, dust with _KERNEL_OPT

Revision 1.122 / (download) - annotate - [select for diffs], Sun May 25 18:55:11 2014 UTC (6 years, 6 months ago) by riastradh
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-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.121: +5 -3 lines
Diff to previous 1.121 (colored)

Allow VM_NFREELIST in uao_set_pgfl, meaning any freelist is OK.

Revision 1.121 / (download) - annotate - [select for diffs], Thu May 22 14:01:46 2014 UTC (6 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.120: +47 -6 lines
Diff to previous 1.120 (colored)

Add uao_set_pgfl to limit a uvm_aobj's pages to a specified freelist.

Brought up on tech-kern:

https://mail-index.netbsd.org/tech-kern/2014/05/20/msg017095.html

Revision 1.120 / (download) - annotate - [select for diffs], Fri Oct 25 20:22:55 2013 UTC (7 years, 1 month ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base9, 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.119: +3 -3 lines
Diff to previous 1.119 (colored)

Mark a diagnostic-only variable

Revision 1.119 / (download) - annotate - [select for diffs], Sat Sep 15 06:25:47 2012 UTC (8 years, 2 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.118: +3 -2 lines
Diff to previous 1.118 (colored)

#include <sys/atomic.h>

Revision 1.118 / (download) - annotate - [select for diffs], Fri Sep 14 22:20:50 2012 UTC (8 years, 2 months ago) by rmind
Branch: MAIN
Changes since 1.117: +60 -143 lines
Diff to previous 1.117 (colored)

- Manage anonymous UVM object reference count with atomic ops.
- Fix an old bug of possible lock against oneself (uao_detach_locked() is
  called from uao_swap_off() with uao_list_lock acquired).  Also removes
  the try-lock dance in uao_swap_off(), since the lock order changes.

Revision 1.117 / (download) - annotate - [select for diffs], Fri Sep 14 18:56:15 2012 UTC (8 years, 2 months ago) by rmind
Branch: MAIN
Changes since 1.116: +64 -103 lines
Diff to previous 1.116 (colored)

- Describe uvm_aobj and the lock order.
- Remove unnecessary uao_dropswap_range1() wrapper.
- KNF.  Sprinkle some __cacheline_aligned.

Revision 1.116 / (download) - annotate - [select for diffs], Tue Sep 6 16:41:55 2011 UTC (9 years, 3 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, 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, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, tls-maxphys, netbsd-6
Changes since 1.115: +3 -3 lines
Diff to previous 1.115 (colored)

Allocate color appropriate pages.

Revision 1.115 / (download) - annotate - [select for diffs], Sun Jun 12 03:36:02 2011 UTC (9 years, 5 months ago) by rmind
Branch: MAIN
Changes since 1.114: +38 -31 lines
Diff to previous 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.114 / (download) - annotate - [select for diffs], Sat Apr 23 18:14:12 2011 UTC (9 years, 7 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.113: +4 -4 lines
Diff to previous 1.113 (colored)

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

Revision 1.113 / (download) - annotate - [select for diffs], Fri Feb 11 00:21:18 2011 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: uebayasi-xip-base7, bouyer-quota2-nbase, bouyer-quota2-base
Changes since 1.112: +7 -10 lines
Diff to previous 1.112 (colored)

Replace uvm_aobj_cache with kmem(9).

Revision 1.112 / (download) - annotate - [select for diffs], Wed Feb 2 15:28:38 2011 UTC (9 years, 10 months ago) by chuck
Branch: MAIN
Changes since 1.111: +2 -8 lines
Diff to previous 1.111 (colored)

udpate license clauses on chuck^2 code to match the new-style BSD licenses.
based on diff that rmind@ sent me (and confirmed with chs@ via email).

no functional change with this commit.

Revision 1.111 / (download) - annotate - [select for diffs], Tue Jan 25 03:34:29 2011 UTC (9 years, 10 months ago) by enami
Branch: MAIN
Changes since 1.110: +2 -16 lines
Diff to previous 1.110 (colored)

Remove nop code; the code is moved to uao_dropswap_range1() when it is
introduced in rev. 1.75.

Revision 1.110 / (download) - annotate - [select for diffs], Thu Jul 29 10:54:51 2010 UTC (10 years, 4 months ago) by hannken
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, matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.109: +6 -8 lines
Diff to previous 1.109 (colored)

Add vm page flag PG_MARKER and use it to tag dummy marker pages
in genfs_do_putpages() and uao_put().
Use 'v_uobj.uo_npages' to check for an empty memq.
Put some assertions where these marker pages may not appear.

Ok: YAMAMOTO Takashi <yamt@netbsd.org>

Revision 1.109 / (download) - annotate - [select for diffs], Fri May 28 23:41:14 2010 UTC (10 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.108: +4 -2 lines
Diff to previous 1.108 (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.108 / (download) - annotate - [select for diffs], Wed Oct 21 21:12:07 2009 UTC (11 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base1, uebayasi-xip-base, matt-premerge-20091211, jym-xensuspend-nbase
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.107: +2 -4 lines
Diff to previous 1.107 (colored)

Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.

Revision 1.107 / (download) - annotate - [select for diffs], Sun Sep 13 18:45:12 2009 UTC (11 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8
Changes since 1.106: +5 -4 lines
Diff to previous 1.106 (colored)

Wipe out the last vestiges of POOL_INIT with one swift stroke.  In
most cases, use a proper constructor.  For proplib, give a local
equivalent of POOL_INIT for the kernel object implementation.  This
way the code structure can be preserved, and a local link set is
not hazardous anyway (unless proplib is split to several modules,
but that'll be the day).

tested by booting a kernel in qemu and compile-testing i386/ALL

Revision 1.106 / (download) - annotate - [select for diffs], Wed Feb 18 13:16:58 2009 UTC (11 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: 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, jymxensuspend-base, jym-xensuspend-base
Changes since 1.105: +7 -4 lines
Diff to previous 1.105 (colored)

make some functions static.

Revision 1.105 / (download) - annotate - [select for diffs], Fri Jan 16 02:33:14 2009 UTC (11 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.104: +3 -3 lines
Diff to previous 1.104 (colored)

- g/c stale function prototypes.
- rename UVM_PAGE_HASH_PENALTY to UVM_PAGE_TREE_PENALTY.

Revision 1.104 / (download) - annotate - [select for diffs], Sat Oct 18 03:46:22 2008 UTC (12 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: netbsd-5-base, 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, 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-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, matt-nb5-mips64
Changes since 1.103: +12 -40 lines
Diff to previous 1.103 (colored)

- Initialize pool subsystem and kmem(9) earlier, when UVM is up enough.
- Remove uao_hashinit() workaround used for anon-objects.
- Replace malloc with kmem.

OK by <yamt>.

Revision 1.103 / (download) - annotate - [select for diffs], Wed Jun 25 13:21:04 2008 UTC (12 years, 5 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
Branch point for: haad-dm
Changes since 1.102: +8 -7 lines
Diff to previous 1.102 (colored)

Use pool_cache.

Revision 1.102 / (download) - annotate - [select for diffs], Wed Jun 4 12:41:40 2008 UTC (12 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl
Changes since 1.101: +9 -9 lines
Diff to previous 1.101 (colored)

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

Revision 1.101 / (download) - annotate - [select for diffs], Tue Jun 3 11:51:01 2008 UTC (12 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3
Changes since 1.100: +18 -2 lines
Diff to previous 1.100 (colored)

uao_reference, uao_detach: we don't do reference counting on kernel objects,
so don't lock them needlessly.

Revision 1.100 / (download) - annotate - [select for diffs], Mon May 5 17:11:17 2008 UTC (12 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.99: +25 -4 lines
Diff to previous 1.99 (colored)

- Convert hashinit() to use kmem_alloc(). The hash tables can be large
  and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.

Revision 1.99 / (download) - annotate - [select for diffs], Wed Feb 27 14:23:33 2008 UTC (12 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.98: +3 -3 lines
Diff to previous 1.98 (colored)

Minor corrections to comments.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Feb 27 13:46:20 2008 UTC (12 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.97: +37 -33 lines
Diff to previous 1.97 (colored)

uao_put: fix a race with pageout.

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

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

Revision 1.96 / (download) - annotate - [select for diffs], Wed Jan 2 11:49:15 2008 UTC (12 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.95: +41 -38 lines
Diff to previous 1.95 (colored)

Merge vmlocking2 to head.

Revision 1.95 / (download) - annotate - [select for diffs], Sat Dec 1 10:40:27 2007 UTC (13 years ago) by yamt
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.94: +1 -1 lines
Diff to previous 1.94 (colored)

constify pagerops.

Revision 1.94 / (download) - annotate - [select for diffs], Sat Dec 1 10:18:21 2007 UTC (13 years ago) by yamt
Branch: MAIN
Changes since 1.93: +6 -8 lines
Diff to previous 1.93 (colored)

use designated initiaizers for uvm_pagerops.

Revision 1.93 / (download) - annotate - [select for diffs], Sun Aug 5 10:19:23 2007 UTC (13 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5, matt-mips64-base, matt-armv6-prevmlocking, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs, matt-mips64, matt-armv6
Changes since 1.92: +6 -4 lines
Diff to previous 1.92 (colored)

In uao_get(), drop object lock only after dropswap to avoid KASSERT panic.

Should fix tmpfs problem reported by riz on current-users.  yamt ok.

Revision 1.92 / (download) - annotate - [select for diffs], Tue Jul 24 19:59:35 2007 UTC (13 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: hpcarm-cleanup
Branch point for: jmcneill-pm
Changes since 1.91: +8 -7 lines
Diff to previous 1.91 (colored)

In order to pacify assertions, make uao_list_lock + uvm_swap_data_lock
spinlocks for the time being.

Revision 1.91 / (download) - annotate - [select for diffs], Sat Jul 21 22:14:42 2007 UTC (13 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.90: +6 -6 lines
Diff to previous 1.90 (colored)

Temporarily work around an assertion from mutex_enter.

Revision 1.90 / (download) - annotate - [select for diffs], Sat Jul 21 19:21:54 2007 UTC (13 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.89: +17 -17 lines
Diff to previous 1.89 (colored)

Merge unobtrusive locking changes from the vmlocking branch.

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

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

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

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

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

Revision 1.87 / (download) - annotate - [select for diffs], Thu Feb 22 06:05:00 2007 UTC (13 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Branch point for: vmlocking
Changes since 1.86: +16 -16 lines
Diff to previous 1.86 (colored)

TRUE -> true, FALSE -> false

Revision 1.86 / (download) - annotate - [select for diffs], Thu Feb 22 04:38:07 2007 UTC (13 years, 9 months ago) by matt
Branch: MAIN
Changes since 1.85: +5 -5 lines
Diff to previous 1.85 (colored)

Fix lossage from boolean_t -> bool and updated x86 bus_dma.

Revision 1.85 / (download) - annotate - [select for diffs], Wed Feb 21 23:00:12 2007 UTC (13 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.84: +14 -14 lines
Diff to previous 1.84 (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.84 / (download) - annotate - [select for diffs], Wed Jan 24 13:08:11 2007 UTC (13 years, 10 months ago) by hubertf
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-idlelwp
Changes since 1.83: +2 -3 lines
Diff to previous 1.83 (colored)

Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

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

Thanks to martin@ for the input on testing.

Revision 1.83 / (download) - annotate - [select for diffs], Fri Dec 15 13:51:30 2006 UTC (13 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4
Changes since 1.82: +4 -4 lines
Diff to previous 1.82 (colored)

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

Revision 1.82 / (download) - annotate - [select for diffs], Wed Nov 1 10:18:27 2006 UTC (14 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base3, netbsd-4-base
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.81: +3 -4 lines
Diff to previous 1.81 (colored)

remove some __unused from function parameters.

Revision 1.81 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:52 2006 UTC (14 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.80: +4 -3 lines
Diff to previous 1.80 (colored)

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

Revision 1.80 / (download) - annotate - [select for diffs], Fri Sep 15 15:51:13 2006 UTC (14 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base
Branch point for: yamt-splraiseipl
Changes since 1.79: +4 -4 lines
Diff to previous 1.79 (colored)

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

Revision 1.79 / (download) - annotate - [select for diffs], Fri Sep 1 20:39:05 2006 UTC (14 years, 3 months ago) by cherry
Branch: MAIN
CVS Tags: yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: newlock2
Changes since 1.78: +4 -4 lines
Diff to previous 1.78 (colored)

bumps kernel aobj to 64 bit. \
See: http://mail-index.netbsd.org/tech-kern/2006/03/07/0007.html

Revision 1.78 / (download) - annotate - [select for diffs], Sat Dec 24 13:22:13 2005 UTC (14 years, 11 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, peter-altq-base, peter-altq, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, elad-kernelauth, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-pdpolicy, rpaulo-netinet-merge-pcb
Changes since 1.77: +7 -2 lines
Diff to previous 1.77 (colored)

uao_get: don't mark pages dirty unless it's a write fault.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Dec 5 01:24:07 2005 UTC (15 years ago) by yamt
Branch: MAIN
CVS Tags: ktrace-lwp-base
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

uao_pagein_page: pass PGO_SYNCIO to uao_get.
uao_get doesn't always assume PGO_SYNCIO after yamt-readahead merge.

reported and a dump provided by Masanori Kanaoka.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Nov 29 22:52:03 2005 UTC (15 years ago) by yamt
Branch: MAIN
Changes since 1.75: +5 -0 lines
Diff to previous 1.75 (colored)

merge yamt-readahead branch.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Nov 8 23:02:22 2005 UTC (15 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base
Branch point for: yamt-readahead
Changes since 1.74: +131 -38 lines
Diff to previous 1.74 (colored)

add a function to drop all swap slots in a given range.  for tmpfs.
XXX maybe it's better to implement true truncation.

Revision 1.74 / (download) - annotate - [select for diffs], Sat Sep 17 14:38:40 2005 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, thorpej-vnode-attr-base, thorpej-vnode-attr
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored)

make VMSWAP optional again.

Revision 1.73 / (download) - annotate - [select for diffs], Wed Sep 14 20:25:21 2005 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.72: +2 -6 lines
Diff to previous 1.72 (colored)

uao_put: don't skip loaned or wired pages.

Revision 1.72 / (download) - annotate - [select for diffs], Tue Sep 13 22:00:05 2005 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.71: +31 -6 lines
Diff to previous 1.71 (colored)

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

Revision 1.71 / (download) - annotate - [select for diffs], Tue Sep 13 19:54:09 2005 UTC (15 years, 2 months ago) by yamt
Branch: MAIN
Changes since 1.70: +7 -3 lines
Diff to previous 1.70 (colored)

uao_put: recognize endoff == 0 as "to the end of the object",
as VOP_PUTPAGES (thus vnode pager) does.  for tmpfs.

Revision 1.70 / (download) - annotate - [select for diffs], Sun Jul 31 04:04:47 2005 UTC (15 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.69: +6 -31 lines
Diff to previous 1.69 (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.69 / (download) - annotate - [select for diffs], Sat Jul 30 06:33:36 2005 UTC (15 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.68: +31 -6 lines
Diff to previous 1.68 (colored)

defflag VMSWAP.

Revision 1.68 / (download) - annotate - [select for diffs], Mon Jun 27 02:29:32 2005 UTC (15 years, 5 months ago) by thorpej
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored)

Sprinkle some static.

Revision 1.67 / (download) - annotate - [select for diffs], Mon Jun 27 02:19:48 2005 UTC (15 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.66: +18 -47 lines
Diff to previous 1.66 (colored)

Use ANSI function decls.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Jun 6 12:09:19 2005 UTC (15 years, 6 months ago) by yamt
Branch: MAIN
Changes since 1.65: +7 -8 lines
Diff to previous 1.65 (colored)

introduce a macro to initialize uvm_object and use it.

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

avoid shadow variables.
remove unneeded casts.

Revision 1.64 / (download) - annotate - [select for diffs], Sun Apr 25 16:42:44 2004 UTC (16 years, 7 months ago) by simonb
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, netbsd-3-base, 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, netbsd-3, kent-audio2-base, kent-audio2, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Changes since 1.63: +7 -16 lines
Diff to previous 1.63 (colored)

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

 Convert struct session, ucred and lockf to pools.

Revision 1.63 / (download) - annotate - [select for diffs], Mon Apr 5 01:39:07 2004 UTC (16 years, 8 months ago) by simonb
Branch: MAIN
Changes since 1.62: +3 -3 lines
Diff to previous 1.62 (colored)

Fix a tyop.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Mar 24 07:55:01 2004 UTC (16 years, 8 months ago) by junyoung
Branch: MAIN
CVS Tags: netbsd-2-base, 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, netbsd-2-0-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, netbsd-2-0, netbsd-2
Changes since 1.61: +9 -9 lines
Diff to previous 1.61 (colored)

Nuke __P().

Revision 1.61 / (download) - annotate - [select for diffs], Thu Sep 18 13:48:05 2003 UTC (17 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.60: +4 -5 lines
Diff to previous 1.60 (colored)

Fix a reversed logic in swap deallocation which could lead to
uvm_swap_free() being called with a zero slot; this might have been
the reason for crashes with sysvshm and heavy swapping.
(PR kern/22752 by Tom Spindler)
Confirmed by Chuck Silvers.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Aug 28 13:12:18 2003 UTC (17 years, 3 months ago) by pk
Branch: MAIN
Changes since 1.59: +4 -4 lines
Diff to previous 1.59 (colored)

When retiring a swap device with marked bad blocks on it we should update
the `# swap page in use' and `# swap page only' counters.  However, at the
time of swap device removal we can no longer figure out how many of the
bad swap pages are actually also `swap only' pages.

So, on swap I/O errors arrange things to not include the bad swap pages in
the `swpgonly' counter as follows: uvm_swap_markbad() decrements `swpgonly'
by the number of bad pages, and the various VM object deallocation routines
do not decrement `swpgonly' for swap slots marked as SWSLOT_BAD.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Aug 11 16:54:11 2003 UTC (17 years, 3 months ago) by pk
Branch: MAIN
Changes since 1.58: +9 -3 lines
Diff to previous 1.58 (colored)

uao_pagein_page() & anon_pagein():
	* return failure if the page cannot be retrieved.
	* wakeup any waiters when releasing a page after successful page in.

Revision 1.58 / (download) - annotate - [select for diffs], Mon Aug 11 16:48:05 2003 UTC (17 years, 3 months ago) by pk
Branch: MAIN
Changes since 1.57: +4 -3 lines
Diff to previous 1.57 (colored)

Only deactivate pages if their wired count is zero.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Aug 11 16:44:35 2003 UTC (17 years, 3 months ago) by pk
Branch: MAIN
Changes since 1.56: +5 -8 lines
Diff to previous 1.56 (colored)

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

Revision 1.56 / (download) - annotate - [select for diffs], Sat Apr 12 14:36:43 2003 UTC (17 years, 7 months ago) by yamt
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.55: +6 -4 lines
Diff to previous 1.55 (colored)

unbusy a page after put it on the queue.
fix a panic with UVM_PAGE_TRKOWN when doing swapoff.

Revision 1.55 / (download) - annotate - [select for diffs], Sun Feb 9 22:28:40 2003 UTC (17 years, 9 months ago) by pk
Branch: MAIN
Changes since 1.54: +3 -3 lines
Diff to previous 1.54 (colored)

uao_put: release uvm object's lock only after we're done with its page list.

Revision 1.54 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:54 2003 UTC (17 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.53: +4 -2 lines
Diff to previous 1.53 (colored)

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

Revision 1.53 / (download) - annotate - [select for diffs], Sat Jan 18 09:42:57 2003 UTC (17 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.52: +4 -4 lines
Diff to previous 1.52 (colored)

Merge the nathanw_sa branch.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Nov 24 11:50:32 2002 UTC (18 years ago) by scw
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.51: +4 -3 lines
Diff to previous 1.51 (colored)

Quell uninitialised variable warnings.

Revision 1.51 / (download) - annotate - [select for diffs], Thu May 9 07:04:23 2002 UTC (18 years, 7 months ago) by enami
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, 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, netbsd-1-6, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gehenna-devsw-base, gehenna-devsw
Changes since 1.50: +46 -16 lines
Diff to previous 1.50 (colored)

In uao_put(), if we wait for the busy page owned by someone else,
we can't simply reuse the pointor to the page.  Instead, we need to
acquire it again.  So, rearrange the loop like genfs_putpages() does.
Reviewed by chuq.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:47 2002 UTC (18 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, eeh-devprop-base, eeh-devprop
Branch point for: newlock
Changes since 1.49: +4 -5 lines
Diff to previous 1.49 (colored)

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

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

From art@openbsd.org.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Nov 10 07:36:59 2001 UTC (19 years, 1 month ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, ifpoll-base
Changes since 1.48: +4 -1 lines
Diff to previous 1.48 (colored)

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

Revision 1.48 / (download) - annotate - [select for diffs], Wed Nov 7 14:07:23 2001 UTC (19 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.47: +7 -5 lines
Diff to previous 1.47 (colored)

only acquire the lock for swpgonly if we actually need to adjust it.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Nov 6 08:07:49 2001 UTC (19 years, 1 month ago) by chs
Branch: MAIN
Changes since 1.46: +5 -4 lines
Diff to previous 1.46 (colored)

several changes prompted by loaning problems:
 - fix the loaned case in uvm_pagefree().
 - redo uvmexp.swpgonly accounting to work with page loaning.
   add an assertion before each place we adjust uvmexp.swpgonly.
 - fix uvm_km_pgremove() to always free any swap space associated with
   the range being removed.
 - get rid of UVM_LOAN_WIRED flag.  instead, we just make sure that
   pages loaned to the kernel are never on the page queues.
   this allows us to assert that pages are not loaned and wired
   at the same time.
 - add yet more assertions.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Sep 15 20:36:45 2001 UTC (19 years, 2 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, post-chs-ubcperf
Branch point for: thorpej-mips-cache
Changes since 1.45: +186 -281 lines
Diff to previous 1.45 (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.45 / (download) - annotate - [select for diffs], Sat Jun 23 20:52:03 2001 UTC (19 years, 5 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf
Branch point for: thorpej-devvp, kqueue
Changes since 1.44: +25 -19 lines
Diff to previous 1.44 (colored)

don't for memory in uao_set_swlot() since we're holding spinlocks,
instead return -1.  adjust callers to handle this new error return.
fixes PR 13194.

Revision 1.44 / (download) - annotate - [select for diffs], Fri Jun 22 06:20:24 2001 UTC (19 years, 5 months ago) by chs
Branch: MAIN
Changes since 1.43: +4 -5 lines
Diff to previous 1.43 (colored)

don't use the list pointers after we take an object off its list.

Revision 1.43 / (download) - annotate - [select for diffs], Sat May 26 21:27:20 2001 UTC (19 years, 6 months ago) by chs
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

replace vm_page_t with struct vm_page *.

Revision 1.42 / (download) - annotate - [select for diffs], Sat May 26 16:32:46 2001 UTC (19 years, 6 months ago) by chs
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

replace {simple_,}lock{_data,}_t with struct {simple,}lock {,*}.

Revision 1.41 / (download) - annotate - [select for diffs], Fri May 25 04:06:12 2001 UTC (19 years, 6 months ago) by chs
Branch: MAIN
Changes since 1.40: +21 -21 lines
Diff to previous 1.40 (colored)

remove trailing whitespace.

Revision 1.40 / (download) - annotate - [select for diffs], Sat Mar 10 22:46:47 2001 UTC (19 years, 9 months ago) by chs
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.39: +10 -10 lines
Diff to previous 1.39 (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.39 / (download) - annotate - [select for diffs], Sun Feb 18 21:19:08 2001 UTC (19 years, 9 months ago) by chs
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.38: +7 -29 lines
Diff to previous 1.38 (colored)

clean up DIAGNOSTIC checks, use KASSERT().

Revision 1.38 / (download) - annotate - [select for diffs], Sun Jan 28 23:30:42 2001 UTC (19 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.37: +2 -5 lines
Diff to previous 1.37 (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.37 / (download) - annotate - [select for diffs], Sat Nov 25 06:27:59 2000 UTC (20 years ago) by chs
Branch: MAIN
Changes since 1.36: +19 -25 lines
Diff to previous 1.36 (colored)

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

Revision 1.36 / (download) - annotate - [select for diffs], Fri Nov 24 20:34:01 2000 UTC (20 years ago) by chs
Branch: MAIN
Changes since 1.35: +1 -3 lines
Diff to previous 1.35 (colored)

g/c unused pager ops "asyncget" and "aiodone".

Revision 1.35 / (download) - annotate - [select for diffs], Wed Nov 8 14:28:16 2000 UTC (20 years, 1 month ago) by ad
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

Update for hashinit() change.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Aug 2 20:23:23 2000 UTC (20 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.33: +4 -4 lines
Diff to previous 1.33 (colored)

MALLOC()/FREE() are not to be used for variable-sized allocations.

Revision 1.33 / (download) - annotate - [select for diffs], Tue Jun 27 17:29:19 2000 UTC (20 years, 5 months ago) by mrg
Branch: MAIN
Changes since 1.32: +1 -3 lines
Diff to previous 1.32 (colored)

remove include of <vm/vm.h>

Revision 1.32 / (download) - annotate - [select for diffs], Mon Jun 26 14:21:17 2000 UTC (20 years, 5 months ago) by mrg
Branch: MAIN
Changes since 1.31: +1 -3 lines
Diff to previous 1.31 (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.31 / (download) - annotate - [select for diffs], Fri May 19 04:34:45 2000 UTC (20 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5, minoura-xpg4dl-base, minoura-xpg4dl
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

NULL != 0

Revision 1.30 / (download) - annotate - [select for diffs], Mon Apr 10 00:32:46 2000 UTC (20 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +4 -5 lines
Diff to previous 1.29 (colored)

Use UVM_PGA_ZERO in a few (easy) places.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Apr 3 07:35:23 2000 UTC (20 years, 8 months ago) by chs
Branch: MAIN
Changes since 1.28: +1 -2 lines
Diff to previous 1.28 (colored)

remove the "shareprot" pagerop.  it's not needed anymore since
share maps are long gone.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Mar 26 20:54:46 2000 UTC (20 years, 8 months ago) by kleink
Branch: MAIN
Changes since 1.27: +13 -15 lines
Diff to previous 1.27 (colored)

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

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

Revision 1.27 / (download) - annotate - [select for diffs], Tue Jan 11 06:57:49 2000 UTC (20 years, 11 months ago) by chs
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.26: +320 -49 lines
Diff to previous 1.26 (colored)

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

reviewed by:  Chuck Cranor

Revision 1.26 / (download) - annotate - [select for diffs], Sun Sep 12 01:17:34 1999 UTC (21 years, 2 months ago) by chs
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999
Branch point for: thorpej_scsipi
Changes since 1.25: +6 -8 lines
Diff to previous 1.25 (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.25 / (download) - annotate - [select for diffs], Sat Aug 21 02:19:05 1999 UTC (21 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.24: +9 -1 lines
Diff to previous 1.24 (colored)

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

Fixes kern/8239.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Jul 22 22:58:38 1999 UTC (21 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (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.23 / (download) - annotate - [select for diffs], Thu Jul 22 21:27:32 1999 UTC (21 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

0 -> FALSE in a few places.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Jul 17 06:06:36 1999 UTC (21 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.21: +189 -14 lines
Diff to previous 1.21 (colored)

Implement uao_flush().  This is pretty much identical to the "amap flush"
code in uvm_map_clean().

Revision 1.21 / (download) - annotate - [select for diffs], Wed Jul 7 05:32:26 1999 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.20: +8 -4 lines
Diff to previous 1.20 (colored)

Update a comment in uao_flush().

Revision 1.20 / (download) - annotate - [select for diffs], Tue May 25 00:09:00 1999 UTC (21 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

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

Revision 1.19 / (download) - annotate - [select for diffs], Sun Apr 11 04:04:11 1999 UTC (21 years, 8 months ago) by chs
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Fri Mar 26 17:34:15 1999 UTC (21 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Changes since 1.17: +39 -16 lines
Diff to previous 1.17 (colored)

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

Revision 1.17 / (download) - annotate - [select for diffs], Thu Mar 25 18:48:49 1999 UTC (21 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.16: +1 -5 lines
Diff to previous 1.16 (colored)

remove now >1 year old pre-release message.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Mar 24 03:45:27 1999 UTC (21 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.15: +1 -2 lines
Diff to previous 1.15 (colored)

after discussion with chuck, nuke pgo_attach from uvm_pagerops

Revision 1.15 / (download) - annotate - [select for diffs], Sun Oct 18 23:49:59 1998 UTC (22 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, chs-ubc-base
Branch point for: chs-ubc
Changes since 1.14: +8 -7 lines
Diff to previous 1.14 (colored)

shift by PAGE_SHIFT instead of multiplying or dividing by PAGE_SIZE.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Sep 18 19:28:22 1998 UTC (22 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.13: +5 -1 lines
Diff to previous 1.13 (colored)

Add a comment documenting the last change.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Sep 18 19:27:20 1998 UTC (22 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.12: +2 -3 lines
Diff to previous 1.12 (colored)

Don't use the nointr pool page allocator for the uao_swhash_elt pool.  We
need to ensure that these come from a non-pageable kernel map, otherwise
we can run into a deadlock condition (as noticed by Chuck Silvers).

Revision 1.12 / (download) - annotate - [select for diffs], Mon Aug 31 00:01:59 1998 UTC (22 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.11: +51 -9 lines
Diff to previous 1.11 (colored)

Use the pool allocator w/ the "nointr" pool page allocator for uvm_aobj
and uao_swhash_elt structures.  Also, fix a bug in uao_set_swlot() where
if setting the swslot to 0 (freeing swap resources), and no swslot was
currently allocated, a new entry would be allocated anyhow (revealed during
pool'ification).

Revision 1.11 / (download) - annotate - [select for diffs], Thu Aug 13 17:32:46 1998 UTC (22 years, 3 months ago) by drochner
Branch: MAIN
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

minor consistency nit: the page index into an anon object is always
assigned to from integer types, and it is compared to integers. So
let it be an integer instead of vsize_t.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Aug 13 02:11:00 1998 UTC (22 years, 3 months ago) by eeh
Branch: MAIN
Changes since 1.9: +11 -11 lines
Diff to previous 1.9 (colored)

Merge paddr_t changes into the main branch.

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

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

Revision 1.8 / (download) - annotate - [select for diffs], Sun Mar 1 02:25:28 1998 UTC (22 years, 9 months ago) by fvdl
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.7: +1 -3 lines
Diff to previous 1.7 (colored)

Merge with Lite2 + local changes

Revision 1.7 / (download) - annotate - [select for diffs], Thu Feb 12 07:36:43 1998 UTC (22 years, 9 months ago) by chs
Branch: MAIN
Changes since 1.6: +47 -9 lines
Diff to previous 1.6 (colored)

add copyright.

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

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

Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 9 14:35:48 1998 UTC (22 years, 10 months ago) by mrg
Branch: MAIN
Changes since 1.4: +683 -688 lines
Diff to previous 1.4 (colored)

KNF.

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

restore rcsids

Revision 1.3 / (download) - annotate - [select for diffs], Sat Feb 7 02:32:37 1998 UTC (22 years, 10 months ago) by chs
Branch: MAIN
Changes since 1.2: +24 -27 lines
Diff to previous 1.2 (colored)

enable hashtables for swapslot storage - deadlock is fixed.
fix initialization of swhash entries.
use malloc(M_NOWAIT) for creating kernel object.
avoid dereferencing a vm_page once the page has been freed.

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

RCS ID police.

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

Initial revision

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




CVSweb <webmaster@jp.NetBSD.org>