Commit Graph

1165 Commits

Author SHA1 Message Date
mrg c2b95373bf remove clause #3 from my license where there are no other
copyright holders involved.
2008-05-29 14:51:25 +00:00
chs a5e92dac93 if UVMHIST is defined, include headers necessary for its use. 2008-05-25 16:02:08 +00:00
kardel a70d0e6c97 keep dumpcdev and dumpdev consistent
allows savecore.c@1.72 to find the right dumpdev in case it was changed
from the default - hi ad@
2008-05-11 20:19:27 +00:00
ad e071d39c84 - 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.
2008-05-05 17:11:16 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad 7d6bc631b9 Disable preemption while swapping pmap. 2008-04-27 11:39:46 +00:00
yamt fb0cfeb7dd fix a locking botch. PR/38415 from Wolfgang Solfrank. 2008-04-26 13:44:00 +00:00
ad 6d70f903e6 Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
2008-04-24 15:35:27 +00:00
simonb 246143d6c1 Set up uvmhist in uvm_aio_aiodone_pages(). 2008-04-17 05:39:41 +00:00
yamt 1d737efc42 fix the order of printf arguments. 2008-04-11 15:47:15 +00:00
christos 9741037836 - use uarea_swapin, rather than duplicating the code.
- use __func__ where appropriate.
2008-04-11 15:31:37 +00:00
christos c7a574ed9e make this compile 2008-03-29 20:40:52 +00:00
dholland 132066c541 Fix broken build. hi skrll :-) 2008-03-29 20:15:54 +00:00
skrll 38b9530a91 Fix unsed variable when DEBUG isn't defined. 2008-03-29 18:49:13 +00:00
ad be04ac4896 Make rusage collection per-LWP and collate in the appropriate places.
cloned threads need a little bit more work but the locking needs to
be fixed first.
2008-03-27 19:06:51 +00:00
yamt d886e611bd remove a redundant pmap_update and add a comment instead. 2008-03-24 08:52:55 +00:00
bjs d5e8b5ed97 Allow this to compile if LISTQ is undefined:
- Put '#ifdef LISTQ' ... '#endif' pairs around pageq_insert_head()
	  and clockpro_insert_head().

	- Add missing argument to printf statement.
2008-03-22 05:50:42 +00:00
ad a9ca7a3734 Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
2008-03-21 21:54:58 +00:00
martin 813190b43d Swap sysctl -d description of vm.filemin and vm.execmin. Noted by
Raymond Meyer on current-users.
2008-03-07 08:44:51 +00:00
yamt 5f4f3b8ca8 fix "stale map" assertions. PR/38153 from Sarton O'Brien. 2008-03-04 09:32:01 +00:00
yamt 19b9de9868 uvm_swap_io: if pagedaemon, don't wait for iobuf. 2008-02-29 20:35:23 +00:00
yamt 569bb6b4dc update comment 2008-02-29 12:08:04 +00:00
matt 41b4feae9a Convert two inlines from old-style-definitions to ansi. 2008-02-27 19:38:57 +00:00
ad 0fe23ea49b Assert uvm_fpageqlock is held in a few more places. 2008-02-27 14:24:24 +00:00
ad 185d25c158 Minor corrections to comments. 2008-02-27 14:23:33 +00:00
yamt 0a2b10db61 uao_put: fix a race with pageout. 2008-02-27 13:46:20 +00:00
chris 855792073c Add some more missing pmap_update()s following pmap_kremove()s. 2008-02-23 17:27:58 +00:00
yamt f7048cc403 uvm_uarea_init: fix compilation where PAGE_SIZE is not a constant. (sparc)
reported by Tom Spindler.
2008-02-08 11:49:40 +00:00
yamt 79c62b78b6 nonresident_rotate: avoid too long loops which can happen on some workloads. 2008-02-07 12:27:38 +00:00
yamt 7608362b58 swapcluster_flush: handle nused==0, which can happen if swapcluster_add failed.
PR/37669 from Andrew Doran.
2008-02-07 12:24:16 +00:00
yamt cb964fe917 uvm_uarea_init: make #if about PR_NOALIGN clearer and add a comment
to explain it.
2008-02-07 12:21:24 +00:00
hannken ee150e014e Lock swapdev_vp for VOP_OPEN.
From: YAMAMOTO Takashi <yamt@netbsd.org>
2008-01-30 14:25:21 +00:00
yamt 52838e34f5 remove a special allocator for uareas, which is no longer necessary.
use pool_cache instead.
2008-01-28 12:22:46 +00:00
hannken ce34b417f9 uvm_swap_init(): Call VOP_OPEN() on swapdev_vp to make I/O through the
swap device work with specnodes.

Ok: Andrew Doran <ad@netbsd.org>
2008-01-27 17:18:09 +00:00
reinoud 6383f534f7 Remove extra '(' that prevented kernel with UVMHIST to be compiled 2008-01-22 21:36:23 +00:00
yamt 2b40f35040 push pmap_clear_reference calls into pdpolicy code, where reference bits
actually matter.
2008-01-18 10:48:23 +00:00
yamt 729c3a185b unwrap short lines. 2008-01-13 16:46:47 +00:00
yamt b0fbe32ddf nonresident_rotate: micro optimization 2008-01-13 16:28:41 +00:00
yamt 74e0872eca simplify locking and remove vm_map_upgrade/downgrade.
this fixes a deadlock due to read-lock recursion of map->lock.
2008-01-08 13:09:55 +00:00
matt 2414d5854f Make sys_swapctl match syscallargs.h 2008-01-08 06:25:55 +00:00
ad 0664a0459b 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.
2008-01-04 21:17:40 +00:00
ad 4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
christos 65c680cad7 Add PaX ASLR (Address Space Layout Randomization) [from elad and myself]
For regular (non PIE) executables randomization is enabled for:
    1. The data segment
    2. The stack

For PIE executables(*) randomization is enabled for:
    1. The program itself
    2. All shared libraries
    3. The data segment
    4. The stack

(*) To generate a PIE executable:
    - compile everything with -fPIC
    - link with -shared-libgcc -Wl,-pie

This feature is experimental, and might change. To use selectively add
    options PAX_ASLR=0
in your kernel.

Currently we are using 12 bits for the stack, program, and data segment and
16 or 24 bits for mmap, depending on __LP64__.
2007-12-26 22:11:47 +00:00
perry 970ad9314d Remove __attribute__((__noreturn__)) from things already marked __dead
Found by the department of redundancy department.
2007-12-24 15:46:45 +00:00
ad 9aef0fdbce Specify PR_LARGECACHE for anon_cache (which is insanely busy). 2007-12-20 23:50:00 +00:00
dsl 7e2790cf6f Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
2007-12-20 23:02:38 +00:00
yamt 0c38201391 add ddb "whatis" command. inspired from solaris ::whatis dcmd. 2007-12-13 02:45:09 +00:00
pooka db06a930e6 Remove cn_lwp from struct componentname. curlwp should be used
from on.  The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.
2007-12-08 19:29:36 +00:00
ad 371ba00b4a Allocate amaps from a pool_cache. 2007-12-08 15:46:31 +00:00
ad de874f619c Merge from vmlocking2 (use cdev_mmap()). 2007-12-08 15:33:09 +00:00