summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_extern.h
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2005-12-16 18:34:14 +0000
committeralc <alc@FreeBSD.org>2005-12-16 18:34:14 +0000
commitf69d4d5fa8d8f5a3f56bf9f07a20dbf05bdeeca4 (patch)
treeaa11bb9f1f197a97830817243044264d50c17670 /sys/vm/vm_extern.h
parent4ea00e0984a3a4d6fcce90be6d9b56a67e0f8ad6 (diff)
downloadFreeBSD-src-f69d4d5fa8d8f5a3f56bf9f07a20dbf05bdeeca4.zip
FreeBSD-src-f69d4d5fa8d8f5a3f56bf9f07a20dbf05bdeeca4.tar.gz
Use sf_buf_alloc() instead of vm_map_find() on exec_map to create the
ephemeral mappings that are used as the source for three copy operations from kernel space to user space. There are two reasons for making this change: (1) Under heavy load exec_map can fill up causing vm_map_find() to fail. When it fails, the nascent process is aborted (SIGABRT). Whereas, this reimplementation using sf_buf_alloc() sleeps. (2) Although it is possible to sleep on vm_map_find()'s failure until address space becomes available (see kmem_alloc_wait()), using sf_buf_alloc() is faster. Furthermore, the reimplementation uses a CPU private mapping, avoiding a TLB shootdown on multiprocessors. Problem uncovered by: kris@ Reviewed by: tegge@ MFC after: 3 weeks
Diffstat (limited to 'sys/vm/vm_extern.h')
-rw-r--r--sys/vm/vm_extern.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h
index 4fc8275..08dba00 100644
--- a/sys/vm/vm_extern.h
+++ b/sys/vm/vm_extern.h
@@ -86,6 +86,8 @@ void vsunlock(void *, size_t);
void vm_object_print(/* db_expr_t */ long, boolean_t, /* db_expr_t */ long,
char *);
int vm_fault_quick(caddr_t v, int prot);
+struct sf_buf *vm_imgact_map_page(vm_object_t object, vm_ooffset_t offset);
+void vm_imgact_unmap_page(struct sf_buf *sf);
void vm_thread_dispose(struct thread *td);
void vm_thread_dispose_altkstack(struct thread *td);
void vm_thread_new(struct thread *td, int pages);
OpenPOWER on IntegriCloud