cvs commit: src/sys/kern imgact_elf.c src/sys/vm vm_extern.h
vm_glue.c
Alan Cox
alc at FreeBSD.org
Fri Dec 16 10:34:20 PST 2005
alc 2005-12-16 18:34:14 UTC
FreeBSD src repository
Modified files:
sys/kern imgact_elf.c
sys/vm vm_extern.h vm_glue.c
Log:
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
Revision Changes Path
1.167 +29 -61 src/sys/kern/imgact_elf.c
1.77 +2 -0 src/sys/vm/vm_extern.h
1.214 +72 -0 src/sys/vm/vm_glue.c
More information about the cvs-src
mailing list