Commit Graph

1228 Commits

Author SHA1 Message Date
ad
ae6c4143ce Move a couple of calls to pmap_update(). 2008-12-20 11:33:38 +00:00
cegger
9b87d582bd kill MALLOC and FREE macros. 2008-12-17 20:51:31 +00:00
christos
9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +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
9d315c5bc9 PR 40027/pagedaemon loops on memory shortage
uvmpd_scan_queue:

- Fix a bug that prevented the pagedaemon from making forward progress
  if (a) swap was full (b) the first 16 pages on the inactive list were
  unbusy anons not already backed by swap.

- Remove redundant uvm_swapisfull() check and just try to allocate a slot.
  If it fails we know swap is full.
2008-12-13 11:26:57 +00:00
ad
f9a4aaf41f PR kern/40027 pagedaemon loops on memory shortage
uvm_swapisfull: don't count some small portion as it may be inaccessible to
us at any given moment, for example if there is lock contention or if pages
are busy.
2008-12-13 11:22:09 +00:00
pooka
ee352f3d33 Make kernel_pmap_ptr a const. Requested by steve_martin. 2008-12-10 11:10:17 +00:00
pooka
29d439f898 Make pmap_kernel() a MI macro for struct pmap *kernel_pmap_ptr,
which is now the "API" provided by the pmap module.  pmap_kernel()
remains as the syntactic sugar.

Bonus cosmetics round: move all the pmap_t pointer typedefs into
uvm_pmap.h.

Thanks to Greg Oster for providing cpu muscle for doing test builds.
2008-12-09 20:45:44 +00:00
pooka
807cdbb61f uvm_loanuobjpages(): "nfsread" -> "loanuopg" in tsleep wmesg 2008-12-03 14:46:24 +00:00
ad
7a2060a7f5 Make adjustment of uvm_extrapages atomic since it's done without a lock.
XXX This is still a hack.
2008-12-03 11:43:51 +00:00
ad
04b3e89c3f uvmpd_tune: make the adjustments to individual variables atomic. 2008-12-02 10:46:43 +00:00
ad
a371a02d26 PR port-amd64/32816 amd64 can not load lkms
Change some assertions to partially allow for VM_MAP_IS_KERNEL(map) where
map is outside the range of kernel_map.
2008-12-01 10:54:57 +00:00
pooka
8fc8f3a7a3 g/c #if 0'd ubc_flush() 2008-11-27 08:46:09 +00:00
pooka
b4099c3e1d Rototill all remaining file systems to use ubc_uiomove() instead
of the ubc_alloc() - uiomove() - ubc_release() dance.
2008-11-26 20:17:33 +00:00
ad
92ce8c6a3d Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
2008-11-19 18:35:57 +00:00
pooka
010ce4930e more <sys/buf.h> police 2008-11-16 19:34:29 +00:00
ad
79d9beffc8 - If the system encounters a severe memory shortage, start unloading
unused kernel modules.
- Try to unload any autoloaded kernel modules 10 seconds after their
  load was successful.
- Keep a counter to track module load/unload events.
2008-11-14 23:06:45 +00:00
christos
2a274197af - allocate 8 pointers on the stack to avoid stack overflow in nfs.
- make that 8 a constant
- remove bogus panic
2008-10-31 20:42:41 +00:00
bjs
5353e20987 "sparce" -> "sparse" + commas after "large", prior to "sparse" 2008-10-26 08:32:02 +00:00
rmind
b5eb577d50 - 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>.
2008-10-18 03:46:22 +00:00
ad
0bf5fc898b Move test for __SWAP_BROKEN here. 2008-09-23 08:56:15 +00:00
ad
3689374b96 - Make free target 0.5%, but limit to between 128k and 1024k.
- Scale free target by number of CPUs.
- Prefer pageing to swapping.

Proposed on tech-kern.
2008-09-23 08:55:52 +00:00
hannken
88400c4373 Add snapshot support for logging ffs file systems.
- Add UFS_WAPBL_BEGIN() / UFS_WAPBL_END() where needed.

- Expunge WAPBL log inodes from snapshots.

- Ffs_copyonwrite() and ffs_snapblkfree() must run inside a WAPBL transaction.

- Add ffs_gop_write() as a wrapper around genfs_gop_write() that makes sure
  genfs_gop_write() gets always called inside a WAPBL transaction.

- Add VOP_PUTPAGES() flag PGO_JOURNALLOCKED to tag calls to VOP_PUTPAGES()
  inside a WAPBL transaction.

Reviewed by: Simon Burge <simonb@netbsd.org>,  Greg Oster <oster@netbsd.org>

PGO_JOURNALLOCKED / ffs_gop_write() part presented on tech-kern@.
2008-08-22 10:48:22 +00:00
skrll
3ceaf8f8e4 Make "show uvmhist" available to all arches (not just sparc*) in ddb. 2008-08-08 17:09:28 +00:00
skrll
d25ea6c235 g/c exec_map 2008-08-08 14:41:50 +00:00
pooka
c7b9619f12 the most karmic commit of all: fix tyop in comment 2008-08-04 13:37:33 +00:00
matt
5698938787 Make uvm_map.? use <sys/rb.h> instead of <sys/tree.h>. Change the
ambiguous members ownspace/space to gap/maxgap.  Add some evcnt for
evaluation of lookups using tree/list.  Drop threshold of using
tree for lookups from > 30 to > 15.

Bump kernel version to 4.99.71
2008-07-29 00:03:06 +00:00
matt
3e3119f9fe Default PMAP_KMPAGE to 0 unless it's been previously defined by
<machine/pmap.h>
2008-07-16 14:33:09 +00:00
matt
ad65eb54bc Add PMAP_KMPAGE flag for pmap_kenter_pa. This allows pmaps to know that
the page being entered is being for the kernel memory allocator.  Such pages
should have no references and don't need bookkeeping.
2008-07-16 00:11:27 +00:00
skrll
84009eaecf English improvement in comments.
"seems good to me :)" from yamt.
2008-07-11 07:09:18 +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
ecddde33a2 Update a comment. 2008-07-04 10:22:35 +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
ad
321c12209b Don't swap kernel stacks of realtime threads. 2008-06-25 19:20:56 +00:00
ad
1c7f0a02df Use pool_cache. 2008-06-25 13:21:04 +00:00
tsutsui
d7d2a525b1 Include <sys/sched.h> before <sys/syscallargs.h> for cpuset_t. 2008-06-17 16:17:21 +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
yamt
90e623a314 initialize uvm_loanzero_object correctly after page-cache rbtree changes. 2008-06-17 02:29:10 +00:00
ad
c0cd593d89 uvm_swapout: try to lock the vm_map before calling pmap_collect. 2008-06-16 10:19:57 +00:00
ad
6bb1c8bc6f swappable: invert previous so we check for SACTIVE or SSTOP. 2008-06-09 11:52:34 +00:00
ad
a3196ec57e swappable: return false if l->l_proc->p_stat == SDYING. 2008-06-09 11:51:43 +00:00
ad
0cd7bfa598 uvm_proc_exit: use macros to disable preemption. 2008-06-09 11:49:54 +00:00
ad
f00b42c246 Back out previous. 2008-06-06 14:01:32 +00:00
ad
ad1863a64a Wrap an expensive check in DIAGNOSTIC. 2008-06-06 13:52:56 +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
5d66fa5745 - Switch off the map evcnts by default.
- SAVE_HINT() doesn't need to be atomic.
2008-06-04 17:47:40 +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
4f702c0ce1 udv_fault: pmap_update before releasing locks. 2008-06-04 13:35:24 +00:00