Commit Graph

140 Commits

Author SHA1 Message Date
ad a9c686e81a Scale the number of kernel reserve pages by the number of CPUs. 2008-07-04 10:56:59 +00:00
ad 16a991e560 uvm_pageidlezero: fix a broken test which made it give up too easily. 2008-07-02 17:47:53 +00:00
matt 1906aa3e59 Switch from KASSERT to CTASSERT for those asserts testing sizes of types. 2008-07-02 14:47:34 +00:00
matt 5a4f0c6b2b Change tree op members/typedefs to rbto_compare_* from rb_compare_* 2008-06-30 20:14:09 +00:00
yamt 52d8b786fc - uvm_pagereplace: don't try to insert multiple pages with the same offset
into uvm_object rbtree.
- inline static -> static inline
2008-06-17 02:30:57 +00:00
he 7151c31712 Delete what appears to be a spurious assignment to an undeclared
'cpu' variable added in revision 1.133.  Restores buildability for this file.
2008-06-05 08:16:01 +00:00
ad 7a34cb95f0 Replace the global vm_page hash with a per vm_object rbtree.
Proposed on tech-kern@.
2008-06-04 15:06:04 +00:00
ad cbbf514e2c - vm_page: put listq, pageq into a union alongside a LIST_ENTRY, so we can
use both types of list.

- Make page coloring and idle zero state per-CPU.

- Maintain per-CPU page freelists. When freeing, put pages onto the local
  CPU's lists and the global lists. When allocating, prefer to take pages
  from the local CPU. If none are available take from the global list as
  done now. Proposed on tech-kern@.
2008-06-04 12:45:28 +00:00
ad 6dd8a2b97b uvm_pageidlezero:
- Use high and low water marks to try and reduce power consumption.
- Do trylock on uvm_fpageqlock, and bail if we can't get it.
- Only run on one CPU at a time.
2008-06-02 11:11:14 +00:00
yamt d886e611bd remove a redundant pmap_update and add a comment instead. 2008-03-24 08:52:55 +00:00
ad 0fe23ea49b Assert uvm_fpageqlock is held in a few more places. 2008-02-27 14:24:24 +00:00
chris 855792073c Add some more missing pmap_update()s following pmap_kremove()s. 2008-02-23 17:27:58 +00:00
yamt 729c3a185b unwrap short lines. 2008-01-13 16:46:47 +00:00
ad 4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
ad e9e11b98df Use atomics to maintain uvmexp.{anon,exec,file}pages. 2007-11-29 18:07:11 +00:00
ad 82f39f6568 Fix merge error. 2007-10-08 14:14:55 +00:00
ad 4de14a3313 Pad the hashlocks to 32-byte boundaries. 2007-10-08 14:06:15 +00:00
ad 4688843d2b Merge unobtrusive locking changes from the vmlocking branch. 2007-07-21 19:21:53 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
yamt f03010953f merge yamt-idlelwp branch. asked by core@. some ports still needs work.
from doc/BRANCHES:

	idle lwp, and some changes depending on it.

	1. separate context switching and thread scheduling.
	   (cf. gmcgarry_ctxsw)
	2. implement idle lwp.
	3. clean up related MD/MI interfaces.
	4. make scheduler(s) modular.
2007-05-17 14:51:11 +00:00
perseant 9bab95b2ae Track lwp as well as proc owner with UVM_PAGE_TRKOWN 2007-04-14 07:01:33 +00:00
thorpej b3667ada6d TRUE -> true, FALSE -> false 2007-02-22 06:05:00 +00:00
thorpej 712239e366 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.
2007-02-21 22:59:35 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
yamt 8bf7662829 merge yamt-splraiseipl branch.
- finish implementing splraiseipl (and makeiplcookie).
	  http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
	- complete workqueue(9) and fix its ipl problem, which is reported
	  to cause audio skipping.
	- fix netbt (at least compilation problems) for some ports.
	- fix PR/33218.
2006-12-21 15:55:21 +00:00
yamt fc88d88996 put ->K loaned pages on the page queue, so that page loaning doesn't
disturb pagedaemon/pdpolicy.
2006-12-15 13:51:30 +00:00
thorpej ec1894a78a Don't inline uvm_pagealloc_pgfl(). 2006-09-27 17:18:50 +00:00
yamt 9d3e3eab23 merge yamt-pdpolicy branch.
- separate page replacement policy from the rest of kernel
	- implement an alternative replacement policy
2006-09-15 15:51:12 +00:00
yamt 4dec4ffdcb uvm_page_own: more assertions. 2006-04-13 08:33:18 +00:00
yamt 2a89e06daa uvm_pageunwire: use uvm_pageactivate rather than a copy. 2006-02-12 09:19:27 +00:00
yamt a3af4c1530 remove the following options. no objections on tech-kern@.
UVM_PAGER_INLINE
	UVM_AMAP_INLINE
	UVM_PAGE_INLINE
	UVM_MAP_INLINE
2006-02-11 12:45:07 +00:00
perry 0f0296d88a Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:45:08 +00:00
yamt 4fce5d6f5e make length of inactive queue tunable by sysctl. (vm.inactivepct) 2005-12-21 12:19:04 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
thorpej 5303f3b378 Clean up the cpp macro used to say "we're compiling this specific C file". 2005-06-28 05:25:42 +00:00
thorpej e569facced Use ANSI function decls. 2005-06-27 02:19:48 +00:00
chs 48e4eb59a3 adapt to const changes. 2005-06-04 13:48:35 +00:00
yamt 662ada8f7a allocate anons on-demand, rather than reserving static amount of
them on boot/swapon.
2005-05-11 13:02:25 +00:00
yamt 6b2d8b66a4 merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
2005-04-01 11:59:21 +00:00
yamt 62905a1302 uvm_pageidlezero: grab kernel_lock before uvm.fpageqlock. PR/27259. 2004-10-23 21:29:27 +00:00
yamt 9555030270 make free page queue filo rather than fifo.
data in pages freed more recently are more likely on cpu cache.
2004-09-17 20:46:03 +00:00
yamt 175e99933e uvm_pagefree: when orphaning an A->K loaned page,
- decrement uvmexp.anonpages as it's no longer an anon page.
	- null out anon->u.an_page as the anon no longer own the page.
uvm_anfree: add related assertions.
2004-09-01 11:53:38 +00:00
yamt 1b03fa5302 uvm_page_unbusy: add assertions and comments about PG_RELEASED anon pages. 2004-05-05 11:58:27 +00:00
junyoung 1e2b269ded - Nuke __P().
- Drop trailing spaces.
2004-03-24 07:50:48 +00:00
yamt 546aea4d9c when breaking a loan from uobj,
insert the replacement page into the same position
as the original page on the object memq so that
genfs_putpages (and lfs) won't be confused.

noted by Stephan Uphoff (PR/24328)
2004-02-13 13:47:16 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
yamt 7f20b0c529 bump vnode hold count for page cache as well
to resolve unfairness between page cache and traditional buffer cache.
pointed by enami tsugutomo on current-users@.
2004-01-14 11:28:04 +00:00
simonb 2b9ac03f55 No need to break a line - the full line is less than 80 chars long. 2003-12-21 11:38:46 +00:00
yamt 4a570157d7 add a missing pmap_update(). 2003-11-05 15:45:54 +00:00
yamt 70538d0c22 add a DEBUG check if freed PG_ZERO pages are really zero-filled. 2003-11-03 03:58:28 +00:00