Home | History | Annotate | Download | only in uvm
History log of /src/sys/uvm/uvm_object.c
RevisionDateAuthorComments
 1.25  15-Aug-2020  chs use uint64_t rather than int for storing the index of a page within an object.
 1.24  14-Aug-2020  chs centralize calls from UVM to radixtree into a few functions.
in those functions, assert that the object lock is held in
the correct mode.
 1.23  25-May-2020  ad - 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().
 1.22  19-May-2020  ad 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.
 1.21  23-Feb-2020  ad 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.
 1.20  15-Jan-2020  ad 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.
 1.19  31-Dec-2019  ad branches: 1.19.2;
- 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.
 1.18  15-Dec-2019  ad Merge from yamt-pagecache:

- do gang lookup of pages using radixtree.
- remove now unused uvm_object::uo_memq and vm_page::listq.queue.
 1.17  14-Dec-2019  ad Merge from yamt-pagecache: use radixtree for page lookup.

rbtree page lookup was introduced during the NetBSD 5.0 development cycle to
bypass lock contention problems with the (then) global page hash, and was a
temporary solution to allow us to make progress. radixtree is the intended
replacement.

Ok yamt@.
 1.16  13-Dec-2019  ad 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
 1.15  26-Oct-2015  mrg branches: 1.15.18;
disable the previous for now; it fails for me on a different system.
 1.14  26-Oct-2015  mrg in uvm_obj_init(), KASSERT(ops), to ensure we have an actual pager ops
set for this object. suggested by chuq.
 1.13  24-Aug-2015  pooka to garnish, dust with _KERNEL_OPT
 1.12  11-Mar-2014  pooka branches: 1.12.6;
deduplicate uvm_object_printit() implementation
 1.11  27-Aug-2011  christos branches: 1.11.2; 1.11.12; 1.11.16;
Add an optional pglist argument to uvm_obj_wirepages, to be
filled with the list of pages that were wired.
 1.10  18-Jun-2011  rmind - Move pre-check from uvm_obj_destroy() to ubc_purge(), keep it abstracted.
- Add comments noting the race between ubc_alloc() and ubc_purge().
 1.9  12-Jun-2011  mrg include uvm_object.c in the rump kernel for the new uvm_obj* functions.
don't build the uvm_object.c uvm_object_printit() for _RUMPKERNEL. (XXX)
add empty panic() stubs for uvm_loanbreak() and ubc_purge().

fixes some more 5.99.53 rump build issues.
 1.8  12-Jun-2011  rmind 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.
 1.7  18-Aug-2009  thorpej branches: 1.7.2; 1.7.4; 1.7.10;
Move uvm_object-related DDB hooks into uvm_object.c. Put all of the
uvm_map-related DDB stuff in one spot in the file.
 1.6  28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5  04-Jan-2008  ad branches: 1.5.6; 1.5.8; 1.5.10;
Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
 1.4  02-Jan-2008  ad Merge vmlocking2 to head.
 1.3  17-Feb-2007  rmind branches: 1.3.4; 1.3.18; 1.3.24; 1.3.26; 1.3.30;
Mention rmind@ as an author in the license. No functional change.
 1.2  12-Oct-2006  yamt branches: 1.2.2; 1.2.4; 1.2.8; 1.2.10;
whitespace.
 1.1  12-Oct-2006  yamt uobj_wirepages and uobj_unwirepages from Mindaugas. PR/34771.
(commented out in files.uvm for now because there is no user in tree.)

http://mail-index.netbsd.org/tech-kern/2006/09/24/0000.html
http://mail-index.netbsd.org/tech-kern/2006/10/10/0000.html
 1.2.10.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.2.8.4  21-Jan-2008  yamt sync with head
 1.2.8.3  26-Feb-2007  yamt sync with head.
 1.2.8.2  30-Dec-2006  yamt sync with head.
 1.2.8.1  12-Oct-2006  yamt file uvm_object.c was added on branch yamt-lazymbuf on 2006-12-30 20:51:05 +0000
 1.2.4.2  18-Nov-2006  ad Sync with head.
 1.2.4.1  12-Oct-2006  ad file uvm_object.c was added on branch newlock2 on 2006-11-18 21:39:50 +0000
 1.2.2.2  22-Oct-2006  yamt sync with head
 1.2.2.1  12-Oct-2006  yamt file uvm_object.c was added on branch yamt-splraiseipl on 2006-10-22 06:07:53 +0000
 1.3.30.2  08-Jan-2008  bouyer Sync with HEAD
 1.3.30.1  02-Jan-2008  bouyer Sync with HEAD
 1.3.26.1  04-Dec-2007  ad Pull the vmlocking changes into a new branch.
 1.3.24.1  18-Feb-2008  mjf Sync with HEAD.
 1.3.18.1  09-Jan-2008  matt sync with HEAD
 1.3.4.1  13-Mar-2007  ad Pull in the initial set of changes for the vmlocking branch.
 1.5.10.2  19-Aug-2009  yamt sync with head.
 1.5.10.1  16-May-2008  yamt sync with head.
 1.5.8.1  18-May-2008  yamt sync with head.
 1.5.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.7.10.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.7.4.6  19-May-2011  rmind 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@.
 1.7.4.5  05-Mar-2011  rmind sync with head
 1.7.4.4  26-Apr-2010  rmind Add ubc_purge() and purge/deassociate any related UBC entries during
object (usually, vnode) destruction. Since locking (and thus object)
is required to enter/remove mappings - object is not allowed anymore
to disappear with any UBC entries left.

From original patch by ad@ with some modifications.
 1.7.4.3  24-Apr-2010  rmind Amend previous.
 1.7.4.2  23-Apr-2010  rmind Use consistent naming - uvm_obj_*().
 1.7.4.1  16-Mar-2010  rmind Change struct uvm_object::vmobjlock to be dynamically allocated with
mutex_obj_alloc(). It allows us to share the locks among UVM objects.
 1.7.2.3  12-Jul-2010  uebayasi Reduce more diff by backing out XIP page specific code. Allow XIP pages
to be loaned.
 1.7.2.2  31-May-2010  uebayasi 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.
 1.7.2.1  12-Feb-2010  uebayasi Teach device page handling.
 1.11.16.1  18-May-2014  rmind sync with head
 1.11.12.2  03-Dec-2017  jdolecek update from HEAD
 1.11.12.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.2.4  22-May-2014  yamt 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")
 1.11.2.3  26-Nov-2011  yamt - uvm_page_array_fill: add some more parameters
- uvn_findpages: use gang-lookup
- genfs_putpages: re-enable backward clustering
- mechanical changes after the recent radixtree.h api changes
 1.11.2.2  06-Nov-2011  yamt remove pg->listq and uobj->memq
 1.11.2.1  02-Nov-2011  yamt 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
 1.12.6.2  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.12.6.1  22-Sep-2015  skrll Sync with HEAD
 1.15.18.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.19.2.2  29-Feb-2020  ad Sync with head.
 1.19.2.1  17-Jan-2020  ad Sync with head.

RSS XML Feed