Commit Graph

151 Commits

Author SHA1 Message Date
thorpej 21d14bd56b Move uvm_page-related DDB hooks into uvm_page.c. 2009-08-18 19:08:39 +00:00
thorpej 97a2657a66 Add a real API for testing if a page is a managed page, and adjust callers
to stop relying on vm_physseg_find() for this purpose.
2009-08-18 18:06:53 +00:00
matt 4efef68d70 Fix brain fart. physmem was int not long. 2009-08-11 16:27:08 +00:00
matt 6328246ec5 Add back declaration of physmem but use the existing type (long). 2009-08-11 16:07:24 +00:00
haad ced21e5799 Remove physmem definition to uintptr_t from another patch. 2009-08-11 09:16:53 +00:00
haad b760fc6e71 Add uvm_reclaim_hooks support for reclaiming kernel KVA space and memory.
This is used only by zfs where uvm_reclaim hook is added from arc cache.

Oked ad@.
2009-08-10 23:17:29 +00:00
abs fbcfe9c7af Clarify free_list usage in uvm_page_physload() regarding faster/slower RAM.
Slower RAM should be assigned a higher free_list id.
No functional change to code, just comments and manpage
2009-03-12 12:55:16 +00:00
drochner 605d3094c4 oops - missed a case with PMAP_PAGEIDLEZERO if md code aborts the
zeroing process, from Nicolas Joly
2009-02-27 23:29:08 +00:00
drochner e66cf328ab -fix two conditions where PQ_FREE was still/already set while the page
was not anymore/yet on the freelist and uvm_fpageqlock was not held
-clear PQ_FREE while the page is in the works of pageidlezero
This avoids that the DMA memory allocator (pglistalloc) grabs a page
which is not on the freelist, leading to a diagnostic panic (with DEBUG)
or freelist corruption. (mostly on X server activation after a VT
switch or suspend/resume because this can allocate megabytes of AGP
memory)
This might fix PR port-i386/38989 by Alan Barrett (in case this was
a multiprocessor).
2009-02-26 18:18:14 +00:00
yamt 20c094eb67 uvm_page_unbusy: add an assertion 2009-01-16 07:01:28 +00:00
ad b5413f0358 It's easier for kernel reserve pages to be consumed because the pagedaemon
serves as less of a barrier these days. Restrict provision of kernel reserve
pages to kmem and one of these cases:

- doing a NOWAIT allocation
- caller is a realtime thread
- caller is a kernel thread
- explicitly requested, for example by the pmap
2008-12-13 11:34:43 +00:00
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