diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-10 14:51:22 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-10 14:51:22 +0000 |
commit | 6dfd3edcfce606fdcb05dd53327f33921ec6e477 (patch) | |
tree | f15c90a6f1a1449770e6568558f15d2bda50f7f7 /sys/vm/vm_map.h | |
parent | 00c7bfc86077f60d16b11baf228c6b68f1675106 (diff) |
More sync to NetBSD.
The highlight is some more advices to madvise(2).
o MADV_DONTNEED will deactive the pages in the given range giving a quicker
reuse.
o MADV_FREE will garbage-collect the pages and swap resources causing the
next fault to either page in new pages from backing store (mapped vnode)
or allocate new zero-fill pages (anonymous mapping).
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r-- | sys/vm/vm_map.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 47107fec0e7..515c9ec378c 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_map.h,v 1.13 2001/05/10 07:59:06 art Exp $ */ +/* $OpenBSD: vm_map.h,v 1.14 2001/05/10 14:51:21 art Exp $ */ /* $NetBSD: vm_map.h,v 1.11 1995/03/26 20:39:10 jtc Exp $ */ /* @@ -231,6 +231,15 @@ struct vm_map { #define VM_MAP_BUSY 0x08 /* rw: map is busy */ #define VM_MAP_WANTLOCK 0x10 /* rw: want to write-lock */ +#ifdef _KERNEL +#define vm_map_modflags(map, set, clear) \ +do { \ + simple_lock(&(map)->flags_lock); \ + (map)->flags = ((map)->flags | (set)) & ~(clear); \ + simple_unlock(&(map)->flags_lock); \ +} while (0) +#endif /* _KERNEL */ + /* * Interrupt-safe maps must also be kept on a special list, * to assist uvm_fault() in avoiding locking problems. |