diff options
author | alc <alc@FreeBSD.org> | 2010-12-20 22:49:31 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2010-12-20 22:49:31 +0000 |
commit | be5201b0d1c733f2bfb8fa4bef0225259f9acb2c (patch) | |
tree | f6dd1a0aa7e3213a5adcdd9bdd3123f868ee9dea /sys/vm/vm_map.h | |
parent | 04f9658f5ccf72df9c57e4e218f11574121fc70f (diff) | |
download | FreeBSD-src-be5201b0d1c733f2bfb8fa4bef0225259f9acb2c.zip FreeBSD-src-be5201b0d1c733f2bfb8fa4bef0225259f9acb2c.tar.gz |
Introduce vm_fault_hold() and use it to (1) eliminate a long-standing race
condition in proc_rwmem() and to (2) simplify the implementation of the
cxgb driver's vm_fault_hold_user_pages(). Specifically, in proc_rwmem()
the requested read or write could fail because the targeted page could be
reclaimed between the calls to vm_fault() and vm_page_hold().
In collaboration with: kib@
MFC after: 6 weeks
Diffstat (limited to 'sys/vm/vm_map.h')
-rw-r--r-- | sys/vm/vm_map.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index fecbffe..7ad06b3 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -325,6 +325,7 @@ long vmspace_wired_count(struct vmspace *vmspace); */ #define VM_FAULT_NORMAL 0 /* Nothing special */ #define VM_FAULT_CHANGE_WIRING 1 /* Change the wiring as appropriate */ +#define VM_FAULT_DIRTY 2 /* Dirty the page; use w/VM_PROT_COPY */ /* * The following "find_space" options are supported by vm_map_find() |